estnltk.wordnet_tagger module

class estnltk.wordnet_tagger.WordnetTagger[source]

Annotates analysis entries in corpus with queried Estonian WordNet data.

Methods

tag_text(text, \*\*kwargs) Annotates analysis entries in corpus with a list of lemmas` synsets and queried WordNet data in a ‘wordnet’ entry.
tag_text(text, **kwargs)[source]

Annotates analysis entries in corpus with a list of lemmas` synsets and queried WordNet data in a ‘wordnet’ entry.

Parameters:

text: estnltk.text.Text

Representation of a corpus in a disassembled form for automatic text analysis with word-level analysis entry. E.g. corpus disassembled into paragraphs, sentences, words ({‘paragraphs’:[{‘sentences’:[{‘words’:[{‘analysis’:{...}},..]},..]},..]}).

pos : boolean, optional

If True, annotates each synset with a correspnding pos (part-of-speech) tag.

variants : boolean, optional

If True, annotates each synset with a list of all its variants’ (lemmas’) literals.

var_sense : boolean, optional

If True and variants is True, annotates each variant/lemma with its sense number.

var_definition : boolean, optional

If True and variants is True, annotates each variant/lemma with its definition. Definitions often missing in WordNet.

var_examples : boolean, optional

If True and variants is True, annotates each variant/lemma with a list of its examples. Examples often missing in WordNet.

relations : list of str, optional

Holds interested relations. Legal relations are as follows:

`antonym`, `be_in_state`, `belongs_to_class`, `causes`, `fuzzynym`, `has_holo_location`, `has_holo_madeof`, `has_holo_member`,

`has_holo_part`, `has_holo_portion`, `has_holonym`, `has_hyperonym`, `has_hyponym`, `has_instance`, `has_mero_location`,

`has_mero_madeof`, `has_mero_member`, `has_mero_part`, `has_mero_portion`, `has_meronym`, `has_subevent`, `has_xpos_hyperonym`,

`has_xpos_hyponym`, `involved`, `involved_agent`, `involved_instrument`, `involved_location`, `involved_patient`,

`involved_target_direction`, `is_caused_by`, `is_subevent_of`, `near_antonym`, `near_synonym`, `role`, `role_agent`, `role_instrument`,

`role_location`, `role_patient`, `role_target_direction`, `state_of`, `xpos_fuzzynym`, `xpos_near_antonym`, `xpos_near_synonym`.

Annotates each synset with related synsets’ indices with respect to queried relations.

Returns:

estnltk.text.Text

In-place annotated text.