class documentation
class BoxerOutputDrsParser(DrtParser): (source)
Constructor: BoxerOutputDrsParser(discourse_id)
Undocumented
Method | __init__ |
This class is used to parse the Prolog DRS output from Boxer into a hierarchy of python objects. |
Method | attempt |
Undocumented |
Method | get |
This method exists to be overridden |
Method | handle |
This method is intended to be overridden for logics that use different operators or expressions |
Method | handle |
Handle a DRS condition |
Method | handle |
Undocumented |
Method | parse |
Parse the expression. |
Method | parse |
Parse a DRS condition |
Method | parse |
Undocumented |
Method | parse |
Undocumented |
Method | parse |
Undocumented |
Instance Variable | discourse |
Undocumented |
Instance Variable | quote |
Undocumented |
Instance Variable | sentence |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _parse |
Undocumented |
Method | _sent |
No summary |
Inherited from DrtParser
:
Method | get_ |
This method serves as a hook for other logic parsers that have different boolean operators |
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
(via DrtParser
):
Method | __repr__ |
Undocumented |
Method | assert |
Undocumented |
Method | assert |
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 | 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 | 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.drt.DrtParser.__init__
This class is used to parse the Prolog DRS output from Boxer into a hierarchy of python objects.
overrides
nltk.sem.drt.DrtParser.handle
This method is intended to be overridden for logics that use different operators or expressions
overrides
nltk.sem.logic.LogicParser.parse
Parse the expression.
strings :returns: a parsed Expression
Parameters | |
data | str for the input to be parsed |
signature | dict<str, str> that maps variable names to type |