# Issue regarding date extraction

**URL:** <https://forum.rasa.com/t/issue-regarding-date-extraction/5381>\
**Category:** Rasa Open Source\
**Created:** [February 20, 2019, 10:31pm UTC](https://forum.rasa.com/t/issue-regarding-date-extraction/5381 "2019-02-20T22:31:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nexemics](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nexemics/32/1927_2.png) [@Nexemics](https://forum.rasa.com/u/Nexemics)\
**Post date:** [February 20, 2019, 10:31pm UTC](https://forum.rasa.com/t/issue-regarding-date-extraction/5381/1 "2019-02-20T22:31:05Z")

</div>

Hi I am new RASA and I am unsure if this issue was discussed on this forum before but whenever I input date as a slot as DD-MM-YYYY format, the extractor by default adds spaces between the dashes. Input : 21-02-2019 Stored as : 21 - 02 - 2019 This is a problem especially in passing date as a parameter for GET APIs.

 ![Capture](https://europe1.discourse-cdn.com/flex013/uploads/rasa/original/2X/1/1491f7b61ceb6716d0383eb441412fe33fb5a80a.jpeg)I am forced to manually correct this but I am hoping for any tweaks to fix this permanently. Thanks.

---

<div class="post-metadata">

**Author:** ![ypk46](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/ypk46/32/1981_2.png) [@ypk46](https://forum.rasa.com/u/ypk46)\
**Post date:** [February 21, 2019, 3:48am UTC](https://forum.rasa.com/t/issue-regarding-date-extraction/5381/2 "2019-02-21T03:48:14Z")

</div>

Are you using spacy tokenizer in your pipeline? I encountered a similar case and found this issue in github.

> <https://github.com/RasaHQ/rasa/issues/2777>
>
> \*\*Rasa Core version\*\*: 0.11.8
> 
> \*\*Python version\*\*: Python 3.6.5
> 
> \*\*Operating… system\*\* (windows, osx, ...): CentOS-7
> 
> \*\*Issue\*\*: 
> 
> There seems to be a problem when using categorical slots that contain embedded dashes. The online trainer automatically inserts spaces around the value text containing a dash. The scenario is briefly described below.
> 
> \- The scenario relates to the bot agent supporting an Amazon VM boot. Refer the NLU training examples "examples-itsm-aws-start-ec2-instance.json.txt"
> \- The domain file contains a categorical slot named "\*\*itsm\_regionId\*\*" which contains values with embedded dashes. I have used the escape code "\\&\\#45\\;" to represent dash (-). \_Please note that I also tried using dashes as well instead of the escape codes, but the issue of slot filling during interactive training still remains.\_
> type: categorical
> values:
> - "ap&#45;south&#45;1"
> - "eu&#45;west&#45;3"
> - "eu&#45;west&#45;2"
> - "eu&#45;west&#45;1"
> - "ap&#45;northeast&#45;2"
> - "ap&#45;northeast&#45;1"
> - "sa&#45;east&#45;1"
> - "ca&#45;central&#45;1"
> - "ap&#45;southeast&#45;1"
> - "ap&#45;southeast&#45;2"
> - "eu&#45;central&#45;1"
> - "us&#45;east&#45;1"
> - "us&#45;east&#45;2"
> - "us&#45;west&#45;1"
> - "us&#45;west&#45;2"
> \- Now during interactive training, I enter the phrase "\_Can you help with starting my AWS instance i-025bf165fc6952ef6 placed in region us-west-2?\_". The slot value for "\*\*itsm\_regionId\*\*" gets set to "us - west-2" instead of "us-west-2", somehow the online trainer adds a blank space around the first dash. Refer attached screenshot (.png files) from the online trainer.
> 
> (https://github.com/RasaHQ/rasa\_core/files/2622544/examples-itsm-aws-start-ec2-instance.json.txt)
> \[nlu-config-tensor-embedding1.yml.txt\](https://github.com/RasaHQ/rasa\_core/files/2622564/nlu-config-tensor-embedding1.yml.txt)
> !\[rasa-core-ot-error1\](https://user-images.githubusercontent.com/30822505/49125104-d6805500-f2e4-11e8-87c9-8f4ebcf5b152.PNG)
> !\[rasa-core-ot-error2\](https://user-images.githubusercontent.com/30822505/49125105-d6805500-f2e4-11e8-822e-1686b65e7e33.PNG)
> 
> 
> 
> \*\*Content of domain file\*\* (if used & relevant):
> \`\`\`yaml
> slots:
> itsm\_cloudPlatform:
> type: text
> itsm\_instanceId:
> type: text
> itsm\_regionId:
> type: categorical
> values:
> - "ap&#45;south&#45;1"
> - "eu&#45;west&#45;3"
> - "eu&#45;west&#45;2"
> - "eu&#45;west&#45;1"
> - "ap&#45;northeast&#45;2"
> - "ap&#45;northeast&#45;1"
> - "sa&#45;east&#45;1"
> - "ca&#45;central&#45;1"
> - "ap&#45;southeast&#45;1"
> - "ap&#45;southeast&#45;2"
> - "eu&#45;central&#45;1"
> - "us&#45;east&#45;1"
> - "us&#45;east&#45;2"
> - "us&#45;west&#45;1"
> - "us&#45;west&#45;2"
> itsm\_instanceType:
> type: text
> itsm\_instanceState:
> type: categorical
> values:
> - 'pending'
> - 'running'
> - 'stopping'
> - 'stopped'
> - 'shutting-down'
> - 'terminated'
> - 'rebooting'
> itsm\_proceedWithRestart:
> type: categorical
> values:
> - 'yes'
> - 'no'
> 
> intents:
> - itsm\_greet
> - itsm\_aws\_start\_ec2\_instance
> - itsm\_farewell
> - itsm\_aws\_ec2\_operation\_confirm\_or\_deny
> 
> entities:
> - itsm\_cloudPlatform
> - itsm\_regionId
> - itsm\_instanceId
> - itsm\_proceedWithRestart
> 
> templates:
> utter\_itsm\_greet:
> - text: 'Welcome! I am your automated Luma virtual assistant. I can help improve overall ITSM efficiency and productivity by handling routine issues much faster.'
> - text: 'Welcome! I am your automated Luma virtual assistant. I can try and expedite the most common IT help you may need.'
> utter\_itsm\_ask\_goal:
> - text: 'What can I help you with?'
> - text: 'How may I help you today?'
> utter\_itsm\_goodbye:
> - text: 'I hope we resolved your issue thoroughly. If you have any questions or need any further assistance, I would be happy to help. Goodbye!'
> - text: 'Should you need any further assistance, dont hesitate to contact me. Have a good day! Bye Bye!'
> utter\_itsm\_ask\_aws\_ec2\_cloud\_platform:
> - text: 'Which cloud platform do you have your VM instance hosted?'
> utter\_itsm\_ask\_aws\_ec2\_instanceid\_to\_start:
> - text: 'Please specify the AWS EC2 instance-id you wish to restart.'
> utter\_itsm\_inform\_invalid\_aws\_ec2\_instance\_id:
> - text: 'The AWS EC2 instance id {itsm\_instanceId} you specified appears to be invalid. Please provide a valid AWS instance id.'
> utter\_itsm\_confirm\_aws\_ec2\_instance\_start:
> - text: 'Do you want to proceed with starting up your Amazon EC2 instance {itsm\_instanceId} \[{itsm\_instanceType}, hosted in {itsm\_regionId}\] now (yes/no)?'
> utter\_itsm\_cancel\_aws\_ec2\_instance\_start:
> - text: "Okay, I'm cancelling the boot operation since you disapproved it."
> utter\_itsm\_inform\_aws\_ec2\_instance\_start\_is\_in\_progress:
> - text: 'As per your request, I have initiated a boot of your Amazon EC2 instance {itsm\_instanceId} \[${itsm\_instanceType}, hosted in {itsm\_regionId}\]. The instance has transitioned into \[${itsm\_instanceState}\] state. It can take a few minutes for the instance to enter the running state.'
> utter\_itsm\_ask\_if\_further\_assistance\_is\_required:
> - text: 'Do you require any further assistance?'
> utter\_itsm\_inform\_initiating\_aws\_ec2\_instance\_start:
> - text: 'Thank you for your confirmation. I am initiating a request to start the Amazon EC2 instance {itsm\_instanceId}.'
> utter\_itsm\_inform\_failed\_to\_start\_aws\_ec2\_instance:
> - text: 'Sorry, an unexpected error occurred when trying to restart Amazon EC2 instance {itsm\_instanceId}. You may need to consult your Amazon administrator to investigate this issue.'
> utter\_itsm\_inform\_failed\_to\_get\_current\_aws\_ec2\_instance\_state:
> - text: 'Sorry, an unexpected error occurred when trying to identify the current state of Amazon EC2 instance {itsm\_instanceId}. You may need to consult your Amazon administrator to investigate this issue.'
> utter\_itsm\_ask\_aws\_ec2\_region\_id:
> - text: 'Can you specify the Amazon EC2 region id in which your instance is placed?'
> utter\_itsm\_inform\_checking\_current\_aws\_ec2\_instance\_state:
> - text: 'Okay, let me check the current state of your Amazon EC2 instance {itsm\_instanceId} placed in {itsm\_regionId}.'
> 
> actions:
> - utter\_itsm\_greet
> - utter\_itsm\_ask\_goal
> - utter\_itsm\_goodbye
> - utter\_itsm\_ask\_aws\_ec2\_cloud\_platform
> - utter\_itsm\_ask\_aws\_ec2\_instanceid\_to\_start
> - utter\_itsm\_inform\_invalid\_aws\_ec2\_instance\_id
> - utter\_itsm\_confirm\_aws\_ec2\_instance\_start
> - utter\_itsm\_cancel\_aws\_ec2\_instance\_start
> - utter\_itsm\_inform\_aws\_ec2\_instance\_start\_is\_in\_progress
> - utter\_itsm\_ask\_if\_further\_assistance\_is\_required
> - utter\_itsm\_inform\_initiating\_aws\_ec2\_instance\_start
> - utter\_itsm\_inform\_failed\_to\_start\_aws\_ec2\_instance
> - utter\_itsm\_inform\_failed\_to\_get\_current\_aws\_ec2\_instance\_state
> - utter\_itsm\_ask\_aws\_ec2\_region\_id
> - utter\_itsm\_inform\_checking\_current\_aws\_ec2\_instance\_state
> - action\_itsm\_get\_current\_aws\_ec2\_instance\_state
> - action\_itsm\_start\_aws\_ec2\_instance
> 
> \`\`\`

---

<div class="post-metadata">

**Author:** ![Nexemics](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.rasa.com/nexemics/32/1927_2.png) [@Nexemics](https://forum.rasa.com/u/Nexemics)\
**Post date:** [February 22, 2019, 12:58pm UTC](https://forum.rasa.com/t/issue-regarding-date-extraction/5381/3 "2019-02-22T12:58:44Z")

</div>

Yes I am using spacy tokenizer. I think I understood the problem. But I haven’t figured out the alternative.
