Analyzes features in text using a call to Textalyser. Uses requests
and BeautifulSoup4
. Requires Python >3.6.
This package is not official and uses some specific wording to extract information from the response from textalyser.net, so some functionality may break in the future if textalyser.net is updated.
Currently, this package supports extracting some basic information about text. More detailed analytics coming soon.
A new Textalyser object can be created through:
talyze = Textalyser("This is some text")
Afterwards, some parameters can be accessed:
word_count
: Total word countdistinct_word_count
: Number of distinct wordslexical_density
: Lexical density (between 0-1)gunning_fog
: Gunning-Fog Readabilitychar_count
: Number of characterschar_count_no_spaces
: Number of characters excluding spacesavg_syllables
: Average number of syllables per wordsentence_count
: Number of sentencesavg_sentence_length
: Average length of sentencesmax_sentence_length
: Max length of sentencelongest_sentence
: Longest sentence (string)min_sentence_length
: Min length of sentencealt_readability
: Alternate readability metric