Skip to main content

Python package for calculating famous measures in computational linguistics

Project description

LinguaF

LinguaF provides an easy access for researchers and developers to methods of quantitative language analysis, such as: readability, complexity, diversity, and other descriptive statistics.

Usage

documents = [
    "Pain and suffering are always inevitable for a large intelligence and a deep heart. The really great men must, I think, have great sadness on earth.",
    "To go wrong in one's own way is better than to go right in someone else's.",
    "The darker the night, the brighter the stars, The deeper the grief, the closer is God!"
]

Descriptive Statistics

from linguaf import descriptive_statistics as ds


ds.words_per_sentence(documents)
# Output: 15

Lexical Complexity

from linguaf import lexical_complexity as lc


lc.mean_dependency_distance(documents)
# Output: 2.307306255835668

Lexical Diversity

from linguaf import lexical_diversity as ld


ld.log_type_token_ratio(documents)
# Output: 94.03574963462502

Readability

from linguaf import readability as r


r.flesch_kincaid_grade(documents)
# Output: 4.813333333333336

Install

Via PIP

pip install linguaf

Latest version from GitHub

git clone https://github.com/Perevalov/LinguaF.git
cd LinguaF
pip install .

Language Support

At the moment, library supports English and Russian languages for all the methods.

Open API

TBD

Citation

TBD

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

linguaf-0.0.8b0.tar.gz (13.7 kB view hashes)

Uploaded Source

Built Distribution

linguaf-0.0.8b0-py3-none-any.whl (17.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page