Automatic processing of text data


NPFL098 / ATKL00345

Pavel Straňák and Dušan Variš

stranak@ufal.mff.cuni.cz

úterý 10.40–13.50
Malostranské nám. 25, SU1

21. 3. 2017

Tmux

Terminal Multiplexer

    tmux                   # start tmux
        ls                 # do something
        <C-b> %            # split the window
        less /etc/passwd   # do sth in the split
        <C-b> d            # detach from tmux (keeps running)
    ...
    tmux attach            # attach to the running tmux

Tmux (continued¹)

vertical window split

Tmux (continued²)

horizontal window split

Tmux (continued³)

prefix indicates a command for Tmux:

key-combination command
C-b send-prefix
? list-keys
d detach-client
" split-window
% split-window -h
- delete-buffer
C-o rotate-window
c new-window
w choose-window
0 select-window -t :0
1 select-window -t :1
C-Up resize-pane -U
C-Down resize-pane -D
C-Left resize-pane -L
C-Right resize-pane -R

Text editors

Any Good Text Editor™

Modern source code editor should provide:

(source: NPFL092)

Vim – Vi improved

vim +nn <file>
The cursor starts on the specified line.

Program

#!/usr/bin/env bash
# a silly program (script) that generates another small program
echo '#!/usr/bin/env bash' >My_Sort.bash
echo 'sort | uniq -c | sort -nr' >>My_Sort.bash
chmod +x My_Sort.bash # now it is executable!
last | cut -f1 -d' ' | ./My_Sort.bash

POS tagging

word order, form, lemma, POS, morphology-features, parent, ...

POS tagging Ⅱ