From 656219b2a25533c54ac1ce6f532e5510f57e4dee Mon Sep 17 00:00:00 2001 From: Jared Swift Date: Tue, 21 Nov 2023 11:37:55 +0000 Subject: [PATCH 1/3] chore: update receptionist data and pipeline. --- .../assistants/receptionist/config.yml | 34 +- .../assistants/receptionist/data/nlu.yml | 350 +----------------- .../assistants/receptionist/domain.yml | 3 +- 3 files changed, 34 insertions(+), 353 deletions(-) diff --git a/common/speech/lasr_rasa/assistants/receptionist/config.yml b/common/speech/lasr_rasa/assistants/receptionist/config.yml index f636fc49a..c871f8d4e 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/config.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/config.yml @@ -11,27 +11,19 @@ assistant_id: receptionist language: en pipeline: -# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model. -# # If you'd like to customize it, uncomment and adjust the pipeline. -# # See https://rasa.com/docs/rasa/tuning-your-model for more information. -# - name: WhitespaceTokenizer -# - name: RegexFeaturizer -# - name: LexicalSyntacticFeaturizer -# - name: CountVectorsFeaturizer -# - name: CountVectorsFeaturizer -# analyzer: char_wb -# min_ngram: 1 -# max_ngram: 4 -# - name: DIETClassifier -# epochs: 100 -# constrain_similarities: true -# - name: EntitySynonymMapper -# - name: ResponseSelector -# epochs: 100 -# constrain_similarities: true -# - name: FallbackClassifier -# threshold: 0.3 -# ambiguity_threshold: 0.1 + - name: SpacyNLP + - name: SpacyTokenizer + - name: SpacyEntityExtractor + dimensions: ["CARDINAL"] + - name: SpacyFeaturizer + pooling: mean + - name: CountVectorsFeaturizer + analyzer: "char_wb" + min_ngram: 1 + max_ngram: 4 + - name: DIETClassifier + epochs: 100 + - name: EntitySynonymMapper # Configuration for Rasa Core. diff --git a/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml b/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml index 42ce310f2..01e34dd86 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml @@ -1,13 +1,22 @@ version: "3.1" nlu: - - intent: fav_drink examples: | - [Orange juice](drink) - - [Coffee](drink) - [orange juice](drink) - - [coffee](drink) + - [cola](drink) + - [Cola](drink) + - [Iced tea](drink) + - [iced tea](drink) + - [Milk](drink) + - [milk](drink) + - [Red wine](drink) + - [red wine](drink) + - [Tropical juice](drink) + - [tropical juice](drink) + - My favourite drink is [cola](drink) + - I like to drink [orange juice](drink) - intent: name examples: | @@ -21,332 +30,13 @@ nlu: - [Paris](name) - [Robin](name) - [Simone](name) + - My name is [Adel](name) + - It's [Jane](name) + - I am [Paris](name) + - I'm [Robin](name) -- intent: affirm - examples: | - - Accept - - Awesome! - - Good - - Great - - I accept - - I accept. - - I agree - - I am using it - - I changed my mind. I want to accept it - - I do - - I get it - - I guess so - - I have used it in the past - - I will - - I'd absolutely love that - - I'm sure I will! - - I'm using it - - Nice - - OK - - Ofcourse - - Oh yes - - Oh, ok - - Ok - - Ok let's start - - Ok. - - Okay - - Okay! - - PLEASE - - SURE - - Sure - - Sweet - - That would be great - - YES - - YUP - - Yea - - Yeah - - Yeah sure - - Yep - - Yep that's fine - - Yep! - - Yepp - - Yes - - Yes I do - - Yes please - - Yes please! - - Yes, I accept - - Yes. - - Yup - - a little - - absolutely - - accept - - accepted - - agreed - - ah ok - - alright - - alright, cool - - amayzing - - amazing! - - awesome - - awesome! - - confirm - - cool story bro - - definitely yes without a doubt - - done - - fair enough - - fcourse - - fine - - fuck yeah! - - go - - go ahead - - go for it - - going super well - - good. - - great - - great lets do that - - great! - - hell yeah - - hell yes - - hm, i'd like that - - how nice! - - i accept - - i agree - - i am! - - i want that - - i will! - - it is ok - - its okay - - ja - - ja cool - - ja thats great - - jezz - - jo - - k - - kk - - lets do it - - lets do this - - not bad - - of course - - ofcoure i do - - ofcourse - - oh awesome! - - oh cool - - oh good !! - - oh super - - ok - - ok cool - - ok fine - - ok friend - - ok good - - ok great - - ok i accept - - ok sara - - ok, I behave now - - ok, I understood - - ok, Sara - - ok... - - okay - - okay cool - - okay sure - - okay.. - - oki doki - - okie - - ook - - oui - - perfect - - please - - si - - sort of - - sure - - sure thing - - sure! - - that is cool - - that ok - - that sounds fine - - that's great - - thats fine - - thats good - - thats great - - top - - uh-huh - - very much - - well yes - - y - - ya - - ya cool - - ya go for it - - ya i want - - ya please - - ya thats cool - - yaah - - yap - - yaps - - yas - - yay - - ye - - ye splease - - yea - - yeah - - yeah do that - - yeah sure - - yeah'= - - yeah, why not - - yeeeeezzzzz - - yeeees - - yep - - yep i want that - - yep if i have to - - yep please - - yep that's nice - - yep thats cool - - yep, will do thank you - - yep. :/ - - yes - - yes ... - - yes I do - - yes accept please - - yes baby - - yes cool - - yes give me information - - yes go ahead - - yes go for it - - yes great - - yes i accept - - yes i agree - - yes i have built a bot before - - yes i have! - - yes it is - - yes it was okay - - yes of course - - yes pleae - - yes please - - yes please! - - yes pls - - yes sirfr - - yes that's great - - yes that's what i want - - yes you can - - yes' - - yes, I'd love to - - yes, cool - - yes, give me information, please - - yes,i am - - yes. - - yesh - - yess - - yessoo - - yesss - - yesssss - - yesyestyes - - yesyesyes - - yez - - yop - - you asked me a yes or no question, which i answered with yes - - you got me, I accept, if you want me to - - yres - - ys - - yup - - yyeeeh - - Okay cool - - ok.. - - considering - - More a less - - sounds good! - - really -- intent: deny +- intent: age examples: | - - I don't want to - - I don't want to give it to you - - I don't want to say - - I dont want to tell - - I'm not giving you my email address - - I'm not going to give it to you - - NEIN - - NO - - NO DON"T WANT THIS! - - Nah - - Neither - - Never - - Nevermind - - No - - No thank you - - No, not really. - - No, thank you - - No. - - Nopes - - Not really - - absolutely not - - decline - - definitely not - - deny - - i decline - - i don not like this - - i don't think so - - i don't want either of those - - i don't want to - - i don't want to give you my email - - i dont want to - - i dont want to accept :P lol - - i guess it means - no - - i'm afraid not - - i'm not sure - - it is going pretty badly - - it sucks - - it sux - - n - - na - - nah - - nah I'm good - - nah not for me - - nah, first time - - nah, i'm good - - nehi - - nein - - neither - - never - - never mind - - no - - no :( - - no I dont want - - no I haven't decided yet if I want to sign up - - no and no again - - no bots at all - - no go - - no i can't - - no i don't accept - - no i dont want to - - no i dont want to accept :P lol - - no i won't - - no ma'am - - no sir - - no sorry - - no thank s - - no thank you - - no thanks - - no way - - no you did it wrong - - no!!!! - - no, i hate it - - no, my frst time - - no, thank you - - no, thanks - - no, thankyou - - no. u r idiot - - non - - noooooooooo - - noooooooooooooooooooooooooooooooooooooooo - - nop - - nope - - nope! - - nope. i am good - - not going well at all - - not really - - not right now - - not yet - - nö - - sorry not right now - - still dont want to tell - - thanks but no thanks - - this sucks - - very bad - - I do not need help installing - - I don't wanna tell the name of my company - - no stop - - stop it, i do not care!!! - - none of them - - I don't agree \ No newline at end of file + - I am 18 years old + - 23 + - I am 21 \ No newline at end of file diff --git a/common/speech/lasr_rasa/assistants/receptionist/domain.yml b/common/speech/lasr_rasa/assistants/receptionist/domain.yml index ff2ad1fe6..8ccc88091 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/domain.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/domain.yml @@ -3,8 +3,7 @@ version: "3.1" intents: - fav_drink - name - - affirm - - deny + - age entities: - drink - name From fb1a093eb85742bf80615a1c1c2711dd7e8defcc Mon Sep 17 00:00:00 2001 From: Jared Swift Date: Tue, 21 Nov 2023 11:43:08 +0000 Subject: [PATCH 2/3] fix: explicitly set spacy NLP model. --- common/speech/lasr_rasa/assistants/receptionist/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/common/speech/lasr_rasa/assistants/receptionist/config.yml b/common/speech/lasr_rasa/assistants/receptionist/config.yml index c871f8d4e..e8083655d 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/config.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/config.yml @@ -12,6 +12,7 @@ language: en pipeline: - name: SpacyNLP + model: "en_core_web_md" - name: SpacyTokenizer - name: SpacyEntityExtractor dimensions: ["CARDINAL"] From 30640eecdbc64532908250a53c15398d3d58779b Mon Sep 17 00:00:00 2001 From: Jared Swift Date: Tue, 21 Nov 2023 12:25:38 +0000 Subject: [PATCH 3/3] fix: drop age for now, since spacy is broken(?). --- .../assistants/receptionist/config.yml | 35 +++++++++++-------- .../assistants/receptionist/data/nlu.yml | 8 +---- .../assistants/receptionist/domain.yml | 1 - 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/common/speech/lasr_rasa/assistants/receptionist/config.yml b/common/speech/lasr_rasa/assistants/receptionist/config.yml index e8083655d..f636fc49a 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/config.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/config.yml @@ -11,20 +11,27 @@ assistant_id: receptionist language: en pipeline: - - name: SpacyNLP - model: "en_core_web_md" - - name: SpacyTokenizer - - name: SpacyEntityExtractor - dimensions: ["CARDINAL"] - - name: SpacyFeaturizer - pooling: mean - - name: CountVectorsFeaturizer - analyzer: "char_wb" - min_ngram: 1 - max_ngram: 4 - - name: DIETClassifier - epochs: 100 - - name: EntitySynonymMapper +# # No configuration for the NLU pipeline was provided. The following default pipeline was used to train your model. +# # If you'd like to customize it, uncomment and adjust the pipeline. +# # See https://rasa.com/docs/rasa/tuning-your-model for more information. +# - name: WhitespaceTokenizer +# - name: RegexFeaturizer +# - name: LexicalSyntacticFeaturizer +# - name: CountVectorsFeaturizer +# - name: CountVectorsFeaturizer +# analyzer: char_wb +# min_ngram: 1 +# max_ngram: 4 +# - name: DIETClassifier +# epochs: 100 +# constrain_similarities: true +# - name: EntitySynonymMapper +# - name: ResponseSelector +# epochs: 100 +# constrain_similarities: true +# - name: FallbackClassifier +# threshold: 0.3 +# ambiguity_threshold: 0.1 # Configuration for Rasa Core. diff --git a/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml b/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml index 01e34dd86..2b3eaeb44 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/data/nlu.yml @@ -33,10 +33,4 @@ nlu: - My name is [Adel](name) - It's [Jane](name) - I am [Paris](name) - - I'm [Robin](name) - -- intent: age - examples: | - - I am 18 years old - - 23 - - I am 21 \ No newline at end of file + - I'm [Robin](name) \ No newline at end of file diff --git a/common/speech/lasr_rasa/assistants/receptionist/domain.yml b/common/speech/lasr_rasa/assistants/receptionist/domain.yml index 8ccc88091..dbe2f235d 100644 --- a/common/speech/lasr_rasa/assistants/receptionist/domain.yml +++ b/common/speech/lasr_rasa/assistants/receptionist/domain.yml @@ -3,7 +3,6 @@ version: "3.1" intents: - fav_drink - name - - age entities: - drink - name