Collocations (easy, the same method) + extra mile: Idioms (hard, invent methods)
Please consider running the same code to collect all pairs (storage-friendly) and all triples (huge storage unpacked).
zstd --ulta -22 compressing on the fly saves storage (same words actially, so ~= unigram storage).
- An idiom is a phrase whose meaning could not be readily deduced from the meaning of its individual words.
Why bother:
A frequency-ranked snapshot of what English actually looked like before 1900 is useful for:
Anachronism detection in collocation -- deciding whether words pairs plausibly existed in historical text (modern collocatios simply never appears here).
Building or evaluating historical language models and more accurate period-accurate text generation.
Filtering/curating pre-1900 corpora and spotting modern collocations contamination.
Lexicography and historical linguistics -- collocation variation, vocabulary shift, and word pairs-frequency studies over time.
- vocab extending for effective tokenisation! No risc of LLM vocab explosion, since mono-lingual and 126 years cut.
Hey Foss,
Thanks for the idea. I considered this, but I didn't have a use for it personally.
I can do this for you, triplets, I'm not sure might be super CPU intensive and massive, but word pairs for sure.
I'll let you know here when it's done, but you can also check the repo in case I forget.
might be super CPU intensive
Do you need a tool? For pre-1918 old-rus implemented a multi-threaded (no Python)
https://github.com/korziner/wordgram_vocab
with Bloom filters to save compute.
I can translate its --help to English for you, in case of performance as a blocker.