concepts.language.neural_ccg.grammar.gen_used_lexicon_entries#

gen_used_lexicon_entries(parsings)[source]#

Generate a dictionary of used lexicon entries from a list of parsing results. The result is a mapping from words to lexicon entry indices.

Parameters:

parsings (Iterable[NeuralCCGNode]) – a list of parsing results.

Returns:

A dictionary of used lexicon entries.

Return type:

Dict[str, Set[int]]