Talk:Word wheel: Difference between revisions

Added a response to "more words with a different grid"
(Added a response to "more words with a different grid")
 
(3 intermediate revisions by 2 users not shown)
Line 5:
Nice. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 15:30, 4 July 2020 (UTC)
 
: It seems a waste of memory and CPU time to generate all possible conforming strings instead of writing some simple filters that validates the words against the Rosetta Code task and grid (word wheel) constraints. &nbsp; The REXX solution consumes almost all of the &nbsp; (smallish, sub-second) &nbsp; CPU time in just reading in the dictionary. &nbsp; The filters that I used for the REXX programming solution eliminate over half of the &nbsp; 25,105 &nbsp; words in the UNIXDICT file, &nbsp; about &nbsp;<sup>1</sup>/<sub>4</sub>&nbsp; of the time used for the filtering was used in the detecting of duplicate words &nbsp; (there are none, however). &nbsp; A very small fraction of that is used to validate that each letter (by count) is represented in the grid. &nbsp; I wonder what the CPU consumption would be if the number of words (entries) in the dictionary were a magnitude larger. &nbsp; My "personal" dictionary that I built has over &nbsp; 915,000 &nbsp; words in it. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 21:34, 4 July 2020 (UTC)
 
::Hi Gerard, no waste of memory in the Julia case as nested loops are used to generate word candidates one-at-a-time and then quickly checked if they are in the set of dictionary words. Probably hundreds of thousands of lookups which is OK for todays laptops. As for dictionary size, the task ''specifies'' a ''particular'' dictionary to use; going so far outside of that may interest, but is outside the task boundary.
Line 24:
: Replace 'o' with 'p' for 234 words. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 18:18, 5 July 2020 (UTC)
 
:: Thanks!! &nbsp; &nbsp; WillI'll doupdate the REXX (2<sup>nd</sup>) output. &nbsp; &nbsp; -- [[User:Gerard Schildberger|Gerard Schildberger]] ([[User talk:Gerard Schildberger|talk]]) 18:33, 5 July 2020 (UTC)
 
: The 9 most common letters in the directorydictionary are 'eratnilso' in order. I trid replacing the least common, 'o with any other from a..z and found the 'p'. Later I decided to replace the least common three characters: 'lso' with any combination of three characters from a..z which still only found the same replacement of 'o' by 'p'. --[[User:Paddy3118|Paddy3118]] ([[User talk:Paddy3118|talk]]) 19:02, 5 July 2020 (UTC)
 
: With unixdict.txt you can get 248 words from "setralinp" (i.e. same letters but with central letter "a"). Word wheel puzzles usually have the additional constraint that there is at least one nine-letter word to be found, in which case the best result with unixdict.txt is 215 words, which you can get from "spearmint" with "a" as the central letter. Using the dictionary "words_alpha.txt" from https://github.com/dwyl/english-words, "setralinp"/"a" generates 1033 words of 3 or more letters, including two nine-letter ones. Perhaps I'll add an "extra credit" part to this task along these lines. -- [[User:Simonjsaunders|Simonjsaunders]] ([[User talk:Simonjsaunders|talk]]) 12:38, 24 July 2020 (UTC)
1,777

edits