janus.metrics.reading#

Functions#

word_count(text)

Calculates word count exactly how readability package does

get_readability(target)

Create a Readability object from an input string

flesch(target, **kwargs)

Calculate the Flesch Score using py-readability-metrics.

flesch_grade(target, **kwargs)

Calculate the Flesch Score using py-readability-metrics.

gunning_fog(target, **kwargs)

Calculate the Gunning-Fog Score using py-readability-metrics.

gunning_fog_grade(target, **kwargs)

Calculate the Gunning-Fog Grade Level Score using py-readability-metrics.

Module Contents#

janus.metrics.reading.word_count(text)#

Calculates word count exactly how readability package does

Parameters:

text – The input string.

Returns:

Word Count

janus.metrics.reading.get_readability(target)#

Create a Readability object from an input string

Parameters:

target (str) – The target text.

Returns:

py-readability-metrics Readability object for that text

Return type:

readability.Readability

janus.metrics.reading.flesch(target, **kwargs)#

Calculate the Flesch Score using py-readability-metrics.

Parameters:

target (str) – The target text.

Returns:

The Flesch score.

Return type:

float

janus.metrics.reading.flesch_grade(target, **kwargs)#

Calculate the Flesch Score using py-readability-metrics.

Parameters:

target (str) – The target text.

Returns:

The Flesch-Kincaid Grade Level score.

Return type:

float

janus.metrics.reading.gunning_fog(target, **kwargs)#

Calculate the Gunning-Fog Score using py-readability-metrics.

Parameters:

target (str) – The target text.

Returns:

The Gunning-Fog score.

Return type:

float

janus.metrics.reading.gunning_fog_grade(target, **kwargs)#

Calculate the Gunning-Fog Grade Level Score using py-readability-metrics.

Parameters:

target (str) – The target text.

Returns:

The Gunning-Fog Grade Level score.

Return type:

float