| | |
- builtins.object
-
- WordInformationIndices
class WordInformationIndices(builtins.object) |
| |
WordInformationIndices(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 obtain the word information 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 word information 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.
- get_adjective_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of adjectives in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of adjectives per {self._incidence} words.
- get_adverb_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of adverbs in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of adverbs per {self._incidence} words.
- get_noun_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of nouns in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of nouns per {self._incidence} words.
- get_personal_pronoun_first_person_plural_form_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in first person and plural form in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns in first person and plural form per {self._incidence} words.
- get_personal_pronoun_first_person_singular_form_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in first person and singular form in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns in first person and singular form per {self._incidence} words.
- get_personal_pronoun_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns per {self._incidence} words.
- get_personal_pronoun_second_person_plural_form_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in second person and plural form in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns in second person and plural form per {self._incidence} words.
- get_personal_pronoun_second_person_singular_form_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in second person and singular form in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns in second person and singular form per {self._incidence} words.
- get_personal_pronoun_third_person_plural_form_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in third person and plural form in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns in third person and plural form per {self._incidence} words.
- get_personal_pronoun_third_person_singular_form_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of personal pronouns in third person and singular form in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of personal pronouns in third person and singular form per {self._incidence} words.
- get_verb_incidence(self, text: str, word_count: int = None, workers: int = -1) -> float
- This method calculates the incidence of verbs in a text per {self._incidence} words.
Parameters:
text(str): The text to be analyzed.
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.
Returns:
float: The incidence of verbs per {self._incidence} words.
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |