grafeno.transformers.genitive module¶
-
class
grafeno.transformers.genitive.
Transformer
(attach_genitive=False, add_genitive_class=True, **kwds)¶ Bases:
grafeno.transformers.__utils.Transformer
Processes genitive relations. Does two main things:
1. Turns saxon genitive (
's
) into the prepositionof
with the correct dependencencies. This means that it must appear before preposition processing nodes in the transformer chain. 2. If enabled, collapsesof
edges, adding the information to the parent node.Parameters: attach_genitive : bool
If True, the concept is attached to the parent concept. For example,
john's father
turns into a single nodefather_of_john
, instead of afather
node with anof
edge to ajohn
node.add_genitive_class : bool
If both attach_genitive and add_genitive_class are True, a
HYP
edge is added with the original dependent concept.Methods
-
transform_dep
(dep, parent, child)¶
-
transform_node
(ms)¶
-