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

pepper.language.utils.analyzers_old.analyze_wh_question(words, speaker, response_type, viewed_object)[source]

This function analyzes questions which start with who, what, where (why and when are also in this category but are not yet comprehended by Leolani)

pepper.language.utils.analyzers_old.extract_named_entities(np_list)[source]

Using the Stanford NER package, this function tries to extract named entities such as persons, locations, organizations etc.