-
Notifications
You must be signed in to change notification settings - Fork 0
/
documentation.txt
144 lines (87 loc) · 4.67 KB
/
documentation.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
This is the documentation for a couple of perl scripts that can be used to easily manipulate Toolbox files.
The scripts have been created by Alexander Koenig at the Max Planck Institute for Psycholinguistics and may be used free of charge.
If you have questions, you can contact the author under Alexander.Koenig@mpi.nl
All the five following scripts take a toolbox file as input. For their output they create a new toolbox file with the same name as the input file and the extension .new added. Please note, that these scripts only change the toolbox text files. The type database will not be changed!
===================
= change_label.pl =
===================
Function:
Changes the name of one marker in a toolbox file
Usage:
perl change_label.pl -file <input file> -old <old label> -new <new label>
Options:
-f, --file : path to the file that should be used as input
-o, --old : name of the toolbox marker that should change
-n, --new : string that the marker should be changed into
Example:
perl change_label.pl --file /home/me/source.txt --old ref --new id
==========================
= create_media_marker.pl =
==========================
Function:
Creates a new marker to link to an audio resource. This makes it possible to play (a segment of) the audio directly from toolbox.
Usage:
perl create_media_marker.pl -file <input file> -media <media file name> [-marker <marker name>]
Options:
-f, --file : path to the file that should be used as input
--media : name of the media file that should be added
--marker : name of the toolbox marker that should be added, defaults to 'aud'
Example:
perl create_media_marker.pl --file /home/me/source.txt --media=foobar.wav --marker aud
==========================
= insert_empty_markers.pl =
==========================
Function:
Creates a number of new markers without values. You can specify if they should be added before or after a certain existing marker.
Usage:
perl insert_empty_markers.pl -file <input file> -before <marker name> -after <marker name> -insert <list of marker names>
Options:
-f, --file : path to the file that should be used as input
-a, --after : empty markers should be inserted after this marker (cannot be used at the same time as -before)
-b, --before : empty markers should be inserted before this marker (cannot be used at the same time as -after)
-i, --insert : list of marker names that should be inserted as empty markers (enclosed in '', separate multiple values by comma)
Example:
perl insert_empty_markers.pl --file /home/me/source.txt --after ref --insert 'my_marker1, my_marker2'
====================
= insert_prefix.pl =
====================
Function:
Adds a certain prefix to the value of one of the toolbox markers
Usage:
perl insert_prefix.pl -file <input file> -prefix <prefix text> [-marker <marker name>]
Options:
-f, --file : path to the file that should be used as input
-p, --prefix : string that should be prefixed to the value of marker
-m, --marker : name of the toolbox marker that should get the prefix, defaults to 'ref'
Example:
perl insert_prefix.pl --file /home/me/source.txt --prefix abc000_ --marker ref
Changes
\ref 001
to
\ref abc000_001
==========================
= handle_participants.pl =
==========================
Function:
Restructures the marking of participants.
Usage:
perl handle_participants.pl -file <input file> -marker <marker name> -participants <list of possible participant names>
Options:
-f, --file : path to the file that should be used as input
-m, --marker : name of the toolbox marker that should be inserted instead of the speaking participant, defaults to 'tx'
-p, --participants : list of possible participant names (enclosed in '', separate multiple values by comma)
Example:
perl handle_participants.pl --file /home/me/source.txt --marker tx --participants 'Jeremy, Alex, Han'
Changes
\ELANParticipant
\Jeremy
\Alex blaha ads f a aaa a
\Han
to
\ELANParticipant Alex
\tx blaha ads f a aaa a
======================
= enhance_toolbox.pl =
======================
Function:
This script is meant to perform all functions of the previous scripts at once in order. During its run it creates temporary files that will be deleted at the end. The output document has the same name as the input document. The input document will be backed up with the added extension .orig. The script does not take its parameters from the command line but uses a configuration file enhance_toolbox.conf instead. Examples and further descriptions can be found in the example config file.