Releases: LSYS/LexicalRichness
v0.5.1
What's Changed
- Pass through
within_sample
parameter invocd
(fixes #80, @xhulianoThe1) - Fix CTTR equation (fixes #77)
- Minor doc fixes
- Fixed path to
vocd
image
LexicalRichness
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
)
Full Changelog: v0.4.1...v0.5.1
v0.5.0
What's Changed
- Add new measures #65
- Yule's K
- Yule's I
- Herdan's Vm
- Simpson's D
- Add new measures to example notebook (example.ipynb) #70
- Add new measures to docs #71
- Add the example.ipynb to the docs #72
- Tidy up imports using isort #69
LexicalRichness
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
)
Full Changelog: v0.4.1...v0.5.0
v0.4.1
What's Changed
- Update README.rst by @ekbrown in #62
- @LSYS Add useful links (#61)
- @LSYS Add links to docs in Section 7 of
README.rst
to reference details in docs (#64) - @LSYS Remove LGTM (#66)
- @LSYS Fix Sphinx autodoc on RTD (#67)
New Contributors
LexicalRichness
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: http://lexicalrichness.readthedocs.io/
Full Changelog: v0.3.0...v0.4.0
v0.4.0
What's Changed
- Add utility to plot empirical voc-D curve (#60)
matplotlib
is 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: v0.3.0...v0.4.0
v0.3.1
LexicalRichness v0.3.0
What's Changed
- Disallow string input if
tokenizer
=None (closes #12) by @LSYS in #38 - fix tokenizing of lists by @LSYS in #39
- add .gitignore and make by @LSYS in #41
- Linkify references and add papers in readme #43 solved by @Sreetama2001 in #46
- Added an example use case of the LexicalRichness tool by @g-hurst in #48
- Add voc-D measure (#42) by @LSYS in #49
- Update docs by @LSYS in #51
New Contributors
- @Sreetama2001 made their first contribution in #46
- @g-hurst made their first contribution in #48
Full Changelog: v0.2.0...v0.3.0
bump to v0.2.0
Fix inputs with strings and lists.
Fix-#12
Fixes #26
bumping to v0.1.7
bumping