germanetpy.filterconfig

Functions

distance(s1, s2, *[, weights, processor, ...])

Calculates the minimum number of insertions, deletions, and substitutions required to change one sequence into the other according to Levenshtein with custom costs for insertion, deletion and substitution

Classes

Filterconfig(search_string[, ignore_case, ...])

This class is a configuration object, that helps to filter GermaNets lexical units and Synsets to extract the ones with certain interesting properties.

OrthFormVariant(*args, **kwargs)

This enum represents the four possible orthographical variations

WordCategory(*args, **kwargs)

This Enum class contains the three part-of-speech tags (WortCategory), a Synset can have in GermaNet.

WordClass(*args, **kwargs)

This Enum class contains the semantic wordclasses / semantic fields a Synset can have in GermaNet.

class germanetpy.filterconfig.Filterconfig(search_string: str, ignore_case: bool = False, regex: bool = False, levenshtein_distance: int = 0)[source]

Bases: object

This class is a configuration object, that helps to filter GermaNets lexical units and Synsets to extract the ones with certain interesting properties.

filter_lexunits(germanet) set[source]

Applys the filter to the GermaNet data

Parameters:

germanet (Germanet) – the GermaNet object, loaded from the data

Returns:

a set of lexical units that are left after retrieval is filtered with the given constraints

filter_synsets(germanet) set[source]

Applys the filter to the GermaNet data

Parameters:

germanet (Germanet) – the GermaNet object, loaded from the data

Returns:

a set of synsets that are left after retrieval is filtered with the given constraints

property search_string
property ignore_case
property regex
property levenshtein_distance
property word_classes
property word_categories
property orth_variants