fuzzy_search package
Subpackages
- fuzzy_search.analysis package
- Submodules
- fuzzy_search.analysis.freq module
NgramNgramFreqNgramFreq.ngram_freqNgramFreq.max_ngram_sizeNgramFreq.total_ngram_tokensNgramFreq.total_ngram_typesNgramFreq.num_docsNgramFreq.start_tokensNgramFreq.end_tokensNgramFreq.__init__()NgramFreq.count_ngrams()NgramFreq.has_conditional_prob()NgramFreq.has_freq()NgramFreq.has_prob()NgramFreq.total_tokens()NgramFreq.total_types()NgramFreq.vocab_size
check_lambdas()compute_expected()compute_llr()compute_llr_from_observed()compute_percentage_diff()doc_to_string_tokens()get_observed_from_counter()make_token_ngrams()
- fuzzy_search.analysis.similarity module
- fuzzy_search.analysis.spelling_compare module
ChangeDiffSpellingCompareSpellingCompare.word_freq1SpellingCompare.word_freq2SpellingCompare.embeddingsSpellingCompare.total1SpellingCompare.total2SpellingCompare.word_frac1SpellingCompare.word_frac2SpellingCompare.__init__()SpellingCompare.compute_percentage_diff()SpellingCompare.get_frequency_change_words()SpellingCompare.get_high_frequency_words()
sort_drop_jump()
- fuzzy_search.analysis.subtoken module
BPETokenFrequencyTrackercompare_token_symbol_pairs()find_new_symbol_pairs()generate_corpus_symbol_pairs()generate_symbol_pairs()generate_vocab()index_symbol_pair()make_byte_pair_encoding()make_symbol_pair_freq()merge_symbols_in_token()merge_symbols_in_tokens()prune_symbol_pair_freq()string_tokens_to_corpus()
- Module contents
- fuzzy_search.match package
- Submodules
- fuzzy_search.match.candidate_match module
- fuzzy_search.match.exact_match module
- fuzzy_search.match.match_offsets module
- fuzzy_search.match.phrase_match module
MatchTypePhraseMatchPhraseMatch.__init__()PhraseMatch.add_scores()PhraseMatch.as_web_anno()PhraseMatch.character_overlapPhraseMatch.from_json()PhraseMatch.has_label()PhraseMatch.json()PhraseMatch.label_listPhraseMatch.levenshtein_similarityPhraseMatch.ngram_overlapPhraseMatch.overlaps()PhraseMatch.score_character_overlap()PhraseMatch.score_levenshtein_similarity()PhraseMatch.score_ngram_overlap()PhraseMatch.skipgram_overlap
PhraseMatchInContextphrase_match_from_json()validate_match_props()
- fuzzy_search.match.skip_match module
- Module contents
- fuzzy_search.pattern package
- Submodules
- fuzzy_search.pattern.fuzzy_patterns module
- fuzzy_search.pattern.fuzzy_template module
FuzzyTemplateFuzzyTemplate.__init__()FuzzyTemplate.get_element()FuzzyTemplate.get_elements_by_cardinality()FuzzyTemplate.get_label_phrases()FuzzyTemplate.get_labels_by_cardinality()FuzzyTemplate.get_required_elements()FuzzyTemplate.get_required_labels()FuzzyTemplate.has_group()FuzzyTemplate.has_label()FuzzyTemplate.parse_group_element()FuzzyTemplate.parse_label_element()FuzzyTemplate.register_template()
FuzzyTemplateElementFuzzyTemplateGroupElementFuzzyTemplateLabelElementgenerate_group_from_json()generate_label_from_json()validate_element_properties()
- Module contents
- fuzzy_search.phrase package
- Submodules
- fuzzy_search.phrase.phrase module
- fuzzy_search.phrase.phrase_model module
PhraseModelPhraseModel.__init__()PhraseModel.add_custom()PhraseModel.add_distractor()PhraseModel.add_distractors()PhraseModel.add_labels()PhraseModel.add_model()PhraseModel.add_phrase()PhraseModel.add_phrases()PhraseModel.add_variant()PhraseModel.add_variants()PhraseModel.get()PhraseModel.get_labels()PhraseModel.get_phrase()PhraseModel.get_phrases()PhraseModel.get_phrases_by_max_length()PhraseModel.get_variants()PhraseModel.has_custom()PhraseModel.has_label()PhraseModel.has_phrase()PhraseModel.has_token()PhraseModel.is_label()PhraseModel.jsonPhraseModel.remove_custom()PhraseModel.remove_distractor()PhraseModel.remove_distractors()PhraseModel.remove_labels()PhraseModel.remove_phrase()PhraseModel.remove_phrases()PhraseModel.remove_variant()PhraseModel.remove_variants()PhraseModel.set_phrase_token_max_end_offsets()PhraseModel.set_phrase_token_max_start_offsets()PhraseModel.variant_of()PhraseModel.variants()
as_phrase_object()is_phrase_dict()
- Module contents
- fuzzy_search.search package
- Submodules
- fuzzy_search.search.config module
- fuzzy_search.search.context_searcher module
- fuzzy_search.search.phrase_searcher module
- fuzzy_search.search.searcher module
- fuzzy_search.search.template_searcher module
FuzzyTemplateSearcherTemplateMatchfind_next_element_end_index()find_next_element_start_index()find_next_group_match_sequence()find_next_ordered_group_match_sequence()find_next_unordered_group_match_sequence()get_phrase_match_list_labels()get_sequence_label_element_matches()has_required_matches()initialize_sequence()share_label()
- fuzzy_search.search.token_searcher module
FuzzyTokenSearcherFuzzyTokenSearcher.__init__()FuzzyTokenSearcher.add_vocabulary()FuzzyTokenSearcher.add_vocabulary_skipgram_matches()FuzzyTokenSearcher.configure()FuzzyTokenSearcher.find_matches()FuzzyTokenSearcher.find_skipgram_token_matches_for_token()FuzzyTokenSearcher.find_skipgram_token_matches_in_text()FuzzyTokenSearcher.find_vocabulary_text_phrase_term_pairs()FuzzyTokenSearcher.has_distractor_pair()FuzzyTokenSearcher.has_match_pair()FuzzyTokenSearcher.has_text_phrase_term_pair()FuzzyTokenSearcher.index_distractor_pair()FuzzyTokenSearcher.index_phrase_token_skipgrams()FuzzyTokenSearcher.index_text_phrase_term_pair()FuzzyTokenSearcher.index_text_phrase_term_pairs()FuzzyTokenSearcher.terms_to_id_tuple()FuzzyTokenSearcher.terms_to_string()FuzzyTokenSearcher.terms_to_tuple()
PartialPhraseMatchTokenMatchcopy_partial_match()get_partial_phrases()get_text_string()get_text_tokens()get_token_skip_match_type()get_token_skip_match_types()get_token_skipgram_matches()get_tokenized_doc()get_vocabulary_skipgram_matches()has_max_end_offset()has_max_start_offset()is_distractor()map_text_tokens_to_phrase_tokens()token_is_out_of_phrase_range()token_within_phrase_offset()
- Module contents
- fuzzy_search.tokenization package
- Submodules
- fuzzy_search.tokenization.string module
SkipGramget_non_word_prefix()get_non_word_suffix()insert_skips()make_ngrams()score_char_overlap()score_char_overlap_ratio()score_levenshtein_distance()score_levenshtein_similarity_ratio()score_ngram_overlap()score_ngram_overlap_ratio()strip_prefix()strip_suffix()text2skipgrams()token2skipgrams()
- fuzzy_search.tokenization.token module
- fuzzy_search.tokenization.vocabulary module
- Module contents
Module contents
fuzzy_search: a library for fuzzy phrase search in noisy and historical text.
Re-exports the most commonly used public classes (FuzzyPhraseSearcher,
FuzzyTokenSearcher, PhraseMatch, PhraseModel, default_config) and
provides the make_searcher convenience function for building a phrase searcher
from a list of phrases and a config.
- fuzzy_search.make_searcher(phrases: any, config)[source]
Builds a FuzzyPhraseSearcher for a given list of phrases and configuration.
- Parameters:
phrases (any) – The phrases to search for, as accepted by
PhraseModel.config – A configuration object/dict for the phrase model and searcher.
- Returns:
A searcher configured with the built phrase model.
- Return type: