Expand description
Configurable feature templates for sequence labeling models.
Provides SeqFeatureTemplate for specifying what observations and labels
each model sees, plus extraction functions used by both averaged perceptron
and HMM models.
Structs§
- Feature
Buffer - A reusable buffer for building feature strings.
- SeqFeature
Config - Validated collection of feature templates with pre-computed metadata.
- SeqFeature
Template - A single feature template for sequence labeling.
Enums§
- SeqTransform
- Transform applied to observation strings.
Constants§
- END
- Sentinel strings for positions after the end of a sequence.
- START
- Sentinel strings for positions before the start of a sequence.
Functions§
- default_
segmenter_ ap_ features - Default features for the wordseg averaged perceptron.
- default_
segmenter_ hmm_ features - Default features for the wordseg HMM.
- default_
tagger_ ap_ features - Default features for the tagging averaged perceptron.
- default_
tagger_ hmm_ features - Default features for the tagging HMM.
- extract_
features - Extract AP features into
buffor positioni. - extract_
observation - Extract a single observation string for an HMM feature template at position
i. - extract_
observation_ cow - Like
extract_observation, but returnsCow::Borrowedwhen possible (single-position templates) to avoid heap allocation. - final_
char - Get the final character of a string, or an empty string if empty.
- first_
char - Get the first character of a string, or an empty string if empty.
- validate_
templates - Validate a list of feature templates.