segram.nlp.backend.rulebased.lang.en.grammar.components module
- class segram.nlp.backend.rulebased.lang.en.grammar.components.RulebasedEnglishComponent(*args: Any, **kwds: Any)[source]
Bases:
RulebasedEnglishGrammar,EnglishComponent,ComponentNLPRule-based English
spacygrammar component.All grammar classes must be defined as slots classes. This is necessary for ensuring low-memory footprint and better computational efficiency. Even classes with no new slots need to declare
__slots__ = (). This requirement is checked during class construction. Other class-specific requirements of this sort as well as their related validation checks may be implemented on specialized grammar classes using the standard__init_subclass__interface. This allows abstract base classes further down the inheritance chain to check for more complex requirements as well as apply dynamic class customizations.- get_dep(parent: EnglishComponent) Dep | None[source]
Get dependency between
selfandparent.
- class segram.nlp.backend.rulebased.lang.en.grammar.components.RulebasedEnglishVerb(*args: Any, **kwds: Any)[source]
Bases:
RulebasedEnglishComponent,EnglishVerbRule-based English
spacyverb component.All grammar classes must be defined as slots classes. This is necessary for ensuring low-memory footprint and better computational efficiency. Even classes with no new slots need to declare
__slots__ = (). This requirement is checked during class construction. Other class-specific requirements of this sort as well as their related validation checks may be implemented on specialized grammar classes using the standard__init_subclass__interface. This allows abstract base classes further down the inheritance chain to check for more complex requirements as well as apply dynamic class customizations.- classmethod get_tense(verb: EnglishVerb) Tense[source]
Get tense of
verb.
- classmethod get_modal(verb: EnglishVerb) Tense[source]
Get modality of
verb.
- classmethod get_mood(verb: EnglishVerb) Mood[source]
Get mood of
verb.
- class segram.nlp.backend.rulebased.lang.en.grammar.components.RulebasedEnglishNoun(*args: Any, **kwds: Any)[source]
Bases:
RulebasedEnglishComponent,EnglishNounRule-based English
spacynoun component.All grammar classes must be defined as slots classes. This is necessary for ensuring low-memory footprint and better computational efficiency. Even classes with no new slots need to declare
__slots__ = (). This requirement is checked during class construction. Other class-specific requirements of this sort as well as their related validation checks may be implemented on specialized grammar classes using the standard__init_subclass__interface. This allows abstract base classes further down the inheritance chain to check for more complex requirements as well as apply dynamic class customizations.
- class segram.nlp.backend.rulebased.lang.en.grammar.components.RulebasedEnglishPrep(*args: Any, **kwds: Any)[source]
Bases:
RulebasedEnglishComponent,EnglishPrepRule-based English
spacypreposition component.All grammar classes must be defined as slots classes. This is necessary for ensuring low-memory footprint and better computational efficiency. Even classes with no new slots need to declare
__slots__ = (). This requirement is checked during class construction. Other class-specific requirements of this sort as well as their related validation checks may be implemented on specialized grammar classes using the standard__init_subclass__interface. This allows abstract base classes further down the inheritance chain to check for more complex requirements as well as apply dynamic class customizations.
- class segram.nlp.backend.rulebased.lang.en.grammar.components.RulebasedEnglishDesc(*args: Any, **kwds: Any)[source]
Bases:
RulebasedEnglishComponent,EnglishDescRule-based English
spacydescription component.All grammar classes must be defined as slots classes. This is necessary for ensuring low-memory footprint and better computational efficiency. Even classes with no new slots need to declare
__slots__ = (). This requirement is checked during class construction. Other class-specific requirements of this sort as well as their related validation checks may be implemented on specialized grammar classes using the standard__init_subclass__interface. This allows abstract base classes further down the inheritance chain to check for more complex requirements as well as apply dynamic class customizations.- classmethod find_det(tok: EnglishDesc) Token | None[source]
Find determiner token.