Module patterns

Source
Expand description

Patterns are one of the more powerful ways to query text inside Harper, especially for beginners.

Through the PatternLinter trait, they make it much easier to build Harper rules.

See the page about [SequencePattern] for a concrete example of their use.

Structs§

AnyPattern
Matches any single token.
ImpliesQuantity
This struct does two things.
IndefiniteArticle
InflectionOfBe
Matches any inflection of the verb “be”: am, is, are, was, were, be, been, being.
Invert
A struct that matches any pattern except the one provided.
NominalPhrase
UPOSSet
WhitespacePattern
WithinEditDistance
Matches single words within a certain edit distance of a given word.
Word
Matches a predefined word.
WordSet
A super::Pattern that matches against any of a set of provided words. For small sets of short words, it doesn’t allocate.

Traits§

DocPattern
Pattern
PatternExt
SingleTokenPattern
A simpler version of the Pattern trait that only matches a single token.