obscenity / PhraseBuilder
Builder for phrases.
Name |
---|
MetadataType |
• new PhraseBuilder<MetadataType
>()
Name |
---|
MetadataType |
▸ addPattern(pattern
): PhraseBuilder
<MetadataType
>
Associates a pattern with this phrase.
Name | Type | Description |
---|---|---|
pattern |
ParsedPattern |
Pattern to add. |
PhraseBuilder
<MetadataType
>
▸ addWhitelistedTerm(term
): PhraseBuilder
<MetadataType
>
Associates a whitelisted pattern with this phrase.
Name | Type | Description |
---|---|---|
term |
string |
Whitelisted term to add. |
PhraseBuilder
<MetadataType
>
▸ build(): PhraseContainer
<MetadataType
>
Builds the phrase, returning a [[PhraseContainer]] for use with the [[DataSet]].
PhraseContainer
<MetadataType
>
▸ setMetadata(metadata?
): PhraseBuilder
<MetadataType
>
Associates some metadata with this phrase.
Name | Type | Description |
---|---|---|
metadata? |
MetadataType |
Metadata to use. |
PhraseBuilder
<MetadataType
>