File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 11# Fuzzywuzzy_swift (WIP)
22Fuzzy String Matching in Swift using Levenshtein Distance. Inspired by the python fuzzywuzzy library https://github.com/seatgeek/fuzzywuzzy
33
4+ It has no external dependancies. And thanks to Swift String, it can support multi-lingual.
5+
46** WARNING: This library is still WORKING IN PROGRESS.**
7+
8+ # Installation
9+ ### Carthage
10+ Add the following line to your Cartfile. And run ` carthage update `
11+ ```
12+ github "lxian/Fuzzywuzzy_swift"
13+ ```
14+ ### Cocoapod
15+ Add the following line to your Podfile. And run ` pod install `
16+ ```
17+ pod 'Fuzzywuzzy_swift', :git=> 'https://github.com/lxian/Fuzzywuzzy_swift.git'
18+ ```
19+ ### Manually
20+ drag the ` Fuzzywuzzy_swift ` folder into your project
21+
22+ # Usage
23+ ``` swift
24+ import Fuzzywuzzy_swift
25+ ```
26+ ### Simple Ratio
27+ ``` swift
28+ String .fuzzRatio (str1 : " some text here" , str2 : " same text here!" ) // => 93
29+ ```
30+
31+ ### Partial Ratio
32+ Partial Ratio tries to match the shoter string to a substring of the longer one
33+ ``` swift
34+ String .fuzzPartialRatio (str1 : " some text here" , str2 : " I found some text here!" ) // => 100
35+ ```
You can’t perform that action at this time.
0 commit comments