Extract locations

Dimension street-number

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=221b+Baker+St+London'\
'&dimensions=street-number' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "streetNumber",
    "body": "221",
    "values": [
      {
        "value": "221",
        "type": "string"
      }
    ],
    "start": 0,
    "end": 3
  }
]

A well-formed street number

Dimension street-type

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=221b+Baker+St+London'\
'&dimensions=street-type' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "streetType",
    "body": "St",
    "values": [
      {
        "value": "street",
        "type": "string"
      }
    ],
    "start": 11,
    "end": 13
  }
]

The type of street used in an address

Dimension postal

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=221+Baker+St+London+NW1+6XE+UK'\
'&dimensions=postal' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "postal",
    "body": "NW1 6XE",
    "values": [
      {
        "value": "nw1 6xe",
        "type": "string"
      }
    ],
    "start": 20,
    "end": 27
  }
]

A well-formed UK postal code

Dimension city

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=going+from+Paris+to+New+York+with+a+halt+in+London'\
'&dimensions=city' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "city",
    "body": "London",
    "values": [
      {
        "value": "London",
        "type": "string",
        "direction": null
      }
    ],
    "start": 44,
    "end": 50
  },
  {
    "dim": "city",
    "body": "from Paris",
    "values": [
      {
        "value": "Paris",
        "type": "string",
        "direction": "origin"
      }
    ],
    "start": 6,
    "end": 16
  },
  {
    "dim": "city",
    "body": "to New York",
    "values": [
      {
        "value": "New York",
        "type": "string",
        "direction": "destination"
      }
    ],
    "start": 17,
    "end": 28
  }
]

Name of a city

The field direction can be "origin" or "destination" or null.

Dimension country

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=ship+to+France'\
'&dimensions=country' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "country",
    "body": "to France",
    "values": [
      {
        "value": "France",
        "type": "string",
        "direction": "destination"
      }
    ],
    "start": 5,
    "end": 14
  }
]

Name of a country

The field direction can be "origin" or "destination" or null.

Dimension address

curl -X GET 'https://api.botfuel.io/nlp/entity-extraction/v0'\
'?sentence=my+office+is+located+at+221b+Baker+St+London'\
'&dimensions=address' \
-H "App-Id: $BOTFUEL_APP_ID" \
-H "App-Key: $BOTFUEL_APP_KEY"
[
  {
    "dim": "address",
    "body": "221b Baker St London",
    "values": [
      {
        "value": "221 b baker street London",
        "street": "b baker street",
        "location": "London",
        "number": "221",
        "type": null,
        "direction": null
      }
    ],
    "start": 24,
    "end": 44
  }
]

A well-formed postal address.

The field direction can be "origin" or "destination" or null.

Dimension location

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

A location can consist of any logical combination of the location entities listed above, for example a city and a country.

The field direction can be "origin" or "destination" or null.