Skip to content

xiy/distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distance

A very simple Go-Kit based microservice to determine string similarity.

Example

The service may currently be up at http://dockerer-152911.nitrousapp.com:8080.

It expects a POST request to / with the following as a JSON encoded body:

  • source: The first string to compare.
  • target: The seconds string to compare.

And will return the following on a successful comparison:

  • distance: An integer that represents the similarity of the two strings - the lower it is, the more similar the strings are.

Example request

echo '{ "source": "This is a sentence", "target": "This is a similar sentence" }' | http http://dockerer-152911.nitrousapp.com:8080
HTTP/1.1 200 OK
Connection: keep-alive
Content-Length: 15
Content-Type: text/plain; charset=utf-8
Date: Sun, 13 Mar 2016 17:17:23 GMT
Keep-Alive: timeout=30
Server: openresty/1.7.10.1

{"distance":8}

Algorithms

Current algorithms implemented:

Algorithms that might be worth implementing:

Releases

No releases published

Packages

No packages published