Or maybe make a list of the most used 1000 words in each language. And see which list has the most occurrences.
Just collect common bi- and trigrams and a naive bayesian classifier.
See: Fast Static Symbol Table: https://github.com/duckdb/duckdb/pull/4366
FSST is based on a fixed size (255 items) dictionary of high frequency variable length strings/substrings (learned from the corpus) encoded as one byte.
That requires you to decide what a "word" is, which is not trivial (if you think that ignoring punctuation gets you to a clean "letters surrounded by spaces" you will get lots of issues with various Asian languages)
Also some languages have a lot of prefixes and suffixes on their verbs or even nouns, which dilutes your list of 1000 words by just adding the same common words over and over again with different suffixes designating grammatical tense, grammatical gender, etc.
The gzip version sounds more general and more obviously correct