concepts.language.ccg.grammar.Lexicon#
- class Lexicon[source]#
Bases:
object
The data structure for lexicon entries.
Methods
Attributes
The syntax of the lexicon entry.
The semantics of the lexicon entry.
The weight of the lexicon entry.
The extra information stored at the lexicon entry.
- __init__(syntax, semantics, weight=0, extra=None)[source]#
Initialize the lexicon entry.
- Parameters:
syntax (CCGSyntaxType | None) – the syntax of the lexicon entry.
semantics (CCGSemantics | None) – the semantics of the lexicon entry.
weight (float) – the weight of the lexicon entry.
extra (Any | None) – the extra information stored at the lexicon entry. If not None, this will be a tuple of (word, word_index, lexicon_entry_index).
- __new__(**kwargs)#
- semantics: CCGSemantics | None#
The semantics of the lexicon entry.
- syntax: CCGSyntaxType | None#
The syntax of the lexicon entry.