nltk.ccg.CCGLexicon

class nltk.ccg.CCGLexicon[source]

Bases: object

Class representing a lexicon for CCG grammars.

  • primitives: The list of primitive categories for the lexicon

  • families: Families of categories

  • entries: A mapping of words to possible categories

__init__(start, primitives, families, entries)[source]
categories(word)[source]

Returns all the possible categories for a word

start()[source]

Return the target category for the parser