Published January 11, 2023
| Version v0.4.0
Software
Open
LSYS/LexicalRichness: v0.4.0
Authors/Creators
Description
What's Changed
- Add utility to plot empirical voc-D curve (https://github.com/LSYS/LexicalRichness/issues/60)
matplotlibis now a requirement (fromsetup.py)- Update docs
To install: pip install lexicalrichness
Example usage
from lexicalrichness import LexicalRichness
# text example
text = """Measure of textual lexical diversity, computed as the mean length of sequential words in
a text that maintains a minimum threshold TTR score.
Iterates over words until TTR scores falls below a threshold, then increase factor
counter by 1 and start over. McCarthy and Jarvis (2010, pg. 385) recommends a factor
threshold in the range of [0.660, 0.750].
(McCarthy 2005, McCarthy and Jarvis 2010)"""
lex = LexicalRichness(text)
lex.vocd_fig(
ntokens=50, # Maximum number for the token/word size in the random samplings
within_sample=100, # Number of samples
seed=42, # Seed for reproducibility
)
GitHub: https://github.com/LSYS/LexicalRichness Example notebook: https://nbviewer.org/github/LSYS/LexicalRichness/blob/master/docs/example.ipynb Docs: https://www.lucasshen.com/software/lexicalrichness/doc
Full Changelog: https://github.com/LSYS/LexicalRichness/compare/v0.3.0...v0.4.0
Notes
Files
LSYS/LexicalRichness-v0.4.0.zip
Files
(3.5 MB)
| Name | Size | Download all |
|---|---|---|
|
md5:0957bb4d353f61e5c33096402ae745e6
|
3.5 MB | Preview Download |
Additional details
Related works
- Is supplement to
- https://github.com/LSYS/LexicalRichness/tree/v0.4.0 (URL)