djfz-2019-s432813/TaskB03/description.txt

58 lines
1.3 KiB
Plaintext
Raw Normal View History

2019-12-05 12:49:55 +01:00
Dictionary
==========
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
Your program should read a finite-state automaton from standard input.
The automaton is deterministic, you can assume it does not contain
cycles.
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
Each automaton path is labeled with a symbol sequence of the following form:
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
<input word>;<description>
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
e.g.:
2019-11-26 17:47:39 +01:00
biały;ADJ
dom;N
piła;N
piła;V
stali;N
stali;V
stali;ADJ
2019-12-05 12:49:55 +01:00
Next you should read words from the file whose name is given as the
first argument (`*.arg` file). For each word, you should all automaton
paths that begin a given word, the following symbol is ';'
(semicolon), e.g. for the word 'dom' we are looking for paths
beginning with 'dom;'. If there is no such path, the following message
should be printed:
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
<input word>;OOV
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
For instance, for the automaton given above and the input:
2019-11-26 17:47:39 +01:00
budynek
dom
piła
2019-12-05 12:49:55 +01:00
we should get:
2019-11-26 17:47:39 +01:00
budynek;OOV
dom;N
piła;N
piła;V
2019-12-05 12:49:55 +01:00
If there is more than one path for a given word, they should be given in alphabetical order.
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
The program does not have to check whether the automaton is correct
and whether it is deterministic and does not contain cycles.
2019-11-26 17:47:39 +01:00
2019-12-05 12:49:55 +01:00
NOTE 1. In section B for points for your tasks, the maximum (rather
than sum) is taken.
NOTE 2. Task only for students whose student index number ("numer
indeksu") is divisible by 3 with a remainder of 0
2019-11-26 19:58:23 +01:00
2019-11-26 17:47:39 +01:00
POINTS: 14
2020-01-09 10:54:46 +01:00
DEADLINE: 2020-01-11 23:59
2019-11-26 19:58:23 +01:00
REMAINDER: 0/3