![]() I just want a single file with every word in it. A lot of them are out of date and don't work, and some are just confusing. Make it smaller and only consisting of words that are allowed.īasically you just need a Word Service that takes a word you pass to it and returns whether or not it's real, as well as maybe some other information if it's needed like the definition if it's required, whether it's a noun, verb, adjective, etc. ![]() Obviously if you are downloading a database, you can exclude words like single letter words or if your game doesn't allow nouns, exclude all the nouns from the cache. lua file with a table of 200,000 entries faster than loading a txt file with 200,000 lines? I guess you could make it only load it once and output a cache file with the table already properly formatted. I never really did any tests to see how long it takes to load a text file with 200,000 lines in it into a table in Lua using the lines function. But if you use the word as the key, I guess it's not as important. Then you'd cut down on how big the table is. What if you had 26 tables, one for every letter, and put all words beginning with that letter in it. How it does it fast with hardly any notice that it's checking (i.e. How it does the checking is the question. Ideally there'd be a function you'd call checkWord(word) that would return true or false depending on if it's real or not. ![]() I'm wondering everything about this whole idea. It would have a database of all allowed words. Well how would a computer version of Scrabble do it? In the pre-internet days that is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |