@@ -1116,22 +1116,12 @@ function isPrefixedBatchInput(input: string): boolean {
11161116 return paragraphs . some ( ( p ) => PREFIX_TAG_REGEX . test ( p ) ) ;
11171117}
11181118
1119- // Stemmed set intersection — the D5 matcher shape for encode trigger-word
1120- // classification. Iterate the smaller set (canon vocab) and probe the larger
1121- // (runtime input stems) for O(min(|a|,|b|)) early exit. Mirrors the shape
1122- // used by evaluatePrerequisiteCheck in the P1.3.3 challenge evaluator.
1123- function intersectsStems ( vocab : Set < string > , input : Set < string > ) : boolean {
1124- for ( const s of vocab ) {
1125- if ( input . has ( s ) ) return true ;
1126- }
1127- return false ;
1128- }
1129-
11301119// Phrase-subset match — a phrase matches when ALL of its stems appear in the
1131- // input stem set. Short-circuits on the first phrase that matches. This is
1132- // the precision-preserving variant of intersectsStems for multi-word canon
1133- // vocab: single-stem phrases degenerate to set membership (identical to the
1134- // old single-token behavior), while multi-stem phrases like
1120+ // input stem set. Short-circuits on the first phrase that matches. The D5
1121+ // matcher shape for encode trigger-word classification, mirroring the shape
1122+ // used by evaluatePrerequisiteCheck in the P1.3.3 challenge evaluator:
1123+ // single-stem phrases degenerate to set membership (identical to the old
1124+ // single-token behavior), while multi-stem phrases like
11351125// `committed to` → ["committ","to"] require both stems to co-occur, so
11361126// ubiquitous function words cannot match on their own.
11371127function matchesStemmedPhrases ( phrases : string [ ] [ ] , input : Set < string > ) : boolean {
0 commit comments