3 ms·
I wouldn't take this law too seriously, for example from my short experiments with cat textfile.txt | tr '\ ' '\n' | sort | uniq -c | sort -rn it doesn't
by ajuc 11y ago
I wouldn't take this law too seriously, for example from my short experiments with
cat textfile.txt | tr '\ ' '\n' | sort | uniq -c | sort -rn
it doesn't seem to work for Polish (there's no articles in Polish, "of" is expressed as changed ending of noun, and in most texts I tried "is", "to", "from", "in" etc. are the most common with very similar frequencies).
I would think dolphins and aliens may be more alien than Slavs.
- kylebgorman 11y agoI don't know how big "textfile.txt" is, but try it with a much larger body of text? Also you'll almost surely want a much better tokenization algorithm than that. Zipf's Law can only hold "at the limit" of an infinite stream of text, so as a consequence you get a better approximation with a larger sample.