grafeno.transformers.attr_class module

class grafeno.transformers.attr_class.Transformer(attribute_class_keywords={'appearance': 'appearance', 'colour': 'color', 'shape': 'shape', 'time': 'time', 'color': 'color', 'size': 'size', 'times': 'time'}, **kwds)

Bases: grafeno.transformers.wordnet.Transformer

Specifies ATTR edges by trying to find the specific property name and adding it as a class grammateme. It relies on WordNet definitions.

For example, if there is a SWAN -- ATTR --> BLUE edge, the class attribute with value color will be added to it.

Parameters:

atribute_class_keywords : dict

Specifies a non-default mapping from keywords to property class names. The class name with most keywords found in the WordNet definitions will be chosen.

Methods

post_process()