From JoyceUlysses.txt -- words occurring exactly once

dn PythonList at DancesWithMice.info
Thu May 30 17:18:44 EDT 2024


On 31/05/24 08:03, HenHanna via Python-list wrote:
> 
> Given a text file of a novel (JoyceUlysses.txt) ...
> 
> could someone give me a pretty fast (and simple) Python 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)
> 
>         but ideally, i'd treat  [editor-in-chief]
>                                 [go-ahead]  [pen-knife]
>                                 [know-how]  [far-fetched] ...
>         as one unit.


Did you mention the pay-rate for this work?


Split into words - defined as you will.
Use Counter.

Show some (of your) code and we'll be happy to critique...
-- 
Regards,
=dn


More information about the Python-list mailing list