Nexemics
(Digvijay Patil)
February 20, 2019, 10:31pm
1
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.
I am forced to manually correct this but I am hoping for any tweaks to fix this permanently.
Thanks.
ypk46
(YPK)
February 21, 2019, 3:48am
2
Are you using spacy tokenizer in your pipeline? I encountered a similar case and found this issue in github.
opened 02:39AM - 28 Nov 18 UTC
closed 12:13PM - 21 Mar 19 UTC
**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-south-1"
- "eu-west-3"
- "eu-west-2"
- "eu-west-1"
- "ap-northeast-2"
- "ap-northeast-1"
- "sa-east-1"
- "ca-central-1"
- "ap-southeast-1"
- "ap-southeast-2"
- "eu-central-1"
- "us-east-1"
- "us-east-2"
- "us-west-1"
- "us-west-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)


**Content of domain file** (if used & relevant):
```yaml
slots:
itsm_cloudPlatform:
type: text
itsm_instanceId:
type: text
itsm_regionId:
type: categorical
values:
- "ap-south-1"
- "eu-west-3"
- "eu-west-2"
- "eu-west-1"
- "ap-northeast-2"
- "ap-northeast-1"
- "sa-east-1"
- "ca-central-1"
- "ap-southeast-1"
- "ap-southeast-2"
- "eu-central-1"
- "us-east-1"
- "us-east-2"
- "us-west-1"
- "us-west-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
```
Nexemics
(Digvijay Patil)
February 22, 2019, 12:58pm
3
Yes I am using spacy tokenizer.
I think I understood the problem. But I haven’t figured out the alternative.