Package jazzparser :: Package formalisms :: Package base :: Module rules :: Class ApplicationRuleBase
[hide private]
[frames] | no frames]

Class ApplicationRuleBase

source code

object --+    
         |    
      Rule --+
             |
            ApplicationRuleBase
Known Subclasses:

Rule for standard CCG application.

Instance Methods [hide private]
 
__init__(self, *args, **kwargs)
An application rule.
source code
 
apply_rule(self, cat_list, conditions=None, proc_sems=None)
conditions should be a callable that takes the functor followed by the argument and returns a boolean.
source code

Inherited from Rule: __str__, apply_rule_semantics

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

Class Variables [hide private]

Inherited from Rule: readable_rule

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, *args, **kwargs)
(Constructor)

source code 

An application rule. May be forward or backward, depending on the direction given in XML element.

Overrides: object.__init__

apply_rule(self, cat_list, conditions=None, proc_sems=None)

source code 

conditions should be a callable that takes the functor followed by the argument and returns a boolean. It will be run after the basic applicability tests to check whether the rule should be applied. If a function is given in proc_sems, it will be called to process the semantics of the inputs before the resultant semantics is built.

Returns:
a list of the possible categories resulting from the application if the rule is valid for the given arguments, otherwise None.
Overrides: Rule.apply_rule