harper_pos_utils/chunker/mod.rs
1use crate::UPOS;
2
3mod brill_chunker;
4#[cfg(feature = "training")]
5mod np_extraction;
6mod upos_freq_dict;
7
8pub use brill_chunker::BrillChunker;
9pub use upos_freq_dict::UPOSFreqDict;
10
11/// An implementer of this trait is capable of identifying the noun phrases in a provided sentence.
12pub trait Chunker {
13 /// Iterate over the sentence, identifying the noun phrases contained within.
14 /// A token marked `true` is a component of a noun phrase.
15 /// A token marked `false` is not.
16 fn chunk_sentence(&self, sentence: &[String], tags: &[Option<UPOS>]) -> Vec<bool>;
17}