http://blog.plover.com/2017/02/21/#anagram-scoring I found the best anagram in English I planned to publish this last week sometime but then I wrote a line of code with three errors and that took over the blog. A few years ago I mentioned in passing that in the 1990s I had constructed a listing of all the anagrams in Webster's Second International dictionary. (The Webster's headword list was available online.) This was easy to do, even at the time, when the word list itself, at 2.5 megabytes, was a file of significant size. Perl and its cousins were not yet common; in those days I used Awk. But the task is not very different in any reasonable language: # Process word list while (my $word = <>) { chomp $word; my $sorted = join "", sort split //, $word; # normal form push @{$anagrams{$sorted}}, $word; } for my $words (values %anagrams) { print "@$words\n" if @$words > 1; } The key technique is to reduce each...
Artikel-artikel singkat berisi daftar tautan gak penting banget tapi kadang diperlukan