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

Method matchable_tokens

src/licensedcode/query.py:827–837  ·  view source on GitHub ↗

Return an iterable of matchable tokens tids for this query run. Return an empty list if there are no high matchable tokens. Return -1 for positions with non-matchable tokens.

(self)

Source from the content-addressed store, hash-verified

825 return self.low_matchables | self.high_matchables
826
827 def matchable_tokens(self):
828 """
829 Return an iterable of matchable tokens tids for this query run.
830 Return an empty list if there are no high matchable tokens.
831 Return -1 for positions with non-matchable tokens.
832 """
833 high_matchables = self.high_matchables
834 if not high_matchables:
835 return []
836 return (tid if pos in self.matchables else -1
837 for pos, tid in self.tokens_with_pos())
838
839 @property
840 def low_matchables(self):

Callers 3

compute_candidatesFunction · 0.80

Calls 1

tokens_with_posMethod · 0.95

Tested by 2