nltk.inference.CfgReadingCommand

class nltk.inference.CfgReadingCommand[source]

Bases: ReadingCommand

__init__(gramfile=None)[source]
Parameters

gramfile (str) – name of file where grammar can be loaded

parse_to_readings(sentence)[source]
See

ReadingCommand.parse_to_readings()

combine_readings(readings)[source]
See

ReadingCommand.combine_readings()

to_fol(expression)[source]
See

ReadingCommand.to_fol()

process_thread(sentence_readings)[source]

This method should be used to handle dependencies between readings such as resolving anaphora.

Parameters

sentence_readings (list(Expression)) – readings to process

Returns

the list of readings after processing

Return type

list(Expression)