Picking out words
polimerjones
Member Posts: 50
I want to know if there is an easy way to have GS pick out a word from a string of letters. For example:
qwcatwaw - and have it pick out cat or qbrushws - and have it pick out brush
qwcatwaw - and have it pick out cat or qbrushws - and have it pick out brush
Comments
qwcatwaw - and have it pick out cat or qbrushws - and have it pick out brush
Try something like this:
thanks for the help but i was needing it to work for all words.
so if i typed any random set of letters it could pick out any words i made.
I saw the 60,000 word template. Is there a way to use the if contains with the word list?
I haven't looked in quite a while, but I bet the 60,000 word template, probably has the same 'contains' rule for each of the 60,000 words -- or something very similar to it. (Unless its simply a list of words without any rules.)
I also hope im explaining this right.
basically i have an actor that randomly generates 8 letters like aexantwg
what im wanting is a way to check if those random letters make any words.
Whats the difference whether someone types in 8 characters, or the computer generates 8 characters. The template is still checking the string of 8 letters against all 60,000 words -- isn't it?
example cat would be true as a real work that the program could find
but the 8 generated letters wxcatxwx would be false.
Edit -- Oh... wait.... I think I see the challenge now. In the template, the left side of the comparison held a whole list of words. And the test word was on the right side. You want the exact opposite. (Exactly as you have been trying to tell me.)
That means that you would need to make a test for all 60,000 words. Its probably possible. But also probably quite painful. Sorry!
Ok -- I think I have a solution to your question. The attached file uses the words found in @TShirtbooth's 60,000 word template. It takes a string of 10 letters and finds all the possible words contained in the string. If you read from left to right, a ten character string of letters has 45 possible words combinations. There are possibly; 9 two-letter words, 8 three-letter words, 7 four-letter words, 6 five-letter words, 5 six-letter words, 4 seven-letter words, 3 eight-letter words, 2 nine-letter words, and 1 ten-letter word. (Of course, I don't know of any ten character string of letters that can satisfy all 45 possible combinations.)
Anyway, I hope this demo is helpful.
http://www.mediafire.com/download/3z6dqxurkcn23cd/wordFinder60000.zip
MESSAGING, X-PLATFORM LEADERBOARDS, OFFLINE-TIMER, ANALYTICS and BACK-END CONTROL for your GameSalad projects
www.APPFORMATIVE.com
The word database does include inflections (even some unusual ones), but it does not include contractions and/or hyphenations. Of course, one could install a different word list. I recall some demos floating around the forum using a 140,000 word list.