Giter Club home page Giter Club logo

fuzzywuzzy's Introduction

This is an in-progress port of seatgeek's fuzzywuzzy Python library to C++. When done, this library will have the same interface and behavior.

The underlaying C-library (python-Levenshtein, mirrored here) has been stripped of its Python interfacing and been wrapped around some C++ code.

files in src/ Python/C-lib equivalent
fuzzywuzzy.{c,h}pp and string_matcher.{c,h}pp Line-by-line Python-to-C++ translations of the Python library and python-Levenshtein's StringMatcher.py.
wrapper.{c,h}pp (Python-interfaced-)C-to-C++ wrapper of ratio_py, get_opcodes_py, get_matching_blocks_py, etc. from python-Levenshtein.
utils.{c,h}pp Utility functions, translated from the Python library's utils.py.
levenshtein.{c,h} The underlaying C functions, copied verbatim.

Usage

#include <fuzzywuzzy>

Simple Ratio

fuzz::ratio("this is a test", "this is a test!"); // returns 97

Partial Ratio

fuzz::partial_ratio("this is a test", "this is a test!"); // return 100

Token Sort Ratio

fuzz::ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear"); // returns 91

fuzz::token_sort_ratio("fuzzy wuzzy was a bear", "wuzzy fuzzy was a bear"); // returns 100

Token Set Ratio

fuzz::token_sort_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear"); // returns 83 (this should be 84)

fuzz::token_set_ratio("fuzzy was a bear", "fuzzy fuzzy was a bear"); // returns 100

fuzzywuzzy's People

Contributors

neartox avatar tmplt avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.