LexicalRichness Versions Save

:smile_cat: :speech_balloon: A module to compute textual lexical richness (aka lexical diversity).

v0.5.1

9 months ago

What's Changed

  • Pass through within_sample parameter in vocd (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
)

image

Full Changelog: https://github.com/LSYS/LexicalRichness/compare/v0.4.1...v0.5.1

v0.5.0

1 year ago

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
)

image

Full Changelog: https://github.com/LSYS/LexicalRichness/compare/v0.4.1...v0.5.0

v0.4.1

1 year ago

What's Changed

  • Update README.rst by @ekbrown in https://github.com/LSYS/LexicalRichness/pull/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
)

image

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: https://github.com/LSYS/LexicalRichness/compare/v0.3.0...v0.4.0

v0.4.0

1 year ago

What's Changed

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
)

image

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

v0.3.1

1 year ago

What's Changed

Full Changelog: https://github.com/LSYS/LexicalRichness/compare/v0.3.0...v0.3.1

v0.3.0

1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/LSYS/LexicalRichness/compare/v0.2.0...v0.3.0

v0.2.0

1 year ago

Fix inputs with strings and lists.

v0.1.10

1 year ago

Fix gotcha where str input is still allowed when tokenizer=None (#38).

v0.1.9

1 year ago

Fixes packaging error (#26 )

v0.1.7

1 year ago