New Built-in Entities

17 Oct 2013 feature, console, entities

We just released a set of new built-in entities that many of you had requested:

  • wit/amount_of_money
  • wit/temperature
  • wit/on_off
  • wit/phone_number
  • wit/url
  • wit/email

More details about each entity below.

If you have already defined custom entities with an identical role, you should consider switching to the built-in versions. Yes, it’s a little bit of work but you’ll get better results.


An amount of money like $10, 4.99EUR, USD100K, fifty bucks. The currency might be explicit like USD, ambiguous like $ (many currencies use this symbol) or missing like 3 bucks.

  • The total cost is USD1,000,000 => {"amount": 1000000, "currency": "USD"}
  • It’s ten dollars => {"amount": 10, "currency": "$"}
  • Give me three bucks to buy a coffee => {"amount": 3}


Temperature expressed in degrees Celsius, Fahrenheit, or no explicit unit.

  • Set the living room to 68°F => {"temperature": 68, "unit": "F"}
  • Set the temperature to 22 => {"temperature": 22}


Captures the intent of turning something on or off. This is a spanless entity, so you don’t need to select any span in the sentence, just set a value (on or off).

  • Turn on the lights, please => "on"
  • Shut down this engine! => "off"


Any series of numbers and signs that looks like a phone number. No validation is performed.

  • Call +1 (650)-188-1234 ext 99 now => "+1 (650)-188-1234 ext 99"


Any string that looks like an URL. No validation is performed.

  • Browse to => ""
  • Browse to localhost:8000 => "localhost:8000"
  • Browse to https://myserver?foo=bar => "https://myserver?foo=bar"


Email addresses.

  • Send the last 10 pictures to => ""

We hope you’ll like these new entities. They still need to get trained a little bit more, so we apologize if they don’t meet your expectations during the next few days. And don’t forget, you can either create your own entities or send entity requests by using the button at the bottom of the entities dropdown:

image alt text

Team Wit (@WitNL)

Entities Update

01 Oct 2013 feature, console, entities

Following the feedback you gave us, we have changed the way to declare entities in expressions.

Why this change?

Until now, you had to first select a span in the sentence, and then choose the entity name. That’s not optimal because:

  • you couldn’t change the span once it was selected - you had to delete and re-declare the entity
  • some entities are spanless (more on that below): their value is inferred from the sentence as a whole, not a particular word or sequence of words
  • in the future, Wit will try to guess the span automatically, and you’ll just have to check that it’s correct

The new process to declare an entity

With the new process, you first select the entity name, and then its span and/or value:

  1. Click on “Add a new entity” and select the entity name you need image alt text image alt text

  2. Select the span in the sentence (if you are dealing with a spanless entity you can skip this step) image alt text

  3. Check the value and validate. You’re done.

At any moment if you realize the span is wrong or missing for an entity, you can attach a new span by clicking the link icon and selecting the span again. image alt text

Spanless entities

It might not be obvious when you start, but soon enough you’ll realize that some entities are not tied to a word or a sequence of words in the sentence. Consider for example:

  • “It’s too hot here” => thermostat_up_down = down
  • “Set it more hot” => thermostat_up_down = up

The mere presence of the span “hot” doesn’t tell you anything about the value of the entity thermostat_up_down. Only the sentence as a whole gives you the value of this entity. This is what we call a spanless entity.

Declaring a spanless entity works exactly like declaring other entities, except you don’t select a span at step 2 hereinabove: you choose the entity name, and then set the value you want in the dropdown. image alt text image alt text

Unlike other entities, spanless entities’ names are not highlighted in color ; instead they have an dotted border.

When should you use spanless entities?

Their big advantage is, they don’t need a particular word or phrase in the sentence to detect a value: their matching strategy is much more powerful than enum-base entities that just match expressions to values.

Their drawback is, their set of values is closed. A spanless entity will never “suggest” a new value, whereas the value set of an enum-based entity is always open: if you say “Translate I love you into Martian” after a lot of training with different languages, eventually Wit will suggest that “Martian” is a language, and add it to the value set.

So as a rule of thumb, prefer spanless entities when:

  • the set of values is closed and relatively small
  • there is no direct, obvious association between certain words in the sentence and the value, but rather you need the sentence as a whole to determine the value

You can also read the full documentation about entities.

We hope this update will meet your expectations. Like always, don’t hesitate to contact us if you find a bug or have any idea.

Team Wit