File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1
1
# Fuzzywuzzy_swift (WIP)
2
2
Fuzzy String Matching in Swift using Levenshtein Distance. Inspired by the python fuzzywuzzy library https://github.com/seatgeek/fuzzywuzzy
3
3
4
+ It has no external dependancies. And thanks to Swift String, it can support multi-lingual.
5
+
4
6
** 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