Skip to content

Commit

Permalink
update links
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Dec 28, 2023
1 parent 5637ec5 commit 205f088
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ if (RAPIDFUZZ_INSTALL)
endif()

set(CPACK_PACKAGE_VENDOR "Max Bachmann")
set(CPACK_PACKAGE_CONTACT "https://github.com/maxbachmann/rapidfuzz-cpp")
set(CPACK_PACKAGE_CONTACT "https://github.com/rapidfuzz/rapidfuzz-cpp")
include(CPack)

endif(RAPIDFUZZ_INSTALL)
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<h1 align="center">
<img src="https://raw.githubusercontent.com/maxbachmann/rapidfuzz/master/docs/img/RapidFuzz.svg?sanitize=true" alt="RapidFuzz" width="400">
<img src="https://raw.githubusercontent.com/rapidfuzz/rapidfuzz/master/docs/img/RapidFuzz.svg?sanitize=true" alt="RapidFuzz" width="400">
</h1>
<h4 align="center">Rapid fuzzy string matching in C++ using the Levenshtein Distance</h4>

<p align="center">
<a href="https://github.com/maxbachmann/rapidfuzz-cpp/actions">
<img src="https://github.com/maxbachmann/rapidfuzz-cpp/workflows/CMake/badge.svg"
<a href="https://github.com/rapidfuzz/rapidfuzz-cpp/actions">
<img src="https://github.com/rapidfuzz/rapidfuzz-cpp/workflows/CMake/badge.svg"
alt="Continuous Integration">
</a>
<a href="https://maxbachmann.github.io/rapidfuzz-cpp">
<a href="https://rapidfuzz.github.io/rapidfuzz-cpp">
<img src="https://img.shields.io/badge/-documentation-blue"
alt="Documentation">
</a>
<a href="https://github.com/maxbachmann/rapidfuzz-cpp/blob/dev/LICENSE">
<img src="https://img.shields.io/github/license/maxbachmann/rapidfuzz-cpp"
<a href="https://github.com/rapidfuzz/rapidfuzz-cpp/blob/dev/LICENSE">
<img src="https://img.shields.io/github/license/rapidfuzz/rapidfuzz-cpp"
alt="GitHub license">
</a>
</p>
Expand All @@ -29,11 +29,11 @@
## Description
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 two 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 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. More details on these performance improvements in the form of benchmarks can be found [here](https://github.com/maxbachmann/rapidfuzz/blob/master/Benchmarks.md)
2) 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. More details on these performance improvements in the form of benchmarks can be found [here](https://github.com/rapidfuzz/rapidfuzz/blob/master/Benchmarks.md)

The Library is split across multiple repositories for the different supported programming languages:
- The C++ version is versioned in this repository
- The Python version can be found at [maxbachmann/rapidfuzz](https://github.com/maxbachmann/rapidfuzz)
- The Python version can be found at [rapidfuzz/rapidfuzz](https://github.com/rapidfuzz/rapidfuzz)


## CMake Integration
Expand All @@ -42,7 +42,7 @@ There are severals ways to integrate `rapidfuzz` in your CMake project.

### By Installing it
```bash
git clone https://github.com/maxbachmann/rapidfuzz-cpp.git rapidfuzz-cpp
git clone https://github.com/rapidfuzz/rapidfuzz-cpp.git rapidfuzz-cpp
cd rapidfuzz-cpp
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
Expand All @@ -59,7 +59,7 @@ target_link_libraries(foo rapidfuzz::rapidfuzz)

### Add this repository as a submodule
```bash
git submodule add https://github.com/maxbachmann/rapidfuzz-cpp.git 3rdparty/RapidFuzz
git submodule add https://github.com/rapidfuzz/rapidfuzz-cpp.git 3rdparty/RapidFuzz
```
Then you can either:

Expand All @@ -86,7 +86,7 @@ Then you can either:
If you don't want to add `rapidfuzz-cpp` as a submodule, you can also download it with `FetchContent`:
```cmake
FetchContent_Declare(rapidfuzz
GIT_REPOSITORY https://github.com/maxbachmann/rapidfuzz-cpp.git
GIT_REPOSITORY https://github.com/rapidfuzz/rapidfuzz-cpp.git
GIT_TAG main)
FetchContent_MakeAvailable(rapidfuzz)
add_executable(foo main.cpp)
Expand Down
12 changes: 6 additions & 6 deletions extras/rapidfuzz_amalgamated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10443,7 +10443,7 @@ double token_set_ratio(const rapidfuzz::detail::SplittedSentenceView<InputIt1>&
const double score_cutoff)
{
/* 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 (tokens_a.empty() || tokens_b.empty()) return 0;

auto decomposition = detail::set_decomposition(tokens_a, tokens_b);
Expand Down Expand Up @@ -10532,7 +10532,7 @@ double partial_token_set_ratio(const rapidfuzz::detail::SplittedSentenceView<Inp
const double score_cutoff)
{
/* 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 (tokens_a.empty() || tokens_b.empty()) return 0;

auto decomposition = detail::set_decomposition(tokens_a, tokens_b);
Expand Down Expand Up @@ -10867,7 +10867,7 @@ double WRatio(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
auto len2 = std::distance(first2, last2);

/* 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 (!len1 || !len2) return 0;

double len_ratio = (len1 > len2) ? static_cast<double>(len1) / static_cast<double>(len2)
Expand Down Expand Up @@ -10921,7 +10921,7 @@ double CachedWRatio<CharT1>::similarity(InputIt2 first2, InputIt2 last2, double
size_t len2 = static_cast<size_t>(std::distance(first2, last2));

/* 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 (!len1 || !len2) return 0;

double len_ratio = (len1 > len2) ? static_cast<double>(len1) / static_cast<double>(len2)
Expand Down Expand Up @@ -10967,7 +10967,7 @@ double QRatio(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
ptrdiff_t len2 = std::distance(first2, last2);

/* 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 (!len1 || !len2) return 0;

return ratio(first1, last1, first2, last2, score_cutoff);
Expand All @@ -10988,7 +10988,7 @@ double CachedQRatio<CharT1>::similarity(InputIt2 first2, InputIt2 last2, double
auto len2 = std::distance(first2, last2);

/* 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 (s1.empty() || !len2) return 0;

return cached_ratio.similarity(first2, last2, score_cutoff);
Expand Down
12 changes: 6 additions & 6 deletions rapidfuzz/fuzz_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ double token_set_ratio(const rapidfuzz::detail::SplittedSentenceView<InputIt1>&
const double score_cutoff)
{
/* 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 (tokens_a.empty() || tokens_b.empty()) return 0;

auto decomposition = detail::set_decomposition(tokens_a, tokens_b);
Expand Down Expand Up @@ -463,7 +463,7 @@ double partial_token_set_ratio(const rapidfuzz::detail::SplittedSentenceView<Inp
const double score_cutoff)
{
/* 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 (tokens_a.empty() || tokens_b.empty()) return 0;

auto decomposition = detail::set_decomposition(tokens_a, tokens_b);
Expand Down Expand Up @@ -798,7 +798,7 @@ double WRatio(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
auto len2 = std::distance(first2, last2);

/* 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 (!len1 || !len2) return 0;

double len_ratio = (len1 > len2) ? static_cast<double>(len1) / static_cast<double>(len2)
Expand Down Expand Up @@ -852,7 +852,7 @@ double CachedWRatio<CharT1>::similarity(InputIt2 first2, InputIt2 last2, double
size_t len2 = static_cast<size_t>(std::distance(first2, last2));

/* 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 (!len1 || !len2) return 0;

double len_ratio = (len1 > len2) ? static_cast<double>(len1) / static_cast<double>(len2)
Expand Down Expand Up @@ -898,7 +898,7 @@ double QRatio(InputIt1 first1, InputIt1 last1, InputIt2 first2, InputIt2 last2,
ptrdiff_t len2 = std::distance(first2, last2);

/* 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 (!len1 || !len2) return 0;

return ratio(first1, last1, first2, last2, score_cutoff);
Expand All @@ -919,7 +919,7 @@ double CachedQRatio<CharT1>::similarity(InputIt2 first2, InputIt2 last2, double
auto len2 = std::distance(first2, last2);

/* 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 (s1.empty() || !len2) return 0;

return cached_ratio.similarity(first2, last2, score_cutoff);
Expand Down
10 changes: 5 additions & 5 deletions test/tests-fuzz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ TEST_CASE("RatioTest")
score_test(100, fuzz::partial_ratio("physics 2 vid", "study physics physics 2 video"));
}

SECTION("testIssue206") /* test for https://github.com/maxbachmann/RapidFuzz/issues/206 */
SECTION("testIssue206") /* test for https://github.com/rapidfuzz/RapidFuzz/issues/206 */
{
const char* str1 = "South Korea";
const char* str2 = "North Korea";
Expand All @@ -160,7 +160,7 @@ TEST_CASE("RatioTest")
}
}

SECTION("testIssue210") /* test for https://github.com/maxbachmann/RapidFuzz/issues/210 */
SECTION("testIssue210") /* test for https://github.com/rapidfuzz/RapidFuzz/issues/210 */
{
const char* str1 = "bc";
const char* str2 = "bca";
Expand All @@ -173,7 +173,7 @@ TEST_CASE("RatioTest")
}
}

SECTION("testIssue231") /* test for https://github.com/maxbachmann/RapidFuzz/issues/231 */
SECTION("testIssue231") /* test for https://github.com/rapidfuzz/RapidFuzz/issues/231 */
{
const char* str1 = "er merkantilismus f/rderte handel und verkehr mit teils marktkonformen, teils "
"dirigistischen ma_nahmen.";
Expand All @@ -188,7 +188,7 @@ TEST_CASE("RatioTest")
REQUIRE(alignment.dest_end == 51);
}

SECTION("testIssue257") /* test for https://github.com/maxbachmann/RapidFuzz/issues/257 */
SECTION("testIssue257") /* test for https://github.com/rapidfuzz/RapidFuzz/issues/257 */
{
const char* str1 = "aaaaaaaaaaaaaaaaaaaaaaaabacaaaaaaaabaaabaaaaaaaababbbbbbbbbbabbcb";
const char* str2 = "aaaaaaaaaaaaaaaaaaaaaaaababaaaaaaaabaaabaaaaaaaababbbbbbbbbbabbcb";
Expand All @@ -197,7 +197,7 @@ TEST_CASE("RatioTest")
score_test(98.4615385, fuzz::partial_ratio(str2, str1));
}

SECTION("testIssue257") /* test for https://github.com/maxbachmann/RapidFuzz/issues/219 */
SECTION("testIssue257") /* test for https://github.com/rapidfuzz/RapidFuzz/issues/219 */
{
const char* str1 =
"TTAGCGCTACCGGTCGCCACCATGGTTTTCTAAGGGGAGGCCGTCATCAAAAGAGTTCATGTAGCACGAAGTCCACCTTTGAAGGATCGATGAATG"
Expand Down

0 comments on commit 205f088

Please sign in to comment.