| | |
- builtins.object
-
- SyntacticComplexityIndices
class SyntacticComplexityIndices(builtins.object) |
| |
SyntacticComplexityIndices(nlp, language: str = 'es') -> None
This class will handle all operations to find the synthactic complexity indices of a text according to Coh-Metrix. |
| |
Methods defined here:
- __init__(self, nlp, language: str = 'es') -> None
- The constructor will initialize this object that calculates the synthactic complexity 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.
Returns:
None.
- get_mean_number_of_modifiers_per_noun_phrase(self, text: str, workers: int = -1) -> float
- This method calculates the mean number of modifiers per noun phrase in a text.
Parameters:
text(str): The text to be analized.
workers(int): Amount of threads that will complete this operation. If it's -1 then all cpu cores will be used.
Returns:
float: The mean of modifiers per noun phrases.
- get_mean_number_of_words_before_main_verb(self, text: str, workers: int = -1) -> float
- This method calculates the mean number of words before the main verb of sentences.
Parameters:
text(str): The text to be analized.
workers(int): Amount of threads that will complete this operation. If it's -1 then all cpu cores will be used.
Returns:
float: The mean of words before the main verb of sentences.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |