Given a text file of a novel (JoyceUlysses.txt) ...
could someone give me a pretty fast (and simple) program that'd give me
a list of all words occurring exactly once?
Given a text file of a novel (JoyceUlysses.txt) ...
could someone give me a pretty fast (and simple) program that'd give me
a list of all words occurring exactly once?
tr ' .;:,?!' '\n' | sort | uniq -u
could someone give me a pretty fast (and simple) program that'd give
me a list of all words occurring exactly once?
i'd not use Gauche for this, but maybe someone can change my mind.
_______________________
From JoyceUlysses.txt -- words occurring exactly once
Given a text file of a novel (JoyceUlysses.txt) ...
could someone give me a pretty fast (and simple) program that'd give me a list of all words occurring exactly once?
-- Also, a list of words occurring once, twice or 3 times
re: hyphenated words (you can treat it anyway you like)
ideally, i'd treat [editor-in-chief]
[go-ahead] [pen-knife]
[know-how] [far-fetched] ...
as one unit.
On 2024-05-30, Stefan Monnier <monnier@iro.umontreal.ca> wrote:
Given a text file of a novel (JoyceUlysses.txt) ...
could someone give me a pretty fast (and simple) program that'd give me
a list of all words occurring exactly once?
tr ' .;:,?!' '\n' | sort | uniq -u
Yep, that's pretty much how Doug McIlroy famously shut down Knuth.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 459 |
Nodes: | 16 (2 / 14) |
Uptime: | 00:06:22 |
Calls: | 9,345 |
Calls today: | 3 |
Files: | 13,538 |
Messages: | 6,082,220 |