Duckling failed to extract date and number

I am using rasa 2.8.14 and it is directly installed on a VM. I am trying to implement the duckling pipeline to extract some dates and number, but I have some trouble doing it. Every time I tried to get dates and number I get this error

I have my duckling running on a VM with server IP and 61006 port and it’s seems up and running without any error

I tried accessing duckling server URL via browser and postman, via browser it gives me quack ! as output, which also means it installed correctly on server.

duckling_browser

Using postman it gives me bad Input Need a 'text' parameter to parse error.

I created separate entity for date and number along with the slots and when I try to get these slots values inside custom action I always get None

NLU

- intent: duckling_details
  examples: |
    - what is today date
    - what is tomorrow date
    - records grether then 10
    - records less then 10
    - records grether then ten
    - records less then give

Entity

entities:
 - date
 - number

Slots

slots:
  date:
    type: any
  number:
    type: any

Config

language: "en"
pipeline:
  - name: SpacyNLP
    model: "en_core_web_md"
    case_sensitive: False
  - name: SpacyTokenizer
  - name: SpacyFeaturizer
  - name: RegexFeaturizer
  - name: LexicalSyntacticFeaturizer
  - name: CountVectorsFeaturizer
  - name: CountVectorsFeaturizer
    analyzer: "char_wb"
    min_ngram: 1
    max_ngram: 4
  - name: DIETClassifier
    epochs: 25
    constrain_similarities: True
    model_confidence: linear_norm
  - name: EntitySynonymMapper
  - name: ResponseSelector
    epochs: 100
    constrain_similarities: True
    model_confidence: linear_norm
  - name: FallbackClassifier
    threshold: 0.30
    ambiguity_threshold: 0.1
  - name: DucklingEntityExtractor
    url: "http://server-ip:61006"
    dimensions: ["number","date"]

policies:
- name: RulePolicy
- name: AugmentedMemoizationPolicy
- name: TEDPolicy
  max_history: 8
  epochs: 100
  constrain_similarities: true
  model_confidence: linear_norm

I also tried changing the duckling URL from http://server-ip:61006 to http://server-ip:61006/parse in my config.yml but still same issue.

I refer this video also but no luck, my configuration is same as explain in this video

Can anyone please help me to solve this issue.

Thanks in Advanced

Hi @nik202

Can you please help me on this.

Can someone please help/suggest me on this.

For example like this:

Even mention the location, check the duckling website for more information or check duckling pipeline on forum post.

Good Luck!

Thank you so much for the reply @nik202, actually I have tried the exact same configuration but no luck and getting the error as mentioned in this post.

@naveensiwas strange. Try not to use the Ducking then :stuck_out_tongue:

is there any alternative to it in Python ?, because creating a lookup table for numbers from +infinity to till -infinity doesn’t seems feasible.

try to use a simple approach for entity extraction, check if it’s working for you or not, and just take a small use-case first.

Thanks you so much @nik202 , I will try the same and let you know.