Skip to main content

matches

Function matches 

Source
pub fn matches(token: &str, label: &str) -> bool
Expand description

Whether token is a spelling of label.

Matching ignores surrounding whitespace and letter case, because a tokeniser may hand back " A" where another hands back "A", and a model may answer in lower case. Callers fold every matching token together rather than picking one.