Anagrams: Difference between revisions
Content deleted Content added
m →{{header|AppleScript}}: Handler modified to take an array of words as a parameter instead of specifically reading "unixdict.txt". |
m →{{header|AppleScript}}: Minor edit. |
||
Line 595: | Line 595: | ||
-- The words in "unixdict.txt" are arranged one per line in alphabetical order. |
-- The words in "unixdict.txt" are arranged one per line in alphabetical order. |
||
-- Some contain punctuation characters, so they're best extracted as 'paragraphs' rather than as 'words'. |
-- Some contain punctuation characters, so they're best extracted as 'paragraphs' rather than as 'words'. |
||
set wordFile to ((path to desktop as text) & " |
set wordFile to ((path to desktop as text) & "unixdict.txt") as «class furl» |
||
set wordList to paragraphs of (read wordFile as «class utf8») |
set wordList to paragraphs of (read wordFile as «class utf8») |
||
return largestAnagramGroups(wordList)</lang> |
return largestAnagramGroups(wordList)</lang> |