How to use Duckling with CRFEntity

Hi, I am trying to understand how to use duckling but I don’t know how to handle entities : when I type “tomorrow at 2 PM” it extract it with CRF and no with Duckling. I’ve tried to enter

## intent:date_intent
- [today](time)
- [tomorrow at 10 PM](time) PM
- On [Monday at 2](time) AM
- I'd liked [asap](time)


## intent:date_intent
- today 
- tomorrow at 10 PM time PM
- On Monday at 2 time AM

And the result is the same Here is my domain file


    type: text
    initial_value: "human"
    type: unfeaturized

- name
- time

What is strange is that it notices number so when I write 2 PM, it recognizes 2 as a number…

Can you show your config.yml?

It should look something like this

  • name: “DucklingHTTPExtractor” url: “http://localhost:40003” dimensions: [“time”] # ENTER DIMENSIONS to extract locale: “de_Nothing” # enter country code e.g. en_US timezone: “Europe/Berlin” # enter timezone

So, you have to specify which dimensions you want to extract. In your case it should look like above, where only time is extracted. Right now you might have ‘number’ in there as well, as Duckling extracts numbers. See Duckling for supported dimensions

For duckling you should not specify the time entity in your NLU data, since this is the learning input for the CRFEntityExtractor. So this way you get 2 time entities, one from duckling and one from the CRFEntityExtractor.

Thank you for answering ! Here is my config file :

language: en
  - name: WhitespaceTokenizer
  - name: DucklingHTTPExtractor
    url: http://localhost:8000
    - number
    - time
  - name: CRFEntityExtractor
  - name: EntitySynonymMapper
  - name: CountVectorsFeaturizer
    token_pattern: (?u)\b\w+\b
  - name: EmbeddingIntentClassifier

# Configuration for Rasa Core.
  - name: MemoizationPolicy
  - name: KerasPolicy
  - name: MappingPolicy
  - name: "FormPolicy"

When I suppressed locale:de_Nothing it started working better, at least in the rasa shell nlu I can see that it extracts dates. Now I have a problem of running the actions apparently events are lost but that is a different matter…

Well, the locale should be the language you want to use. Since Im working on a bot in german I used de as a locale. You probably want to work with en_US, but just omitting it, will probably load english as the default. Dont know, what’s the assumed timezone is though or if it just takes the server time.