Lines Matching refs:candidate
75 for (const grammar::Derivation& candidate : in GetAnnotations() local
78 if (!grammar::VerifyAssertions(candidate.match)) { in GetAnnotations()
81 if (!AddAnnotatedSpanFromMatch(text, candidate, annotations)) { in GetAnnotations()
180 for (const grammar::Derivation& candidate : candidates) { in GetOverlappingRuleMatches() local
183 if (!SpansOverlap(selection, candidate.match->codepoint_span)) { in GetOverlappingRuleMatches()
190 candidate.match, in GetOverlappingRuleMatches()
191 model_->rule_classification_result()->Get(candidate.rule_id)); in GetOverlappingRuleMatches()
196 result.push_back(candidate); in GetOverlappingRuleMatches()
209 for (const grammar::Derivation& candidate : candidates) { in GetBestValidInterpretation() local
210 if (!grammar::VerifyAssertions(candidate.match)) { in GetBestValidInterpretation()
215 model_->rule_classification_result()->Get(candidate.rule_id); in GetBestValidInterpretation()
220 best_match = candidate.match; in GetBestValidInterpretation()
238 const grammar::Derivation& candidate, in AddAnnotatedSpanFromMatch() argument
240 if (candidate.rule_id < 0 || in AddAnnotatedSpanFromMatch()
241 candidate.rule_id >= model_->rule_classification_result()->size()) { in AddAnnotatedSpanFromMatch()
246 model_->rule_classification_result()->Get(candidate.rule_id); in AddAnnotatedSpanFromMatch()
249 text, interpretation, candidate.match, &result->back()); in AddAnnotatedSpanFromMatch()