1Metadata-Version: 1.1
2Name: fuzzywuzzy
3Version: 0.15.1
4Summary: Fuzzy string matching in python
5Home-page: https://github.com/seatgeek/fuzzywuzzy
6Author: Adam Cohen
7Author-email: adam@seatgeek.com
8License: GPL
9Description: .. image:: https://travis-ci.org/seatgeek/fuzzywuzzy.svg?branch=master
10            :target: https://travis-ci.org/seatgeek/fuzzywuzzy
11
12        FuzzyWuzzy
13        ==========
14
15        Fuzzy string matching like a boss. It uses `Levenshtein Distance <https://en.wikipedia.org/wiki/Levenshtein_distance>`_ to calculate the differences between sequences in a simple-to-use package.
16
17        Requirements
18        ============
19
20        -  Python 2.4 or higher
21        -  difflib
22        -  `python-Levenshtein <https://github.com/ztane/python-Levenshtein/>`_ (optional, provides a 4-10x speedup in String
23           Matching, though may result in `differing results for certain cases <https://github.com/seatgeek/fuzzywuzzy/issues/128>`_)
24
25        Installation
26        ============
27
28        Using PIP via PyPI
29
30        .. code:: bash
31
32            pip install fuzzywuzzy
33
34        or the following to install `python-Levenshtein` too
35
36        .. code:: bash
37
38            pip install fuzzywuzzy[speedup]
39
40
41        Using PIP via Github
42
43        .. code:: bash
44
45            pip install git+git://github.com/seatgeek/fuzzywuzzy.git@0.15.1#egg=fuzzywuzzy
46
47        Adding to your ``requirements.txt`` file (run ``pip install -r requirements.txt`` afterwards)
48
49        .. code:: bash
50
51            git+ssh://git@github.com/seatgeek/fuzzywuzzy.git@0.15.1#egg=fuzzywuzzy
52
53        Manually via GIT
54
55        .. code:: bash
56
57            git clone git://github.com/seatgeek/fuzzywuzzy.git fuzzywuzzy
58            cd fuzzywuzzy
59            python setup.py install
60
61
62        Usage
63        =====
64
65        .. code:: python
66
67            >>> from fuzzywuzzy import fuzz
68            >>> from fuzzywuzzy import process
69
70        Simple Ratio
71        ~~~~~~~~~~~~
72
73        .. code:: python
74
75            >>> fuzz.ratio("this is a test", "this is a test!")
76                97
77
78        Partial Ratio
79        ~~~~~~~~~~~~~
80
81        .. code:: python
82
83            >>> fuzz.partial_ratio("this is a test", "this is a test!")
84                100
85
86        Token Sort Ratio
87        ~~~~~~~~~~~~~~~~
88
89        .. code:: python
90
91            >>> fuzz.ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear")
92                91
93            >>> fuzz.token_sort_ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear")
94                100
95
96        Token Set Ratio
97        ~~~~~~~~~~~~~~~
98
99        .. code:: python
100
101            >>> fuzz.token_sort_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear")
102                84
103            >>> fuzz.token_set_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear")
104                100
105
106        Process
107        ~~~~~~~
108
109        .. code:: python
110
111            >>> choices = ["Atlanta Falcons", "New York Jets", "New York Giants", "Dallas Cowboys"]
112            >>> process.extract("new york jets", choices, limit=2)
113                [('New York Jets', 100), ('New York Giants', 78)]
114            >>> process.extractOne("cowboys", choices)
115                ("Dallas Cowboys", 90)
116
117        You can also pass additional parameters to ``extractOne`` method to make it use a specific scorer. A typical use case is to match file paths:
118
119        .. code:: python
120
121            >>> process.extractOne("System of a down - Hypnotize - Heroin", songs)
122                ('/music/library/good/System of a Down/2005 - Hypnotize/01 - Attack.mp3', 86)
123            >>> process.extractOne("System of a down - Hypnotize - Heroin", songs, scorer=fuzz.token_sort_ratio)
124                ("/music/library/good/System of a Down/2005 - Hypnotize/10 - She's Like Heroin.mp3", 61)
125
126        .. |Build Status| image:: https://api.travis-ci.org/seatgeek/fuzzywuzzy.png?branch=master
127           :target: https:travis-ci.org/seatgeek/fuzzywuzzy
128
129        Known Ports
130        ============
131
132        FuzzyWuzzy is being ported to other languages too! Here are a few ports we know about:
133
134        -  Java: `xpresso's fuzzywuzzy implementation <https://github.com/WantedTechnologies/xpresso/wiki/Approximate-string-comparison-and-pattern-matching-in-Java>`_
135        -  Java: `fuzzywuzzy (java port) <https://github.com/xdrop/fuzzywuzzy>`_
136        -  Rust: `fuzzyrusty (Rust port) <https://github.com/logannc/fuzzyrusty>`_
137        -  JavaScript: `fuzzball.js (JavaScript port) <https://github.com/nol13/fuzzball.js>`_
138
139Platform: UNKNOWN
140Classifier: Intended Audience :: Developers
141Classifier: Programming Language :: Python
142Classifier: Programming Language :: Python :: 2.6
143Classifier: Programming Language :: Python :: 2.7
144Classifier: Programming Language :: Python :: 3
145Classifier: Programming Language :: Python :: 3.3
146