concepts.language.ccg.grammar.Lexicon#

class Lexicon[source]#

Bases: object

The data structure for lexicon entries.

Methods

Attributes

syntax

The syntax of the lexicon entry.

semantics

The semantics of the lexicon entry.

weight

The weight of the lexicon entry.

extra

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)#
extra: Any | None#

The extra information stored at the lexicon entry.

semantics: CCGSemantics | None#

The semantics of the lexicon entry.

syntax: CCGSyntaxType | None#

The syntax of the lexicon entry.

weight: float#

The weight of the lexicon entry.