english-pos-tagger
Part-of-speech tagging and lemmatization of English text.
The tagger assigns Penn-Treebank-style POS tags and adds base-form lemmas for nouns (excluding proper nouns), verbs, and adjectives. It runs a unigram pass for candidate tags, rewrites tags with ordered context rules that read neighboring tokens, then lemmatizes. Tagging is deterministic and needs no I/O.
Installation
[]
= "0.1"
Usage
Tag a sentence:
use Tagger;
let tagger = new;
let tokens = tagger.tag_sentence;
assert_eq!;
assert_eq!;
assert_eq!;
Tag pre-tokenized input with tag, raw strings with tag_raw_tokens, and
extend the lexicon with update_lexicon. Each key normalizes before storage,
and each value lists candidate tags with the most frequent first.
use Tagger;
let mut tagger = new;
tagger.update_lexicon;
Token fields
Each token carries value and tag from tokenization. Tagging fills normal
and pos, and adds lemma for nouns, verbs, adjectives, and contraction forms.
entity_type carries through from named-entity input.
License
Licensed under the MIT license.