Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ZebulonRouseFrantzich/DoubleMetaphoneSwift
A Swift implementation of the Double Metaphone algorithm
https://github.com/ZebulonRouseFrantzich/DoubleMetaphoneSwift
cocoapods double-metaphone doublemetaphone postgresql spm swift-3 swift-package-manager swift3
Last synced: 5 days ago
JSON representation
A Swift implementation of the Double Metaphone algorithm
- Host: GitHub
- URL: https://github.com/ZebulonRouseFrantzich/DoubleMetaphoneSwift
- Owner: ZebulonRouseFrantzich
- License: mit
- Created: 2017-03-11T19:29:16.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-02-03T14:18:52.000Z (about 4 years ago)
- Last Synced: 2025-02-02T15:51:23.457Z (19 days ago)
- Topics: cocoapods, double-metaphone, doublemetaphone, postgresql, spm, swift-3, swift-package-manager, swift3
- Language: C
- Homepage:
- Size: 122 KB
- Stars: 9
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DoubleMetaphoneSwift
This is an implementation of the Double Metaphone algorithm in Swift. The algorithm was originally coded by Lawrence Philips.### Setting up with [CocoaPods](http://cocoapods.org/?q=DoubleMetaphoneSwift)
```ruby
source 'https://github.com/CocoaPods/Specs.git'
pod 'DoubleMetaphoneSwift', '~> 0.0.1'
```## Usage
Import DoubleMetaphoneSwift at the top of the Swift file.```swift
import DoubleMetaphoneSwift
```The returned Double Metaphone calculation returns the primary and secondary calculations as a tuple.
```swift
guard let (primary, secondary) = DoubleMetaphoneSwift.calculate(input: "Hello World!") else {
print("Failed to calculate...")
return
}print("Primary: \(primary)") // Primary: HLRL
print("Secondary: \(secondary)") // Secondary: HLRL
```