add new grammars
This commit is contained in:
parent
2a1f03b365
commit
7b8937a98a
@ -4,7 +4,7 @@ import os
|
||||
|
||||
__location__ = Path().resolve()
|
||||
|
||||
book_grammar = jsgf.parse_grammar_file(os.path.join(__location__, "grammar1.jsgf"))
|
||||
book_grammar = jsgf.parse_grammar_file(os.path.join(__location__, "grammar3.jsgf"))
|
||||
book_grammar
|
||||
|
||||
|
||||
@ -35,10 +35,10 @@ def nlu(utterance):
|
||||
|
||||
|
||||
|
||||
utterance = 'Cześć dodaj ser'
|
||||
utterance = 'kup dwie baterie'
|
||||
matched = book_grammar.find_matching_rules(utterance)
|
||||
matched
|
||||
|
||||
nlu('Cześć dodaj ser')
|
||||
nlu('kup dwie baterie')
|
||||
|
||||
get_dialog_act(matched[0])
|
@ -1,6 +1,4 @@
|
||||
#JSGF V1.0;
|
||||
grammar zakupyOnline;
|
||||
@charset "UTF-8";
|
||||
#JSGF V1.0 UTF-8;
|
||||
|
||||
grammar zakupyOnline;
|
||||
|
||||
@ -32,7 +30,7 @@ public <command> = <buyCommand> | <cartCommand> | <filterCommand> | <searchComma
|
||||
|
||||
<filterCommand> = filtruj według <filterType>;
|
||||
|
||||
<filterType> = (ceny rosnącą | ceny malejąco | marka <brandName> | kolor <colorName> | rozmiar <sizeType> | ranking <ratingType> | dostępność);
|
||||
<filterType> = (ceny rosnąco | ceny malejąco | dostępność | marka <brandName> | kolor <colorName> | rozmiar <sizeType> | ranking <ratingType>);
|
||||
|
||||
<brandName> = (Coca-Cola | Pepsi | Dr. Pepper | Tiger | Milka | L'Oreal | Procter & Gamble | Samsung | Apple | Sony);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user