Open dpalmasan opened 3 years ago
Looking into this now; would you suggest adding this as a function to a pre-existing file or creating a separate one?
Hello! Sure, this should go into src/ttr.py
file, as it is a TTR metric. Let me know if you have more questions!
Thanks! I just pushed the code to #49 .
Im going to have to do some more research on github, getting lost if ive pushed that right... cheers!
This is a lexical diversity measurement that penalizes number of words. It is computed as:
Where
is the number of distinct words in the text, and
is the total number of words in the text.
Unit tests should be added as well.
Docs should be updated as well, adding the following reference: