Closed HatScripts closed 6 years ago
I think you should use tokenize
combined with collections.Counter
. That's essentially what we do in the first place in the package that generates these word lists, https://github.com/LuminosoInsight/exquisite-corpus. wordfreq
is just for making the results easily available.
Is there a way to use custom word lists? Say if I wanted to know the frequency of the word "whale" in the text of Moby Dick. I would have thought such a task would be within the scope of this library, yet I can't find anything in the documentation about it.
I realise that I could use the
tokenize
method combined with something likecollections.Counter
, but that would seem to somewhat defeat the purpose.I've tried the following but to no avail: