text_complexity_analyzer_cm.coh_metrix_indices.readability_indices
index
/home/hans/Proyectos/Python/TextComplexityAnalyzerCM/text_complexity_analyzer_cm/coh_metrix_indices/readability_indices.py

 
Modules
       
multiprocessing
spacy

 
Classes
       
builtins.object
ReadabilityIndices

 
class ReadabilityIndices(builtins.object)
    ReadabilityIndices(nlp, language: str = 'es', descriptive_indices: text_complexity_analyzer_cm.coh_metrix_indices.descriptive_indices.DescriptiveIndices = None) -> None
 
This class will handle all operations to find the readability indices of a text according to Coh-Metrix.
 
  Methods defined here:
__init__(self, nlp, language: str = 'es', descriptive_indices: text_complexity_analyzer_cm.coh_metrix_indices.descriptive_indices.DescriptiveIndices = None) -> None
The constructor will initialize this object that calculates the readability indices for a specific language of those that are available.
 
Parameters:
nlp: The spacy model that corresponds to a language.
language(str): The language that the texts to process will have.
descriptive_indices(DescriptiveIndices): The class that calculates the descriptive indices of a text in a certain language.
 
Returns:
None.
calculate_fernandez_huertas_grade_level(self, text: str = None, mean_syllables_per_word: int = None, mean_words_per_sentence: int = None, workers: int = -1) -> float
This function obtains the Fernández-Huertas readability index for a text.
 
Parameters:
text(str): The text to be analized.
word_count(int): The amount of words in the text.
workers(int): Amount of threads that will complete this operation. If it's -1 then all cpu cores will be used.
mean_syllables_per_word(int): The mean of syllables per word in the text.
mean_words_per_sentence(int): The mean amount of words per sentences in the text.
 
Returns:
float: The Fernández-Huertas readability index for a text.

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Data
        ACCEPTED_LANGUAGES = {'es': 'es_core_news_lg'}