test new task

This commit is contained in:
Filip Gralinski 2021-01-02 12:59:27 +01:00
parent 431cbee9fa
commit f04c816564
4 changed files with 93 additions and 1 deletions

44
TaskG01/description.txt Normal file
View File

@ -0,0 +1,44 @@
UNDER TESTING. DO NOT SOLVE YET.
Use regular expressions to mark Polish first-person masculine forms.
You should handle the following types of expressions:
* first-person masculine past forms of verbs ("zrobiłem", "pisałem", etc.),
* first-person singular masculine forms of the verb "być" ("be") combined
with singular masculine nominative forms of adjectives ("wysoki", "sprytny", etc.),
assuming that the form of the verb "być" is to the left of the adjective, not
more than 3 other words,
* the verb "będę" combined with the past participle (i.e. 3rd person
masculine imperfect form, e.g. "robił", pisał"), assuming
that "będę" is to the left of the adjective, not
more than 3 other words to the left of the participle OR directly
to the right of the participle ("robił będę").
The first-person masculine forms should be marked with curly brackets.
You should mark only the masculine form. Do not mark the form of "być"
(unless it clearly a masculine form, i.e. for "byłem").
The match should case-insensitive.
The PoliMorf dictionary of inflected forms should be applied:
http://zil.ipipan.waw.pl/PoliMorf?action=AttachFile&do=get&target=PoliMorf-0.6.7.tab.gz
Suggested steps:
1. Extract all the needed forms from the PoliMorf dictionary:
* 1st person masculine past forms of verbs
* singular masculine nominative forms of adjectives
* masculine past participle (3rd person masculine imperfect forms of verbs)
You could do this using grep/cut commands — to obtain a simple text files
with a word in each line. You can do this once and commit the 3 files to your repository.
2. In your `run` script/program, read the 3 files and create a large
expression with alternatives. Use a regexp library based on DFAs (determintistic
finite-automatons).
POINTS: 4
DEADLINE: 2021-01-20 15:30:00
REMAINDER: 0/2

24
TaskG01/simple.exp Normal file
View File

@ -0,0 +1,24 @@
Tu nic nie ma.
Wczoraj {ugotowałem} ziemniaki.
{Jechałem}, {jechałem} i {jechałem}, a potem się {zatrzymałem}.
{Umyłem} się mydłem.
Jestem {wysoki}.
Jest wysoki.
Mówią, że jestem od zawsze niezwykle {sprytny}.
aaaa {byłem} aaa {zielony} ddd
aaaa {byłem} aaa bbb {zielony} ddd
aaaa {byłem} aaa bbb ccc {zielony} ddd
aaaa {byłem} aaa bbb ccc ddd zielony ddd
aaaa był aaa bbb zielony ddd
aaaa byłam aaa bbb zielony ddd
aaaa byłam aaa bbb zielona ddd
teraz będę {pisał} książkę
będę teraz {pisał} książkę
będę teraz dla ciebie {pisał} książkę
teraz dla ciebie {pisał} będę księżkę
będę i on napisał książkę
aaa będę {śpiewał} bbb
aaa będę ccc {śpiewał} bbb
aaa będę ccc ddd {śpiewał} bbb
aaa będę ccc ddd eee {śpiewał} bbb
aaa będę ccc ddd eee fff śpiewał bbb

24
TaskG01/simple.in Normal file
View File

@ -0,0 +1,24 @@
Tu nic nie ma.
Wczoraj ugotowałem ziemniaki.
Jechałem, jechałem i jechałem, a potem się zatrzymałem.
Umyłem się mydłem.
Jestem wysoki.
Jest wysoki.
Mówią, że jestem od zawsze niezwykle sprytny.
aaaa byłem aaa zielony ddd
aaaa byłem aaa bbb zielony ddd
aaaa byłem aaa bbb ccc zielony ddd
aaaa byłem aaa bbb ccc ddd zielony ddd
aaaa był aaa bbb zielony ddd
aaaa byłam aaa bbb zielony ddd
aaaa byłam aaa bbb zielona ddd
teraz będę pisał książkę
będę teraz pisał książkę
będę teraz dla ciebie pisał książkę
teraz dla ciebie pisał będę księżkę
będę i on napisał książkę
aaa będę śpiewał bbb
aaa będę ccc śpiewał bbb
aaa będę ccc ddd śpiewał bbb
aaa będę ccc ddd eee śpiewał bbb
aaa będę ccc ddd eee fff śpiewał bbb

View File

@ -21,7 +21,7 @@ cp "${PREFIX}/count-points.pl" arena/
cp "${PREFIX}/overrides.txt" arena/
cp "${PREFIX}/Makefile" arena/
for TX in X01 X02 X03 A01 B01 B02 B03 B04 D00 D01 D02 D03 D04 D05 E00 E01 E02 E03 E04 E05 E06 E07 E08 E09 F00 F01 F02 F03 F04 F05 F06 # X04 X05 X06 X07 X08 B00 B01 B02 B03 B04 B05 B06 C00 C01 C02 C03 C04 C05 C06 E01 E02 E03 E04 E05 E06 E07 # X05 X06 X07 X08 X09 X10 B03 B04 X10
for TX in X01 X02 X03 A01 B01 B02 B03 B04 D00 D01 D02 D03 D04 D05 E00 E01 E02 E03 E04 E05 E06 E07 E08 E09 F00 F01 F02 F03 F04 F05 F06 G01 # X04 X05 X06 X07 X08 B00 B01 B02 B03 B04 B05 B06 C00 C01 C02 C03 C04 C05 C06 E01 E02 E03 E04 E05 E06 E07 # X05 X06 X07 X08 X09 X10 B03 B04 X10
do
mkdir -p arena/Task$TX
done