summaryrefslogtreecommitdiff
path: root/readme.md
blob: 492a179974e3628f8823f9309f391d718163b931 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#stringmetric
A collection of string metrics built with Scala. Includes a light-weight core API and CLI based interface for each string metric. The following string metrics are currently supported:

* Jaro-Winkler

## Building the API
gradle jar

## Building the CLI
gradle tar

## Using the API
`// Import the metric of choice.`  
`import org.hashtree.stringmetric.JaroWinklerMetric`

`// Invoke the compare method on the metric.`  
`val distance = JaroWinklerMetric.compare("string1", "string2")`

`// Do something. In this case, distance is between 1.0f and 0.0f.`  
`if (distance >= 0.9) println("It's likely you're a match!")`

## Using the CLI
Uncompress the built tar and ensure you have ability to execute the commands. Execute the metric of choice via the command line:

`jaroWinklerMetric --help`  
`jaroWinklerMetric abc xyz`

## Requirements
* Scala 2.9.2