soton_corenlppy.re.logic_lib module

Logical proposition library

soton_corenlppy.re.logic_lib.compute_logical_proposition_from_relations(list_sent_trees, lex_verb, lex_entity, dict_openie_config=None)[source]

for each sent extract component patterns for relations found, and associated lexio-pos patterns

Parameters
  • list_sent_trees (list) – list of nltk.Tree representing the sents in that doc after pos annotation

  • lex_verb (dict) – dict of verb types, each with a set of TERMS

  • lex_entity (dict) – dict of entity types, each with a set of TERMS

  • dict_openie_config (dict) – config object returned from soton_corenlppy.re.openie_lib.get_openie_config()

Returns

dict of logical propositions and a frequency count = { (subject,predicate,object) : freq_in_corpus }

Return type

dict