Anagrams: Difference between revisions

Content added Content deleted
m (→‎{{header|AppleScript}}: Handler modified to take an array of words as a parameter instead of specifically reading "unixdict.txt".)
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) & "www.rosettacode.org:unixdict.txt") as «class furl»
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>