DOT

A collection of NLP (natural language processing) APIs. Originally developed for Fitmeal, a Messenger bot, DOT provides bot programmers with building blocks for generic and practical NLP tasks, such as:

  1. Listing ngrams
  2. Resolving quantities
  3. Extracting entities (food)
  4. Catching abuses
About · Contact

Listing ngrams

http://dotapi.com/ngram?text=<string>&n=<list>
Text N Response
foo bar 1
[
  {"text": "foo", "tokens": ["foo"]},
  {"text": "bar", "tokens": ["bar"]}
]
2
[
  {"text": "foo bar", "tokens": ["foo", "bar"]}
]
1, 2
[
  {"text": "foo bar", "tokens": ["foo", "bar"]},
  {"text": "foo", "tokens": ["foo"]},
  {"text": "bar", "tokens": ["bar"]}
]
foo, bar, and ris 1, 2, 3
[
  {"text": "foo, bar, and", "tokens": ["foo", "bar", "and"]},
  {"text": "bar, and ris", "tokens": ["bar", "and", "ris"]},
  {"text": "foo, bar", "tokens": ["foo", "bar"]},
  {"text": "bar, and", "tokens": ["bar", "and"]},
  {"text": "and ris", "tokens": ["and", "ris"]},
  {"text": "foo", "tokens": ["foo"]},
  {"text": "bar", "tokens": ["bar"]},
  {"text": "and", "tokens": ["and"]},
  {"text": "ris", "tokens": ["ris"]}
]

Resolving quantities

http:/dotapi.com/quantity?text=<string>
Text Response
cup
[
  {"amount": 1.0, "unit": "cup"}
]
2l
[
  {"amount": 2.0, "unit": "liter"}
]
three tbsp
[
  {"amount": 3.0, "unit": "tablespoon"}
]
half a glass
[
  {"amount": 0.5, "unit": "glass"}
]
1/2 pint
[
  {"amount": 0.5, "unit": "pint"}
]

Extracting entities (food)

http:/dotapi.com/entity?text=<string>
Text Response
I ate an apple
[
  {"name": "food", "lexeme": "apple"}
]

Catching abuses

http://dotapi.com/abuse