427 lines
10 KiB
Plaintext
427 lines
10 KiB
Plaintext
|
{
|
||
|
"cells": [
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "explicit-slovak",
|
||
|
"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": "upset-brunswick",
|
||
|
"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": 26,
|
||
|
"id": "amateur-format",
|
||
|
"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": "dressed-judge",
|
||
|
"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": 25,
|
||
|
"id": "automated-friendship",
|
||
|
"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>] [<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": 15,
|
||
|
"id": "attended-portugal",
|
||
|
"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>];\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": 24,
|
||
|
"id": "floating-lender",
|
||
|
"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];\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": 1,
|
||
|
"id": "indirect-edward",
|
||
|
"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> = (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": 18,
|
||
|
"id": "continental-syria",
|
||
|
"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": "everyday-sullivan",
|
||
|
"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": 12,
|
||
|
"id": "unexpected-vietnamese",
|
||
|
"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>+;\n",
|
||
|
"\n",
|
||
|
"<cyfra> = 0|1|2|3|4|5|6|7|8|9\n"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": 15,
|
||
|
"id": "annual-bridge",
|
||
|
"metadata": {},
|
||
|
"outputs": [
|
||
|
{
|
||
|
"name": "stdout",
|
||
|
"output_type": "stream",
|
||
|
"text": [
|
||
|
"Overwriting ./grammar/bye.jsgf\n"
|
||
|
]
|
||
|
}
|
||
|
],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "warming-pharmaceutical",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "upset-inclusion",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"!jupyter nbconvert --to script MST.ipynb"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "absolute-banana",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": [
|
||
|
"!jupyter nbconvert --to script AJN_final.ipynb"
|
||
|
]
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "static-science",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "loose-championship",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "emerging-conviction",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "polished-identification",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "unexpected-quarter",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
},
|
||
|
{
|
||
|
"cell_type": "code",
|
||
|
"execution_count": null,
|
||
|
"id": "minus-archive",
|
||
|
"metadata": {},
|
||
|
"outputs": [],
|
||
|
"source": []
|
||
|
}
|
||
|
],
|
||
|
"metadata": {
|
||
|
"kernelspec": {
|
||
|
"display_name": "Python 3 (ipykernel)",
|
||
|
"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.9.7"
|
||
|
}
|
||
|
},
|
||
|
"nbformat": 4,
|
||
|
"nbformat_minor": 5
|
||
|
}
|