Skip to content

Commit d86fdee

Browse files
authored
Update README.md
1 parent 96c0347 commit d86fdee

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,35 @@
11
# Fuzzywuzzy_swift (WIP)
22
Fuzzy 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+
```

0 commit comments

Comments
 (0)