Set the "is_continuous" flag if this rule must be matched exactly without gaps, stopwords or unknown words. Must run after required_phrase_spans computation.
(self)
| 2342 | return toks |
| 2343 | |
| 2344 | def _set_continuous(self): |
| 2345 | """ |
| 2346 | Set the "is_continuous" flag if this rule must be matched exactly without gaps, stopwords or |
| 2347 | unknown words. Must run after required_phrase_spans computation. |
| 2348 | """ |
| 2349 | if ( |
| 2350 | not self.is_continuous |
| 2351 | and self.required_phrase_spans |
| 2352 | and len(self.required_phrase_spans) == 1 |
| 2353 | and len(self.required_phrase_spans[0]) == self.length |
| 2354 | ): |
| 2355 | self.is_continuous = True |
| 2356 | |
| 2357 | def build_required_phrase_spans(self): |
| 2358 | """ |