Numbers and amounts

Dimension number

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=the+third+gets+1024+points+with+forty-two+attempts'\
'&dimensions=number' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "number",
    "body": "1024",
    "values": [
      {
        "value": 1024,
        "type": "integer"
      }
    ],
    "start": 15,
    "end": 19
  },
  {
    "dim": "number",
    "body": "forty-two",
    "values": [
      {
        "value": 42,
        "type": "integer"
      }
    ],
    "start": 32,
    "end": 41
  }
]

An integer in numerical format or spelled out.

Dimension ordinal

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=the+third+gets+1024+points+with+forty+two+attempts'\
'&dimensions=ordinal' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "ordinal",
    "body": "third",
    "values": [
      {
        "value": 3,
        "type": "ordinal"
      }
    ],
    "start": 4,
    "end": 9
  }
]

An ordinal number

Dimension distance

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=3+kilometers+away'\
'&dimensions=distance' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "distance",
    "body": "3 kilometers",
    "values": [
      {
        "value": 3,
        "unit": "kilometre",
        "normalized": [
          {
            "value": 3000,
            "unit": "metre"
          }
        ],
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 12
  }
]

A length measurement with units

Dimension area

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=4+sq+ft'\
'&dimensions=area' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "area",
    "body": "4 sq ft",
    "values": [
      {
        "value": 4,
        "unit": "sq ft",
        "normalized": [
          {
            "value": 0.37161216,
            "unit": "m2"
          }
        ],
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 7
  }
]

A area measurement with units

Dimension volume

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=4+liters'\
'&dimensions=volume' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "volume",
    "body": "4 liters",
    "values": [
      {
        "value": 4,
        "unit": "litre",
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 8
  }
]

A volume measurement with units

Dimension weight

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=4+grams'\
'&dimensions=weight' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "weight",
    "body": "4 grams",
    "values": [
      {
        "value": 4,
        "unit": "g",
        "normalized": [
          {
            "value": 0.004,
            "unit": "kg"
          }
        ],
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 7
  }
]

A weight measurement with units

Dimension temperature

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=-5+degrees+celcius'\
'&dimensions=temperature' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "temperature",
    "body": "-5 degrees celcius",
    "values": [
      {
        "value": -5,
        "unit": "celsius",
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 18
  }
]

A temperature measurement with units

Dimension percentage

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=just+below+65%25'\
'&dimensions=percentage' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"

NB: The character '%' is excaped as '%25'.

[
  {
    "dim": "percentage",
    "body": "65%",
    "values": [
      {
        "value": 0.65,
        "type": "float"
      }
    ],
    "start": 11,
    "end": 1
  }
]

A number representing a percentage

Dimension item-count

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=2+flowers'\
'&dimensions=item-count' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "itemCount",
    "body": "2 flowers",
    "values": [
      {
        "value": 2,
        "unit": "flowers",
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 9
  }
]

A number of items

Dimension currency

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=dollars'\
'&dimensions=currency' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "currency",
    "body": "dollars",
    "values": [
      {
        "value": "$",
        "type": "string"
      }
    ],
    "start": 0,
    "end": 7
  }
]

A currency

Dimension money

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=3000+dollars'\
'&dimensions=money' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "money",
    "body": "3000 dollars",
    "values": [
      {
        "value": 3000,
        "unit": "$",
        "type": "integer"
      }
    ],
    "start": 0,
    "end": 12
  }
]

An amount in a currency