Skip to content

Commit

Permalink
update links
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann authored Dec 28, 2023
1 parent 491ab79 commit b8f5d99
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branchbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- name: Install rapidfuzz-cpp
run: |
git clone https://github.com/maxbachmann/rapidfuzz-cpp.git
git clone https://github.com/rapidfuzz/rapidfuzz-cpp.git
cd rapidfuzz-cpp
git checkout v1.0.1
mkdir build && cd build
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/maxbachmann/RapidFuzz/main/docs/img/RapidFuzz.svg?sanitize=true" alt="RapidFuzz" width="400">
<img src="https://raw.githubusercontent.com/rapidfuzz/RapidFuzz/main/docs/img/RapidFuzz.svg?sanitize=true" alt="RapidFuzz" width="400">
</h1>
<h4 align="center">Rapid fuzzy string matching in Python and C++ using the Levenshtein Distance</h4>

<p align="center">
<a href="https://github.com/maxbachmann/RapidFuzz/actions">
<img src="https://github.com/maxbachmann/RapidFuzz/workflows/Test%20Build/badge.svg"
<a href="https://github.com/rapidfuzz/RapidFuzz/actions">
<img src="https://github.com/rapidfuzz/RapidFuzz/workflows/Test%20Build/badge.svg"
alt="Continuous Integration">
</a>
<a href="https://pypi.org/project/rapidfuzz/">
Expand All @@ -20,16 +20,16 @@
<img src="https://img.shields.io/pypi/pyversions/rapidfuzz"
alt="Python versions">
</a><br/>
<a href="https://maxbachmann.github.io/RapidFuzz">
<a href="https://rapidfuzz.github.io/RapidFuzz">
<img src="https://img.shields.io/badge/-documentation-blue"
alt="Documentation">
</a>
<a href="https://codecov.io/gh/maxbachmann/RapidFuzz">
<img src="https://codecov.io/gh/maxbachmann/RapidFuzz/branch/main/graph/badge.svg?token=1IJLT65K8B"
<a href="https://codecov.io/gh/rapidfuzz/RapidFuzz">
<img src="https://codecov.io/gh/rapidfuzz/RapidFuzz/branch/main/graph/badge.svg?token=1IJLT65K8B"
alt="Code Coverage">
</a>
<a href="https://github.com/maxbachmann/RapidFuzz/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/maxbachmann/rapidfuzz"
<a href="https://github.com/rapidfuzz/RapidFuzz/blob/main/LICENSE">
<img src="https://img.shields.io/github/license/rapidfuzz/rapidfuzz"
alt="GitHub license">
</a>
</p>
Expand All @@ -47,9 +47,9 @@
RapidFuzz is a fast string matching library for Python and C++, which is using the string similarity calculations from [FuzzyWuzzy](https://github.com/seatgeek/fuzzywuzzy). However there are a couple of aspects that set RapidFuzz apart from FuzzyWuzzy:
1) It is MIT licensed so it can be used whichever License you might want to choose for your project, while you're forced to adopt the GPL license when using FuzzyWuzzy
2) It provides many string_metrics like hamming or jaro_winkler, which are not included in FuzzyWuzzy
3) It is mostly written in C++ and on top of this comes with a lot of Algorithmic improvements to make string matching even faster, while still providing the same results. For detailed benchmarks check the [documentation](https://maxbachmann.github.io/RapidFuzz)
3) It is mostly written in C++ and on top of this comes with a lot of Algorithmic improvements to make string matching even faster, while still providing the same results. For detailed benchmarks check the [documentation](https://rapidfuzz.github.io/RapidFuzz)
4) Fixes multiple bugs in the `partial_ratio` implementation
5) It can be largely used as a drop in replacement for `fuzzywuzzy`. However there are a couple API differences described [here](https://github.com/maxbachmann/RapidFuzz/blob/main/api_differences.md)
5) It can be largely used as a drop in replacement for `fuzzywuzzy`. However there are a couple API differences described [here](https://github.com/rapidfuzz/RapidFuzz/blob/main/api_differences.md)

## Requirements

Expand Down Expand Up @@ -88,13 +88,13 @@ conda install -c conda-forge rapidfuzz
RapidFuzz can be installed directly from the source distribution by cloning the repository. This requires a C++17 capable compiler.

```bash
git clone --recursive https://github.com/maxbachmann/rapidfuzz.git
git clone --recursive https://github.com/rapidfuzz/rapidfuzz.git
cd rapidfuzz
pip install .
```

## Usage
Some simple functions are shown below. A complete documentation of all functions can be found [here](https://maxbachmann.github.io/RapidFuzz/Usage/index.html).<br>
Some simple functions are shown below. A complete documentation of all functions can be found [here](https://rapidfuzz.github.io/RapidFuzz/Usage/index.html).<br>
Note that from RapidFuzz 3.0.0, strings are not preprocessed(removing all non alphanumeric characters, trimming whitespaces, converting all characters to lower case) by default. Which means that when comparing two strings that have the same characters but different cases("this is a word", "THIS IS A WORD") their similarity score value might be different, so when comparing such strings you might see a difference in score value compared to previous versions. Some examples of string matching with preprocessing can be found [here](#weighted-ratio).

### Scorers
Expand Down Expand Up @@ -193,12 +193,12 @@ Here are some examples on the usage of processors in RapidFuzz:
('Dallas Cowboys', 90.0, 3)
```

The full documentation of processors can be found [here](https://maxbachmann.github.io/RapidFuzz/Usage/process.html)
The full documentation of processors can be found [here](https://rapidfuzz.github.io/RapidFuzz/Usage/process.html)

## Benchmark

The following benchmark gives a quick performance comparison between RapidFuzz and FuzzyWuzzy.
More detailed benchmarks for the string metrics can be found in the [documentation](https://maxbachmann.github.io/RapidFuzz). For this simple comparison I generated a list of 10.000 strings with length 10, that is compared to a sample of 100 elements from this list:
More detailed benchmarks for the string metrics can be found in the [documentation](https://rapidfuzz.github.io/RapidFuzz). For this simple comparison I generated a list of 10.000 strings with length 10, that is compared to a sample of 100 elements from this list:
```python
words = [
"".join(random.choice(string.ascii_letters + string.digits) for _ in range(10))
Expand All @@ -216,7 +216,7 @@ for sample in samples:
```
The following graph shows how many elements are processed per second with each of the scorers. There are big performance differences between the different scorers. However each of the scorers is faster in RapidFuzz

<img src="https://raw.githubusercontent.com/maxbachmann/RapidFuzz/main/docs/img/scorer.svg?sanitize=true" alt="Benchmark Scorer">
<img src="https://raw.githubusercontent.com/rapidfuzz/RapidFuzz/main/docs/img/scorer.svg?sanitize=true" alt="Benchmark Scorer">

The second benchmark compares the performance when the scorers are used in combination with cdist in the following
way:
Expand All @@ -225,7 +225,7 @@ cdist(samples, words, scorer=scorer)
```
The following graph shows how many elements are processed per second with each of the scorers. In RapidFuzz the usage of scorers through processors like `cdist` is a lot faster than directly using it. That's why they should be used whenever possible.

<img src="https://raw.githubusercontent.com/maxbachmann/RapidFuzz/main/docs/img/cdist.svg?sanitize=true" alt="Benchmark cdist">
<img src="https://raw.githubusercontent.com/rapidfuzz/RapidFuzz/main/docs/img/cdist.svg?sanitize=true" alt="Benchmark cdist">


## Support the project
Expand Down
4 changes: 2 additions & 2 deletions docs/Contributing/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ Got a question or problem?
^^^^^^^^^^^^^^^^^^^^^^^^^^

For questions you can reach us using
`github discussions <https://github.com/maxbachmann/RapidFuzz/discussions>`__.
`github discussions <https://github.com/rapidfuzz/RapidFuzz/discussions>`__.

Found a bug?
^^^^^^^^^^^^

If you found a bug in the source code, you can help us by submitting an issue
to the `issue tracker <https://github.com/maxbachmann/rapidfuzz/issues>`__
to the `issue tracker <https://github.com/rapidfuzz/rapidfuzz/issues>`__
in our GitHub repository. Even better, you can submit a Pull Request with a fix.
However, before doing so, please read the :ref:`submission-guidelines`.

Expand Down
2 changes: 1 addition & 1 deletion docs/Installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ repository. This requires a C++17 capable compiler.

.. code-block:: sh
git clone --recursive https://github.com/maxbachmann/rapidfuzz.git
git clone --recursive https://github.com/rapidfuzz/rapidfuzz.git
cd rapidfuzz
pip install .
4 changes: 2 additions & 2 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ where compiling a C extension is not possible.

Open source
-----------
Distributed under a :ref:`MIT License <my-license-label>`, RapidFuzz is developed and maintained `publicly on GitHub <https://github.com/maxbachmann/RapidFuzz>`_.
Distributed under a :ref:`MIT License <my-license-label>`, RapidFuzz is developed and maintained `publicly on GitHub <https://github.com/rapidfuzz/RapidFuzz>`_.


.. toctree::
Expand All @@ -42,6 +42,6 @@ Distributed under a :ref:`MIT License <my-license-label>`, RapidFuzz is develope
changelog_link
License
References
GitHub Repository <https://github.com/maxbachmann/RapidFuzz>
GitHub Repository <https://github.com/rapidfuzz/RapidFuzz>

.. |header-image| image:: img/RapidFuzz.svg
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def show_message(*lines):
"name": "rapidfuzz",
"version": "3.6.0",
"extras_require": {"full": ["numpy"]},
"url": "https://github.com/maxbachmann/RapidFuzz",
"url": "https://github.com/rapidfuzz/RapidFuzz",
"author": "Max Bachmann",
"author_email": "[email protected]",
"description": "rapid fuzzy string matching",
Expand Down
8 changes: 4 additions & 4 deletions src/rapidfuzz/fuzz_py.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ def token_set_ratio(
tokens_b = set(_split_sequence(s2))

# in FuzzyWuzzy this returns 0. For sake of compatibility return 0 here as well
# see https://github.com/maxbachmann/RapidFuzz/issues/110
# see https://github.com/rapidfuzz/RapidFuzz/issues/110
if not tokens_a or not tokens_b:
return 0

Expand Down Expand Up @@ -636,7 +636,7 @@ def partial_token_set_ratio(
tokens_a = set(_split_sequence(s1))
tokens_b = set(_split_sequence(s2))
# in FuzzyWuzzy this returns 0. For sake of compatibility return 0 here as well
# see https://github.com/maxbachmann/RapidFuzz/issues/110
# see https://github.com/rapidfuzz/RapidFuzz/issues/110
if not tokens_a or not tokens_b:
return 0

Expand Down Expand Up @@ -771,7 +771,7 @@ def WRatio(
s2 = processor(s2)

# in FuzzyWuzzy this returns 0. For sake of compatibility return 0 here as well
# see https://github.com/maxbachmann/RapidFuzz/issues/110
# see https://github.com/rapidfuzz/RapidFuzz/issues/110
if not s1 or not s2:
return 0

Expand Down Expand Up @@ -845,7 +845,7 @@ def QRatio(
s1 = processor(s1)
s2 = processor(s2)
# in FuzzyWuzzy this returns 0. For sake of compatibility return 0 here as well
# see https://github.com/maxbachmann/RapidFuzz/issues/110
# see https://github.com/rapidfuzz/RapidFuzz/issues/110
if not s1 or not s2:
return 0

Expand Down
2 changes: 1 addition & 1 deletion tests/test_fuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def test_issue231():
def test_empty_string():
"""
when both strings are empty this is either a perfect match or no match
See https://github.com/maxbachmann/RapidFuzz/issues/110
See https://github.com/rapidfuzz/RapidFuzz/issues/110
"""
# perfect match
assert fuzz.ratio("", "") == 100
Expand Down

0 comments on commit b8f5d99

Please sign in to comment.