segram.nlp.backend.rulebased.lang.en.grammar.sent module

class segram.nlp.backend.rulebased.lang.en.grammar.sent.RulebasedEnglishSent(*args: Any, **kwds: Any)[source]

Bases: RulebasedEnglishGrammar, EnglishSent, SentNLP

Rule-based spacy English sentence element.

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.

Find phrase links.

Yields:
  • parent – Parent phrase.

  • child – Child phrase.

find_conjs() Iterable[Conjuncts][source]

Iterate over groups of conjoined comps.

add_subs() None[source]

Add free subtree tokens to components.