germanetpy.relationLoader

Functions

get_relation_attributes(attributes)

load_relations(germanet, tree)

Loads the information about the related synsets ans lexunits from the data and adds the edges between the objects.

Classes

ConRel(*args, **kwargs)

This Enum class contains the conceptual relations (short: ConRel) that synsets can have to other synsets.

LexRel(*args, **kwargs)

This enum represents the lexical relation (short: LexRel) that a Lexunit can have in GermaNet.

germanetpy.relationLoader.get_relation_attributes(attributes) -> (<class 'str'>, <class 'str'>, <class 'str'>, <class 'str'>)[source]
Parameters:

attributes (XML attribute) – The XML attributes the information can be extracted from

Returns:

The information as Strings or None if the information is not present. The name of the relation,the id of the start node, the id of the end node, the type of direction and if the relation is inverse

germanetpy.relationLoader.load_relations(germanet, tree)[source]

Loads the information about the related synsets ans lexunits from the data and adds the edges between the objects.

Parameters:
  • germanet (Germanet) – The Germanet object that is populated with Synsets and Lexunits

  • tree (Element Tree) – The XML tree of the relation data.