コード例 #1
0
 def search(self, pattern, sequence, max_subs, max_ins, max_dels,
            max_l_dist=None):
     search_params = LevenshteinSearchParams(max_subs, max_ins,
                                             max_dels, max_l_dist)
     return list(
         fnm_generic_lp(pattern, sequence, search_params)
     )
コード例 #2
0
 def search(self, subsequence, sequence, max_l_dist):
     return [
         get_best_match_in_group(group) for group in group_matches(
             fnm_generic_lp(
                 subsequence, sequence,
                 LevenshteinSearchParams(max_l_dist, max_l_dist, max_l_dist,
                                         max_l_dist)))
     ]
コード例 #3
0
 def search(self, subsequence, sequence, max_subs):
     search_params = LevenshteinSearchParams(max_subs, 0, 0, max_subs)
     return list(fnm_generic_lp(subsequence, sequence, search_params))
コード例 #4
0
 def search(self, subsequence, sequence, max_l_dist):
     search_params = LevenshteinSearchParams(max_l_dist, max_l_dist,
                                             max_l_dist, max_l_dist)
     return consolidate_overlapping_matches(
         fnm_generic_lp(subsequence, sequence, search_params))
コード例 #5
0
 def search(self, subsequence, sequence, max_subs):
     search_params = LevenshteinSearchParams(max_subs, 0, 0, max_subs)
     return list(
         fnm_generic_lp(subsequence, sequence, search_params)
     )
コード例 #6
0
 def search(self, subsequence, sequence, max_l_dist):
     search_params = LevenshteinSearchParams(max_l_dist, max_l_dist,
                                             max_l_dist, max_l_dist)
     return consolidate_overlapping_matches(
         fnm_generic_lp(subsequence, sequence, search_params)
     )