The Switched ON Phrase Generator

Splishy Splash Forums Announcements The Switched ON Phrase Generator

Viewing 15 posts - 16 through 30 (of 47 total)
  • Author
    Posts
  • #25056
    Avatar photoVersion3
    Keymaster

    The words “use it” were the link. I’ve added the link inline on the original post to make it easier. Anyone else still having trouble with it? I haven’t worked on it by the way, I just reuploaded the file when I made a change.

    #25082
    digitaltopia
    Participant

    Ah, and so it is. Because the links look the same as the text sometimes I overlook them.

    Here are my results:

    Ubuntu Linux 8.10
    Firefox 3.5.3 Generate button doesn’t work
    Opera 10.0 Generate button works fine
    Chome / Chromium dev build Generate button works fine

    For me, it works best in Chrome / Chromium. The fastest and the smoothest.

    I came across one questionable phrase:

    “as furry as a flea-ridden enigmatic hypocondriac with a enlarged tooth”

    The “a”s need to be aware of if they’re in front of a vowel or not.

    as lazy as many foreign street performers in a porn film

    #25057
    Avatar photoVersion3
    Keymaster

    Yeah, I’ve built that in to a few areas, but I have to rebuild part of it for the last noun. The trouble is, in making them a new category (that’s how they are organized) the odds change for the words being picked. So I’d need to have a lot of words to put in there, or nest it in something else to work the odds back down. Thanks for the feedback there. There are a few of them that have ‘a a’ or ‘a the’ and stuff in them. And that’s just from being entered incorrectly. Thanks!

    Interesting on this FF thing. I’ll look into it. Could be the positioning thing, anyone tried to click to the right of the button in a problematic FF page load by any chance?

    #25083
    digitaltopia
    Participant

    Why not just do a parse on the final string? I’m not sure how you’d do it in PHP, as I have yet to learn it, but in Python for instance you could do a quick scan of the string for the word “a”, then move two characters farther in the string and check to see if the character is a vowel. If so, use the index of “a” to replace it with “an”. That’s how I’d do it anyhow.

    In Firefox, the JavaScript error you get when clicking the button is: “testFrame is not defined” from line 57.

    #25058
    Avatar photoVersion3
    Keymaster

    ah, I’ve got a framename wrong. Thanks for that.

    As for the idea of parsing, see that’s not 100% either. The trouble you get into is the rule is obvious, however in conventional spoken English, there are times when you would use AN because the rule is based on pronunciation, and not on spelling. For example, “A unicorn” or “AN hour”. So, that’s your answer as to why I wouldn’t do it that way.

    The way this thing works, I’m choosing a random entry from a set of nested arrays that build the sentence. For example, one array may have “noun” for an entry and ” ‘adjective’ noun” for another, so it has to pull another random entry from the nested array to populate the adjective variable that exists.

    The solution I was using before was to put the “a/an” into the array entry, but makes updating them suck. I’ll probably just use a new nested array for entries that are dependent on the word “an” and work to not inadvertently increase their odds of being displayed.

    #25084
    digitaltopia
    Participant

    The way I would handle the above exceptions is to create an array full of the exceptions and at some point in the processing have the word after “a” compared to the list of exceptions. In Python this would be pretty easy to do by building a list of exceptions, throwing the word at it and it’d tell you if that word existed in the list, but I don’t know if it’d be so easy in PHP.

    #25059
    Avatar photoVersion3
    Keymaster

    Probably would, but probably a different approach. I’d prefer to keep the structure of these word objects (arrays) the same as the others. In 6 months it would still be easy for me (the non-coder) to see what I’m doing with exception words, rather than handling things for pronunciation. I’d rather just see a mistake when it loads (if I didn’t catch it when I populated it), and move it to the appropriate container. In some cases, this is really important, because it may be used in more than one place. There is some similar logic being used for plurals, since not only are many plurals not “s”, but some just don’t work well, and are not even allowed in the container. Like “Earth” for example.

    #25085
    digitaltopia
    Participant

    It all reminds me of when I created a translation program a long time ago in Java. Inspired by those programs that would convert your sentence to slang and such, I created a translation program with user-editable pluggable dictionaries so anyone could create any sort of translation system they wished and plug it in.

    #25060
    Avatar photoVersion3
    Keymaster

    I’m working on some other stuff to use this for. Most of it is just more fun SOS stuff.

    #25086
    digitaltopia
    Participant

    I do have a book on PHP I haven’t read yet. Once I do, the first thing I’m going to try to create is a dice rolling web page. I know such things already exist, but I want to create one myself.

    #25061
    Avatar photoVersion3
    Keymaster

    Yeah, not hard. It will make sense to you, you just need to get in there and do it.

    #25062
    Avatar photoVersion3
    Keymaster

    And, you guys should have a working FF version of the page now. While having this discussion I bothered to look into the problem. It was the way I was performing the refresh function by ID… FF just didn’t like the function. Now I’m identifying the frame ID better, and calling it by ID during the refresh in a manner more friendly with FF. I’ve got it working on Safari, FF, and Opera.

    Let me know if it still doesn’t work for anyone. 🙂

    #25087
    digitaltopia
    Participant

    It works great now :).

    I think the trickiest part of my project will be linking it to a MySQL database to save all the dice results.

    as aggressive as a Pillipino in a darkness factory

    #25063
    Avatar photoVersion3
    Keymaster

    Nah, that will be easy too. Reading and writing to MySQL is the easy stuff. At least you have a project in mind, just get in there and do that shit, yo!

    It’ll be as dreamy as a swarm of foreign goal oriented accountants on an active volcano!

    #25088
    digitaltopia
    Participant

    You’re right. After all, it should be as oblivious as a tri-nippled shoeless door to door 18-inch rubber cock salesman at the end.

Viewing 15 posts - 16 through 30 (of 47 total)
  • You must be logged in to reply to this topic.