class documentation
class DrtParser(LogicParser): (source)
Known subclasses: nltk.sem.boxer.BoxerDrsParser
, nltk.sem.boxer.BoxerOutputDrsParser
Constructor: DrtParser()
A lambda calculus expression parser.
Method | __init__ |
to their types. |
Method | get |
This method exists to be overridden |
Method | get_ |
This method serves as a hook for other logic parsers that have different boolean operators |
Method | handle |
This method is intended to be overridden for logics that use different operators or expressions |
Method | handle |
Undocumented |
Method | handle_ |
Undocumented |
Method | handle |
Undocumented |
Method | handle |
Undocumented |
Method | isvariable |
Undocumented |
Method | make_ |
Undocumented |
Method | make_ |
Undocumented |
Method | make_ |
This method serves as a hook for other logic parsers that have different equality expression classes |
Method | make_ |
Undocumented |
Method | make_ |
Undocumented |
Method | make_ |
Undocumented |
Instance Variable | operator |
Undocumented |
Inherited from LogicParser
:
Method | __repr__ |
Undocumented |
Method | assert |
Undocumented |
Method | assert |
Undocumented |
Method | attempt |
Undocumented |
Method | attempt_ |
Attempt to make an application expression. The next tokens are a list of arguments in parens, then the argument expression is a function being applied to the arguments. Otherwise, return the argument expression. |
Method | attempt_ |
Attempt to make a boolean expression. If the next token is a boolean operator, then a BooleanExpression will be returned. Otherwise, the parameter will be returned. |
Method | attempt_ |
Attempt to make an equality expression. If the next token is an equality operator, then an EqualityExpression will be returned. Otherwise, the parameter will be returned. |
Method | get |
Undocumented |
Method | get_ |
This method serves as a hook for other logic parsers that have different quantifiers |
Method | handle |
Undocumented |
Method | handle |
Undocumented |
Method | handle |
Undocumented |
Method | handle |
Undocumented |
Method | handle |
Undocumented |
Method | has |
Undocumented |
Method | in |
Return TRUE if the given location is within the buffer |
Method | make_ |
Undocumented |
Method | parse |
Parse the expression. |
Method | process |
Split the data into tokens |
Method | process |
Parse the next complete expression from the stream and return it. |
Method | process |
Undocumented |
Method | token |
Get the next waiting token. If a location is given, then return the token at currentIndex+location without advancing currentIndex; setting it gives lookahead/lookback capability. |
Instance Variable | quote |
Undocumented |
Instance Variable | right |
Undocumented |
Instance Variable | type |
A list of tuples of quote characters. The 4-tuple is comprised of the start character, the end character, the escape character, and a boolean indicating whether the quotes should be included in the result... |
Instance Variable | _buffer |
Undocumented |
Instance Variable | _current |
Undocumented |
overrides
nltk.sem.logic.LogicParser.__init__
overridden in
nltk.sem.boxer.BoxerDrsParser
, nltk.sem.boxer.BoxerOutputDrsParser
to their types.
Parameters | |
type | bool should type checking be performed? |
overridden in
nltk.sem.boxer.BoxerDrsParser
, nltk.sem.boxer.BoxerOutputDrsParser
This method exists to be overridden
overrides
nltk.sem.logic.LogicParser.handle
overridden in
nltk.sem.boxer.BoxerDrsParser
, nltk.sem.boxer.BoxerOutputDrsParser
This method is intended to be overridden for logics that use different operators or expressions
This method serves as a hook for other logic parsers that have different equality expression classes