Giter Site home page Giter Site logo

textreader's Introduction

cc-by-nc-sa-4.0 spaCy PyPI textreader Dev Status

TextReader

TextReader is a research-based library to calculate readability statistics from an English text input. It is an easy and proven method to see readability and reading time.

To Note

This library uses recalibrated versions of the below readability formulas (by default). Recalibration was made for equation to output US-based school grade (K1-12). To use original versions, see Usage

Research paper is currently under peer-review.

Usage

>>> import textreader

>>> input_text = 
    "Here we go again. We were all standing in line waiting for breakfast when one of the caseworkers came in and taptap-tapped down the line. Uh-oh, this meant bad news, either they’d found a foster home for somebody or somebody was about to get paddled. All the kids watched the woman as she moved along the line, her high-heeled shoes sounding like little fire-crackers going off on the wooden floor.Shoot! She stopped at me and said, “Are you Buddy Caldwell?”I said, “It’s Bud, not Buddy, ma’am.”She put her hand on my shoulder and took me out of the line. Then she pulled Jerry, one of the littler boys, over."

>>> TextReader = textreader.request(input_text)


"""
- below equations are recalibrated to output US-based school grade (K1-12) for easy use
- pass in adjusted = False to use original formulas
"""
>>> print(TextReader.flesch_kincaid_grade_level()) #or .FKGL()
>>> print(TextReader.fog_index()) #or .FOGI()
>>> print(TextReader.smog_index())) #or .SMOG()
>>> print(TextReader.coleman_liau_index()) #or .COLE()
>>> print(TextReader.automated_readability_index()) #or .AUTO()


"""
- pass in speed = slow for slow reader 
- speed = fast for fast readers
- speed = average for general uses (default)
"""
>>> print(TextReader.read_time()) #or .RT()

Install

Install using pip

pip install textreader

textreader's People

Contributors

brucewlee avatar

Stargazers

 avatar  avatar

Watchers

 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.