word2vec

word2vec functions for similarity and analogies

Apache License 2.0
apache2

Run an Example

[
  [
    [
      "dogs",
      0.8680489915680536
    ],
    [
      "puppy",
      0.8106428352360294
    ],
    [
      "pit_bull",
      0.7803960342611623
    ]
  ],
  [
    [
      "queen",
      0.26689835890816027
    ],
    [
      "monarch",
      0.23208332083114688
    ],
    [
      "princess",
      0.22131306095983244
    ]
  ]
]

Install & Use

Use

curl -X POST -d '[
  {
    "similar": {
      "word": "dog", "n": 3
    }
  },
  {
    "analogy": {
      "pos": ["king", "woman"],
      "neg": ["man"],
      "n": 3
    }
  }
]' -H 'Content-Type: application/json' -H 'Authorization: Simple YOUR_API_KEY' https://api.algorithmia.com/v1/algo/danielfrg/word2vec/0.3.2