nltk.sem.read_logic¶
- nltk.sem.read_logic(s, logic_parser=None, encoding=None)[source]¶
Convert a file of First Order Formulas into a list of {Expression}s.
- Parameters
s (str) – the contents of the file
logic_parser (LogicParser) – The parser to be used to parse the logical expression
encoding (str) – the encoding of the input string, if it is binary
- Returns
a list of parsed formulas.
- Return type
list(Expression)