PhrasePatternConfig class

Configuration for building one phrase from a template and semantic slots.

Constructors

PhrasePatternConfig({required String id, required String template, Map<String, String>? semanticSlots, Map<String, String>? slotCategories, String? adverbKey, List<String> structureVariants = const []})
Creates a phrase pattern.
const

Properties

adverbKey String?
Optional adverb lemma inserted as {adverb} when set.
final
allStructureTemplates List<String>
Primary template followed by structureVariants.
no setter
hashCode int
The hash code for this object.
no setterinherited
id String
Stable pattern id (used in source document ids).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticSlots Map<String, String>
Slot name → lexicon lemma key (fixed words).
final
slotCategories Map<String, String>
Slot name → WordCategoryBank category (filled at generation time).
final
structureCount int
Number of structural templates including the primary template.
no setter
structureVariants List<String>
Alternate templates with the same slots and meaning.
final
template String
Template with {slot} placeholders, e.g. {subject} {verb} {object}.
final
usesCategories bool
Whether this pattern uses category-driven slots.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolveSemanticKeys({WordCategoryBank? categories, int pickIndex = 0}) Map<String, String>
Lemma key per slot (explicit or category-picked).
resolveSlots(TextLexicon lexicon, {WordCategoryBank? categories, int pickIndex = 0}) Map<String, String>
Builds surface slot values from lexicon (canonical forms).
semanticKeyMap({WordCategoryBank? categories, int pickIndex = 0}) Map<String, String>
Semantic keys including optional adverb.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited