grafeno.transformers.genitive module¶
-
class
grafeno.transformers.genitive.Transformer(attach_genitive=False, add_genitive_class=True, **kwds)¶ Bases:
grafeno.transformers.__utils.TransformerProcesses genitive relations. Does two main things:
1. Turns saxon genitive (
's) into the prepositionofwith the correct dependencencies. This means that it must appear before preposition processing nodes in the transformer chain. 2. If enabled, collapsesofedges, 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 fatherturns into a single nodefather_of_john, instead of afathernode with anofedge to ajohnnode.add_genitive_class : bool
If both attach_genitive and add_genitive_class are True, a
HYPedge is added with the original dependent concept.Methods
-
transform_dep(dep, parent, child)¶
-
transform_node(ms)¶
-