def search(self, subsequence, sequence, max_subs):
     return [
         get_best_match_in_group(group) for group in group_matches(
             c_fnm_generic_ngrams(
                 subsequence, sequence,
                 LevenshteinSearchParams(max_subs, 0, 0, max_subs)))
     ]
Ejemplo n.º 2
0
 def search(self, subsequence, sequence, max_subs):
     if max_subs >= len(subsequence):
         self.skipTest("avoiding calling c_fnm_generic_ngrams() " +
                       "with max_subs >= len(subsequence)")
     return [
         get_best_match_in_group(group) for group in group_matches(
             c_fnm_generic_ngrams(
                 subsequence, sequence,
                 LevenshteinSearchParams(max_subs, 0, 0, max_subs)))
     ]
 def search(self, subsequence, sequence, max_subs):
     if max_subs >= len(subsequence):
         self.skipTest("avoiding calling c_fnm_generic_ngrams() " +
                       "with max_subs >= len(subsequence)")
     return [
         get_best_match_in_group(group)
         for group in group_matches(
             c_fnm_generic_ngrams(subsequence,
                                  sequence,
                                  LevenshteinSearchParams(max_subs, 0, 0, max_subs))
         )
 ]
 def search(self, pattern, sequence, max_subs, max_ins, max_dels,
            max_l_dist=None):
     return [
         get_best_match_in_group(group)
         for group in group_matches(
             c_fnm_generic_ngrams(pattern,
                                  sequence,
                                  LevenshteinSearchParams(
                                      max_subs, max_ins,
                                      max_dels, max_l_dist,
                                  ))
         )
     ]
 def search(self,
            pattern,
            sequence,
            max_subs,
            max_ins,
            max_dels,
            max_l_dist=None):
     return [
         get_best_match_in_group(group) for group in group_matches(
             c_fnm_generic_ngrams(
                 pattern, sequence,
                 LevenshteinSearchParams(
                     max_subs,
                     max_ins,
                     max_dels,
                     max_l_dist,
                 )))
     ]