Giter Club home page Giter Club logo

textatistic's Introduction

Textatistic

Textatistic is a Python package to calculate the Flesch Reading Ease, Flesch-Kincaid, Gunning Fog, Simple Measure of Gobbledygook (SMOG) and Dale-Chall readability indices. Textatistic also contains functions to count the number of sentences, characters, syllables, words, words with three or more syllables and words on an expanded Dale-Chall list of easy words.

Installation

$ pip install textatistic

Documentation

Detailed documentation available at erinhengel.com.

Quickstart

>>> from textatistic import Textatistic

# Generate object of readability statistics.
>>> text = 'There was a king with a large jaw. There was a queen with a plain face.'
>>> s = Textatistic(text)

# Return sentence count.
>>> s.sent_count
2

# Return Flesch Reading Ease score.
>>> s.flesch_score
114.11500000000001

# Return dictionary of character/word/syllable counts.
>>> s.counts
...

# Return dictionary of readability scores.
>>> s.scores
...

# Return dictionary of all attribute values.
>>> s.dict()
...

Table of attributes

char_count number of non-space characters.
notdalechall_count number of words not on Dale-Chall list of words understood by 80% of 4th graders.
polysyblword_count number of words with three or more syllables.
sent_count number of sentences.
sybl_count number of syllables.
word_count number of words.
dalechall_score Dale-Chall score.
flesch_score Flesch Reading Ease score.
fleschkincaid_score Flesch-Kincaid score.
gunningfog_score Gunning Fog score.
smog_score SMOG score.

textatistic's People

Contributors

erinhengel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.