Utility functions for batch-processing sentences: parsing and
extraction of the semantic representation of the root node of the the
syntax tree, followed by evaluation of the semantic representation in a
first-order model.
|
text_parse(inputs,
grammar,
trace=0)
Convert input sentences into syntactic trees. |
source code
|
|
|
root_node(syntree,
start=' S ' )
Find the root node in a syntactic tree. |
source code
|
|
|
semrep(node,
beta_reduce=True)
Find the semantic representation at a given tree node. |
source code
|
|
|
root_semrep(syntree,
beta_reduce=True,
start=' S ' )
Find the semantic representation at the root of a tree. |
source code
|
|
|
text_interpret(inputs,
grammar,
beta_reduce=True,
start=' S ' ,
syntrace=0)
Add the semantic representation to each syntactic parse tree of each
input sentence. |
source code
|
|
|
text_evaluate(inputs,
grammar,
model,
assignment,
semtrace=0)
Add the truth-in-a-model value to each semantic representation for
each syntactic parse of each input sentences. |
source code
|
|