MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / _set_continuous

Method _set_continuous

src/licensedcode/models.py:2344–2355  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 """

Callers 1

tokensMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected