mgub
3/19/2015 - 10:18 PM

Compute the semantic relatedness from the Terminal on OS X.

Compute the semantic relatedness from the Terminal on OS X.

How to Estimate the Semantic Relatedness of Two Sentences

Try the online semantic relatedness demo at https://www.metamind.io/language/relatedness.

Comapare "kids in red shirts are playing in the leaves" to "three kids are jumping in the leaves":

curl --request GET 'https://www.metamind.io/language/relatedness/test?text_1=Kids+in+red+shirts+are+playing+in+the+leaves&text_2=Three+kids+are+jumping+in+the+leaves'

This returns the following JSON:

{
  "score": 3.7341414514824804
}

(Example) Repeatedly execute a command on the Terminal with a Bash script:

while true; do echo "Hello"; done;

Repeatedly comapare "kids in red shirts are playing in the leaves" to "three kids are jumping in the leaves":

while true; do curl --request GET 'https://www.metamind.io/language/relatedness/test?text_1=Kids+in+red+shirts+are+playing+in+the+leaves&text_2=Three+kids+are+jumping+in+the+leaves'; done;