nltk.root_semrep()

nltk.root_semrep(syntree, semkey=u'SEM')[source]

Find the semantic representation at the root of a tree.

Parameters:
  • syntree – a parse Tree
  • semkey – the feature label to use for the root semantics in the tree
Returns:

the semantic representation at the root of a Tree

Return type:

sem.Expression