grafeno.transformers.negation module

class grafeno.transformers.negation.Transformer(polarity_grammateme='polarity', positive_polarity='+', negative_polarity='-', **kwds)

Bases: grafeno.transformers.base.Transformer

Processes negation and its scope, setting the polarity of the affected verb.

Parameters:

polarity_grammateme : string

Name of the grammateme to store polarity

positive_polarity : string

Value for the polarity grammateme when affirmative/positive

negative_polarity : string

Value for the polarity grammateme when negative

Methods

transform_dep(dep, pid, cid)

Rise negation until a verb is found, which is then marked negative. Modal negative particles are also processed.

transform_node(ms)

Find negative particles, and by default mark all verbs as affirmative.