Module Expr Str ImportFrom alias Import alias Import alias TryExcept body ImportFrom alias identifier handlers ExceptHandler type NameLoad body If CompareNotEq Call AttributeLoad NameLoad attr Str body Expr Call AttributeLoad NameLoad attr Str ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr BinOpMult Num Call AttributeLoad NameLoad attr decorator_list AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareLtE Call NameLoad NameLoad Call NameLoad NameLoad body Assign NameStore NameLoad Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore IfExp CompareGt BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num BinOpSub SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Num Assign NameStore BinOpAdd NameLoad Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Slice NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr If CompareGt NameLoad Num body Return Num orelse Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr BinOpMult Num Call NameLoad NameLoad decorator_list AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad attr Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad If NameLoad body Return Call NameLoad NameLoad NameLoad orelse Return Call NameLoad NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call NameLoad Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad Str attr Call NameLoad NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore NameLoad orelse Assign NameStore NameLoad Assign NameStore ListLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad Return Call NameLoad NameLoad decorator_list AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Return Num Assign NameStore NameLoad Assign NameStore Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad Call NameLoad Call NameLoad NameLoad Call NameLoad NameLoad If CompareLt NameLoad Num body Assign NameStore NameLoad If CompareGt NameLoad Num body Assign NameStore Num If NameLoad body Assign NameStore BinOpMult Call NameLoad NameLoad NameLoad NameLoad Assign NameStore BinOpMult BinOpMult Call NameLoad NameLoad NameLoad keyword NameLoad NameLoad NameLoad Assign NameStore BinOpMult BinOpMult Call NameLoad NameLoad NameLoad keyword NameLoad NameLoad NameLoad Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad NameLoad orelse Assign NameStore BinOpMult Call NameLoad NameLoad NameLoad keyword NameLoad NameLoad Assign NameStore BinOpMult Call NameLoad NameLoad NameLoad keyword NameLoad NameLoad Return Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return Call NameLoad NameLoad NameLoad keyword NameLoad decorator_list
N/A N/A 
fuzz.py

Copyright (c) 2011 Adam Cohen

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 __future__ unicode_literals N/A platform N/A warnings N/A N/A StringMatcher StringMatcher SequenceMatcher N/A N/A N/A ImportError N/A N/A N/A N/A N/A platform python_implementation PyPy N/A N/A N/A N/A warnings warn Using slow pure-python SequenceMatcher. Install python-Levenshtein to remove this warning difflib SequenceMatcher N/A utils ratio N/A N/A s1 s2 N/A N/A N/A N/A s1 s2 N/A N/A utils make_type_consistent s1 s2 N/A m N/A SequenceMatcher None s1 s2 N/A N/A N/A utils intr N/A 100 N/A N/A m ratio N/A N/A utils check_for_none N/A utils check_empty_string partial_ratio N/A N/A s1 s2 N/A N/A N/A "Return the ratio of the most similar substring
    as a number between 0 and 100. N/A N/A s1 s2 N/A N/A utils make_type_consistent s1 s2 N/A N/A N/A len s1 N/A len s2 N/A N/A shorter s1 N/A longer s2 N/A N/A shorter s2 N/A longer s1 N/A m N/A SequenceMatcher None shorter longer N/A blocks N/A N/A m get_matching_blocks N/A scores N/A N/A block blocks N/A N/A long_start N/A N/A N/A N/A block N/A 1 N/A block N/A 0 0 N/A N/A block N/A 1 N/A block N/A 0 0 N/A long_end N/A long_start N/A len shorter N/A long_substr N/A longer N/A long_start long_end N/A m2 N/A SequenceMatcher None shorter long_substr N/A r N/A N/A m2 ratio N/A N/A r 0.995 N/A N/A 100 N/A N/A N/A N/A scores append r N/A N/A N/A utils intr N/A 100 N/A max scores N/A N/A utils check_for_none N/A utils check_empty_string _process_and_sort N/A N/A s force_ascii N/A N/A N/A Return a cleaned string with token sorted. N/A tokens N/A N/A N/A N/A utils full_process s force_ascii force_ascii split N/A sorted_string N/A N/A join N/A sorted tokens N/A N/A N/A sorted_string strip N/A _token_sort N/A N/A s1 s2 partial force_ascii N/A True True N/A N/A sorted1 N/A _process_and_sort s1 force_ascii N/A sorted2 N/A _process_and_sort s2 force_ascii N/A partial N/A N/A N/A partial_ratio sorted1 sorted2 N/A N/A N/A ratio sorted1 sorted2 N/A N/A utils check_for_none token_sort_ratio N/A N/A s1 s2 force_ascii N/A True N/A N/A Return a measure of the sequences' similarity between 0 and 100
    but sorting the token before comparing.
     N/A N/A _token_sort s1 s2 partial False force_ascii force_ascii N/A partial_token_sort_ratio N/A N/A s1 s2 force_ascii N/A True N/A N/A Return the ratio of the most similar substring as a number between
    0 and 100 but sorting the token before comparing.
     N/A N/A _token_sort s1 s2 partial True force_ascii force_ascii N/A _token_set N/A N/A s1 s2 partial force_ascii N/A True True N/A N/A Find all alphanumeric tokens in each string...
        - treat them as a set
        - construct two strings of the form:
            <sorted_intersection><sorted_remainder>
        - take ratios of those two strings
        - controls for unordered partial matches N/A p1 N/A N/A utils full_process s1 force_ascii force_ascii N/A p2 N/A N/A utils full_process s2 force_ascii force_ascii N/A N/A N/A N/A utils validate_string p1 N/A N/A 0 N/A N/A N/A N/A utils validate_string p2 N/A N/A 0 N/A tokens1 N/A set N/A N/A N/A N/A utils full_process p1 split N/A tokens2 N/A set N/A N/A N/A N/A utils full_process p2 split N/A intersection N/A N/A tokens1 intersection tokens2 N/A diff1to2 N/A N/A tokens1 difference tokens2 N/A diff2to1 N/A N/A tokens2 difference tokens1 N/A sorted_sect N/A N/A join N/A sorted intersection N/A sorted_1to2 N/A N/A join N/A sorted diff1to2 N/A sorted_2to1 N/A N/A join N/A sorted diff2to1 N/A combined_1to2 N/A N/A sorted_sect sorted_1to2 N/A combined_2to1 N/A N/A sorted_sect sorted_2to1 N/A sorted_sect N/A N/A sorted_sect strip N/A combined_1to2 N/A N/A combined_1to2 strip N/A combined_2to1 N/A N/A combined_2to1 strip N/A partial N/A N/A ratio_func partial_ratio N/A N/A ratio_func ratio N/A pairwise N/A N/A ratio_func sorted_sect combined_1to2 N/A ratio_func sorted_sect combined_2to1 N/A ratio_func combined_1to2 combined_2to1 N/A N/A max pairwise N/A N/A utils check_for_none token_set_ratio N/A N/A s1 s2 force_ascii N/A True N/A N/A N/A _token_set s1 s2 partial False force_ascii force_ascii N/A partial_token_set_ratio N/A N/A s1 s2 force_ascii N/A True N/A N/A N/A _token_set s1 s2 partial True force_ascii force_ascii N/A QRatio N/A N/A s1 s2 force_ascii N/A True N/A N/A p1 N/A N/A utils full_process s1 force_ascii force_ascii N/A p2 N/A N/A utils full_process s2 force_ascii force_ascii N/A N/A N/A N/A utils validate_string p1 N/A N/A 0 N/A N/A N/A N/A utils validate_string p2 N/A N/A 0 N/A N/A ratio p1 p2 N/A UQRatio N/A N/A s1 s2 N/A N/A N/A N/A QRatio s1 s2 force_ascii False N/A WRatio N/A N/A s1 s2 force_ascii N/A True N/A N/A Return a measure of the sequences' similarity between 0 and 100,
    using different algorithms.
     N/A p1 N/A N/A utils full_process s1 force_ascii force_ascii N/A p2 N/A N/A utils full_process s2 force_ascii force_ascii N/A N/A N/A N/A utils validate_string p1 N/A N/A 0 N/A N/A N/A N/A utils validate_string p2 N/A N/A 0 N/A try_partial True N/A unbase_scale 0.95 N/A partial_scale 0.9 N/A base N/A ratio p1 p2 N/A len_ratio N/A N/A float N/A max N/A len p1 N/A len p2 N/A min N/A len p1 N/A len p2 N/A N/A len_ratio 1.5 N/A N/A try_partial False N/A N/A len_ratio 8 N/A N/A partial_scale 0.6 N/A try_partial N/A N/A partial N/A N/A partial_ratio p1 p2 partial_scale N/A ptsor N/A N/A N/A partial_token_sort_ratio p1 p2 force_ascii force_ascii unbase_scale partial_scale N/A ptser N/A N/A N/A partial_token_set_ratio p1 p2 force_ascii force_ascii unbase_scale partial_scale N/A N/A N/A utils intr N/A max base partial ptsor ptser N/A N/A tsor N/A N/A token_sort_ratio p1 p2 force_ascii force_ascii unbase_scale N/A tser N/A N/A token_set_ratio p1 p2 force_ascii force_ascii unbase_scale N/A N/A N/A utils intr N/A max base tsor tser N/A UWRatio N/A N/A s1 s2 N/A N/A N/A Return a measure of the sequences' similarity between 0 and 100,
    using different algorithms. Same as WRatio but preserving unicode.
     N/A N/A WRatio s1 s2 force_ascii False N/A