Hello,
I want to use regex for improving my intent classifier.
As explained in the doc -
Regular expressions can be used to support the intent classification and entity extraction.
regex:zipcode
- [0-9]{5}
regex:greet
- hey[^\s]*
does it mean that intent greet will be triggerred by RASA NLU only when user text starts with “hey”
I want to understand it .
kindly help me understand how it works.
For your information , i know how regex can be helpful for entity extraction.
I used it as - \
intent:ask_assign
- assign issue
- assign issue to
- assign issues
- assign me
regex:ask_assign
- assign[^\s]*
user_text_1 - assign issue
RASA - Received user message ‘assign issue’ with intent ‘{‘name’: ‘ask_assign’, ‘confidence’: 0.9508237838745117}’ and entities ‘[]’
user_text_2 - lets assign
RASA - Received user message ‘lets assign’ with intent ‘{‘name’: ‘ask_assign’, ‘confidence’: 0.8390434980392456}’ and entities ‘[]’
--------------------------------------------
my config.yml file is -\
Configuration for Rasa NLU.
Components
language: en
pipeline:
-
name: WhitespaceTokenizer
-
name: RegexFeaturizer
-
name: LexicalSyntacticFeaturizer
-
name: CRFEntityExtractor
-
name: CountVectorsFeaturizer
-
name: CountVectorsFeaturizer
analyzer: “char_wb”
min_ngram: 1
max_ngram: 4
-
name: “EmbeddingIntentClassifier”
epochs: 100
-
name: EntitySynonymMapper
Configuration for Rasa Core.
Policies
policies:
-
name: MemoizationPolicy
-
name: KerasPolicy
max_history: 5
epochs: 100
-
name: MappingPolicy
kindly help me
thanks