Pavel Straňák
stranak@ufal.mff.cuni.cz
Friday 12:30–14:00
Palachovo nám. 2, room S131
24.–31. 3. 2023
Ctrl+V
to escape the following character with
otherwise special meaning in Terminal to input it into the Terminal
directly.
tabulator
by typing
Ctrl+V
+ tab
, go to Setting of the Windows
Terminal and disable the Ctrl+V
shortcut used for Paste.
You can still paste with Ctrl+Shift+V
perl
and it is actually a bit
faster:
awk
There are 2 ways to get the combination
sort |uniq -c |sort -nr
accessible any time under the name
of your choice as a sinle command, for instance Sort
We have created this program in the previous lecture (see slides 4).
Now it may be called, but you have to always find it and call it
directly with it’s location. To get the commabd available any time and
anywhere it must be put into one of the directories the shell searches
when looking for commands. Their list (separated by :
) is
stored in the environment variable $PATH
:
The file $HOME/.profile
includes commands executed on a
startup of a shell. We can add a new one.
now add this line and save the file:
in a new shell started from this moment the Sort
function should be available
Look at the gold data (correct POS) to check a hypothesis: “I should probably make a rule for punctuation, i.e. tokens that do not start with a ‘word character’.”
perl
program, multiple commands (separated by
';'
)perldoc perlretut
, read the section
“Backreferences”perl
%ENV
,
e.g. $ENV{'HOME'}
export
ed shell variables available
MY_TEST=jahoda; env; export MY_TEST; env
in
shellgrep -i 'klaus' pdt.train.3col | Sort
144 Klaus Klaus PROPN
74 Klause Klaus PROPN
24 Klausem Klaus PROPN
11 Klausovi Klaus PROPN
9 Klausův Klausův ADJ
6 Klausovu Klausův ADJ
6 Klausova Klausův ADJ
3 Klausově Klausův ADJ
2 klausule klauzule NOUN
2 Klausovy Klausův ADJ
2 KLAUS Klaus PROPN
1 Protiklausovská protiklausovský ADJ
1 Klausovým Klausův ADJ
1 Klausovo Klausův ADJ
1 KLAUSE Klaus PROPN
Klaus* \t PROPN
ADJ
, but too infrequent