pepper.language.utils.analyzers_old module¶
-
pepper.language.utils.analyzers_old.
analyze_np
(np_list, speaker)[source]¶ This function analyzes a noun phrase (consists of pronouns, nouns, names, or possessive pronouns + prepositions) Morphological information which is stored in pronouns is extracted, names are simply marked as ‘human’ and possessive syntax constructions are analyzed
-
pepper.language.utils.analyzers_old.
analyze_possessive_np
(poss, np_list)[source]¶ This function is called to analyze possessive constructions like “my name” It extracts the person who is possessing and what does the person possess - the category in this case would be “name” and the person possessing is the speaker The predicate is created by adding a suffix “-is” to the category e.g. “name-is”
-
pepper.language.utils.analyzers_old.
analyze_pronoun
(pronoun, speaker)[source]¶ This function returns a morphology which it reads from the grammar (grammar_new.json) The grammar has information about person (1st, 2nd, 3rd) and number (singular or plural) for regular and possessive pronouns
-
pepper.language.utils.analyzers_old.
analyze_question_word
(question_word, pos)[source]¶ This function returns the response type of a question based on its first word
-
pepper.language.utils.analyzers_old.
analyze_verb
(verb)[source]¶ This function is called when a verb is detected, it can be either the verb to be or one of the verbs from the predicate list
-
pepper.language.utils.analyzers_old.
analyze_verb_question
(words, speaker, viewed_objects)[source]¶ This function analyzes questions which start with a verb to be or a modal verb