Word frequency: Difference between revisions
m
→{{header|Perl 6}}: Note problem with /A-Za-z/
(Made draft task.) |
Thundergnat (talk | contribs) m (→{{header|Perl 6}}: Note problem with /A-Za-z/) |
||
Line 45:
We might try /A-Za-z/ as a matcher but this text is bursting with French words containing various accented glyphs. Those '''are''' letters, so words will be incorrectly split up; (Misérables will be counted as 'mis' and 'rables', probably not what we want.)
Actually, in this
( Really, a better regex would allow for contractions and embedded apostrophes but that is beyond the scope of this task as it stands. There are words like cat-o'-nine-tails and will-o'-the-wisps in there too to make your day even more interesting. )
<lang perl6>sub MAIN ($filename, $top = 10) {
|