465 lines
12 KiB
Plaintext
465 lines
12 KiB
Plaintext
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "western-ghost",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"%%writefile ./grammar/hello.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar hello;\n",
|
|
"\n",
|
|
"public <hello> = <words_hello>;\n",
|
|
"\n",
|
|
"<words_hello> = czesc | hej | witaj | hey | hello | dzień dobry | siema | siemanko;"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 16,
|
|
"id": "affiliated-particular",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Writing ./grammar/bye.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/bye.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar bye;\n",
|
|
"\n",
|
|
"public <bye> = <words_bye>;\n",
|
|
"\n",
|
|
"<words_bye> = do usłyszenia | do widzenia | do zobaczenia | na razie | bye | zegnaj | nara | musze juz isc;\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 30,
|
|
"id": "available-carpet",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/repertuar.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/repertuar.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar repertuar;\n",
|
|
"\n",
|
|
"public <repertuar> = <prosba> [aktualny | obecny | aktualnie | obecnie | teraz] [repertuar] ;\n",
|
|
"\n",
|
|
"<prosba> = prosze podac | podaj | jaki jest | co [teraz] gracie | co leci | jakie sa filmy | jakie filmy gracie;\n",
|
|
"\n",
|
|
"\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "arranged-bumper",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"%%writefile ./grammar/cancel.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar cancel;\n",
|
|
"\n",
|
|
"public <odwolaj> = <prosba> <anulacja>;\n",
|
|
"\n",
|
|
"<prosba> = chce | chcialbym | chcialabym | prosze;\n",
|
|
"\n",
|
|
"<anulacja> = odwolac | zrezygnowac | anulowac ([bilety]|[bilet]|[z biletow]|[rezerwacje]|[z rezerwacji]);"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 31,
|
|
"id": "controlling-instrument",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/book.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/book.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar book;\n",
|
|
"\n",
|
|
"public <rezerwuj> = <prosba> [<ilosc_biletow>] [[do kina] | [na seans]] [<tytul_filmu>] [<dzien_rezerwacji>] [<godzina_rezerwacji>];\n",
|
|
"\n",
|
|
"<prosba> = (chce | chcialbym | chcialabym | poprosze) [zarezerwowac];\n",
|
|
"\n",
|
|
"<ilosc_biletow> = <liczba> {ilosc} (bilety | biletow | bilet);\n",
|
|
"\n",
|
|
"<liczba> = jeden | dwa | trzy | cztery | piec | szesc | siedem | osiem | dziewiec | dziesiec |1|2|3|4|5|6|7|8|9|10;\n",
|
|
"\n",
|
|
"<tytul_filmu> = na [film] <tytul> {tytul};\n",
|
|
"\n",
|
|
"<tytul> = Batman | Batmana | Uncharted | Pitbull | Ambulans | Bunkier strachu | Corka | Corke | Inni ludzie | Śmierć na Nilu | Skarb Mikołajka;\n",
|
|
"\n",
|
|
"<dzien_rezerwacji> = na <dzien> {dzien};\n",
|
|
"\n",
|
|
"<dzien> = (dzisiaj | jutro | poniedziałek | wtorek | srode | czwartek | piatek | sobotę | niedziele) | <data>;\n",
|
|
"\n",
|
|
"<data> = (8|9|10|11|12|13|14|15) [czerwca] ; \n",
|
|
"\n",
|
|
"<godzina_rezerwacji> = na [godzinę] <godzina_z_minutami> {godzina};\n",
|
|
"\n",
|
|
"<godzina_z_minutami> = <godzina> [<minuty>];\n",
|
|
"\n",
|
|
"<godzina> = 10|11|12|13|14|15|16|17|18|19|20|21|22|23 | dziesiata | jedenasta | dwunasta | trzynasta | czternasta | pietnasta | szesnasta | siedemnasta | osiemnasta | dziewietnasta | dwudziesta;\n",
|
|
"\n",
|
|
"<minuty> = pietnaście | trzydzieści | czterdziesci piec| 15 | 30 | 45;"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 20,
|
|
"id": "center-conversation",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/ilosc_bil.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/ilosc_bil.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar ilosc_bil;\n",
|
|
"\n",
|
|
"public <ilosc_bil> = [<prosba>] [<ilosc_biletow>] [do kina] | [na seans];\n",
|
|
"\n",
|
|
"<prosba> = (chce | chcialbym | chcialabym | poprosze) [zarezerwowac];\n",
|
|
"\n",
|
|
"<ilosc_biletow> = <liczba> {ilosc} [(bilety | biletow | bilet)];\n",
|
|
"\n",
|
|
"<liczba> = jeden | dwa | trzy | cztery | piec | szesc | siedem | osiem | dziewiec | dziesiec |1|2|3|4|5|6|7|8|9|10;\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 23,
|
|
"id": "circular-matter",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/tyt_filmu.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/tyt_filmu.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar tyt_filmu;\n",
|
|
"\n",
|
|
"public <tyt_filmu> = [<prosba>] [<tytul_filmu>];\n",
|
|
"\n",
|
|
"<prosba> = (chce | chcialbym | chcialabym | poprosze) [zarezerwowac] [bilet | bilety];\n",
|
|
"\n",
|
|
"<tytul_filmu> = [na] [film] <tytul> {tytul};\n",
|
|
"\n",
|
|
"<tytul> = Batman | Batmana | Uncharted | Pitbull | Ambulans | Bunkier strachu | Corka | Corke | Inni ludzie | Śmierć na Nilu | Skarb Mikołajka;"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 27,
|
|
"id": "animated-metallic",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/dni.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/dni.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar dni;\n",
|
|
"\n",
|
|
"public <dni> = [<prosba>] [<dzien_rezerwacji>];\n",
|
|
"\n",
|
|
"<prosba> = (chce | chcialbym | chcialabym | poprosze) [zarezerwowac];\n",
|
|
"\n",
|
|
"<dzien_rezerwacji> = [na] <dzien> {dzien};\n",
|
|
"\n",
|
|
"<dzien> = (dzis | dzisiaj | jutro | poniedziałek | wtorek | srode | czwartek | piatek | sobotę | niedziele) | <data>;\n",
|
|
"\n",
|
|
"<data> = (15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30) czerwca; \n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 26,
|
|
"id": "recognized-aaron",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/godziny.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/godziny.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar godziny;\n",
|
|
"\n",
|
|
"public <godziny> = [<prosba>] <godzina_rezerwacji>;\n",
|
|
"\n",
|
|
"<prosba> = (chce | chcialbym | chcialabym | poprosze) [zarezerwowac];\n",
|
|
"\n",
|
|
"<godzina_rezerwacji> = [na] [godzine] <godzina_z_minutami> {godzina};\n",
|
|
"\n",
|
|
"<godzina_z_minutami> = <godzina> [<minuty>];\n",
|
|
"\n",
|
|
"<godzina> = 10|11|12|13|14|15|16|17|18|19|20|21|22|23 | dziesiata | jedenasta | dwunasta | trzynasta | czternasta | pietnasta | szesnasta | siedemnasta | osiemnasta | dziewietnasta | dwudziesta;\n",
|
|
"\n",
|
|
"<minuty> = pietnaście | trzydzieści | czterdziesci piec | 15 | 30 | 45;"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 7,
|
|
"id": "whole-diary",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/miejsca.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/miejsca.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar miejsca;\n",
|
|
"\n",
|
|
"public <miejsca> = [z | na | w] <miejsce> {miejsce};\n",
|
|
"\n",
|
|
"<miejsce> = dole | gorze | srodku | tylu | blizej | przodu;\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 32,
|
|
"id": "mineral-converter",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/nr_tel.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/nr_tel.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar numer;\n",
|
|
"\n",
|
|
"public <numer> = <nr> {numer};\n",
|
|
"\n",
|
|
"<nr> = <cyfra><cyfra><cyfra>+;\n",
|
|
"\n",
|
|
"<cyfra> = 0|1|2|3|4|5|6|7|8|9\n"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 38,
|
|
"id": "adaptive-recycling",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/zapytanie.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/zapytanie.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar zapytanie;\n",
|
|
"\n",
|
|
"public <zapytanie> = <pytanie>;\n",
|
|
"\n",
|
|
"<pytanie> = mam pytanie | jakie sa ([ulgi] | [ceny]) | o czym ([to] | [jest]) [<tytul>];\n",
|
|
"\n",
|
|
"<tytul> = Batman | Batmana | Uncharted | Pitbull | Ambulans | Bunkier strachu | Corka | Corke | Inni ludzie | Śmierć na Nilu | Skarb Mikołajka;"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": 37,
|
|
"id": "lesser-specific",
|
|
"metadata": {},
|
|
"outputs": [
|
|
{
|
|
"name": "stdout",
|
|
"output_type": "stream",
|
|
"text": [
|
|
"Overwriting ./grammar/seanse.jsgf\n"
|
|
]
|
|
}
|
|
],
|
|
"source": [
|
|
"%%writefile ./grammar/seanse.jsgf\n",
|
|
"#JSGF V1.0 UTF-8 pl;\n",
|
|
"\n",
|
|
"grammar seanse;\n",
|
|
"\n",
|
|
"public <seanse> = <godz>;\n",
|
|
"\n",
|
|
"<godz> = o ktorej ([gracie] | [jest] | [leci]) [<tytul>]| w jakich godzinach ([gracie] | [leci] | [jest]) [<tytul>] | jakie [sa] [dostepne] [seanse];\n",
|
|
"\n",
|
|
"<tytul> = Batman | Batmana | Uncharted | Pitbull | Pitbulla | Pitbula | Ambulans | Bunkier strachu | Corka | Corke | Inni ludzie | Śmierć na Nilu | Skarb Mikołajka;"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "canadian-warrior",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "operating-formula",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"!jupyter nbconvert --to script MST.ipynb"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "trying-gibraltar",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"!jupyter nbconvert --to script AJN_final.ipynb"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "raising-partner",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "orange-partner",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "chief-nursery",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "attached-seeker",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "usual-handle",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "executive-liability",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": []
|
|
}
|
|
],
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"display_name": "Python 3",
|
|
"language": "python",
|
|
"name": "python3"
|
|
},
|
|
"language_info": {
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"file_extension": ".py",
|
|
"mimetype": "text/x-python",
|
|
"name": "python",
|
|
"nbconvert_exporter": "python",
|
|
"pygments_lexer": "ipython3",
|
|
"version": "3.7.3"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|