Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 1 | =pod |
2 | |||||
3 | =encoding utf8 | ||||
4 | |||||
5 | =head1 NAME | ||||
6 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 7 | korapxml2krill - Merge KorapXML data and create Krill documents |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 8 | |
9 | |||||
10 | =head1 SYNOPSIS | ||||
11 | |||||
12 | $ korapxml2krill -z --input <directory> --output <filename> | ||||
13 | $ korapxml2krill archive -z --input <directory> --output <directory> | ||||
14 | $ korapxml2krill extract --input <directory> --output <filename> --sigle <SIGLE> | ||||
15 | |||||
16 | |||||
17 | =head1 DESCRIPTION | ||||
18 | |||||
19 | L<KorAP::XML::Krill> is a library to convert KorAP-XML documents to files | ||||
20 | compatible with the L<Krill|https://github.com/KorAP/Krill> indexer. | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 21 | The C<korapxml2krill> command line tool is a simple wrapper to the library. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 22 | |
23 | |||||
24 | =head1 INSTALLATION | ||||
25 | |||||
26 | The preferred way to install L<KorAP::XML::Krill> is to use L<cpanm|App::cpanminus>. | ||||
27 | |||||
28 | $ cpanm https://github.com/KorAP/KorAP-XML-Krill | ||||
29 | |||||
30 | In case everything went well, the C<korapxml2krill> tool will | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 31 | be available on your command line immediately. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 32 | |
33 | |||||
34 | =head1 ARGUMENTS | ||||
35 | |||||
36 | =over 2 | ||||
37 | |||||
38 | =item B<archive> | ||||
39 | |||||
40 | Process an archive as a Zip-file or a folder of KorAP-XML documents. | ||||
41 | |||||
42 | =item B<extract> | ||||
43 | |||||
44 | Extract KorAP-XML files from a Zip-file. | ||||
45 | |||||
46 | =back | ||||
47 | |||||
48 | |||||
49 | =head1 OPTIONS | ||||
50 | |||||
51 | =over 2 | ||||
52 | |||||
53 | =item B<--input|-i> <directory|file> | ||||
54 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 55 | Directory or archive file of documents to convert. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 56 | |
57 | =item B<--output|-o> <directory|file> | ||||
58 | |||||
59 | Output folder for archive processing or | ||||
60 | document name for single output (optional), | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 61 | writes to C<STDOUT> by default |
62 | (in case C<output> is not mandatory due to further options). | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 63 | |
64 | =item B<--overwrite|-w> | ||||
65 | |||||
66 | Overwrite files that already exist. | ||||
67 | |||||
68 | =item B<--token|-t> <foundry>[#<file>] | ||||
69 | |||||
70 | Define the default tokenization by specifying | ||||
71 | the name of the foundry and optionally the name | ||||
72 | of the layer-file. Defaults to C<OpenNLP#tokens>. | ||||
73 | |||||
74 | =item B<--skip|-s> <foundry>[#<layer>] | ||||
75 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 76 | Skip specific annotations by specifying the foundry |
77 | (and optionally the layer with a C<#>-prefix), | ||||
78 | e.g. C<Mate> or C<Mate#Morpho>. Alternatively you can skip C<#ALL>. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 79 | Can be set multiple times. |
80 | |||||
81 | =item B<--anno|-a> <foundry>#<layer> | ||||
82 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 83 | Convert specific annotations by specifying the foundry |
84 | (and optionally the layer with a C<#>-prefix), | ||||
85 | e.g. C<Mate> or C<Mate#Morpho>. | ||||
86 | Can be set multiple times. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 87 | |
88 | =item B<--primary|-p> | ||||
89 | |||||
90 | Output primary data or not. Defaults to C<true>. | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 91 | Can be flagged using C<--no-primary> as well. |
92 | This is I<deprecated>. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 93 | |
94 | =item B<--jobs|-j> | ||||
95 | |||||
96 | Define the number of concurrent jobs in seperated forks | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 97 | for archive processing. |
Akron | 11c8030 | 2016-03-18 19:44:43 +0100 | [diff] [blame^] | 98 | Defaults to C<0> (everything runs in a single process). |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 99 | This is I<experimental>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 100 | |
Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 101 | =item B<--meta|-m> |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 102 | |
Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 103 | Define the metadata parser to use. Defaults to C<I5>. |
104 | Metadata parsers can be defined in the C<KorAP::XML::Meta> namespace. | ||||
105 | This is I<experimental>. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 106 | |
107 | =item B<--pretty|-y> | ||||
108 | |||||
109 | Pretty print JSON output. Defaults to C<false>. | ||||
Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 110 | This is I<deprecated>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 111 | |
112 | =item B<--gzip|-z> | ||||
113 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 114 | Compress the output. |
115 | Expects a defined C<output> file in single processing. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 116 | |
Akron | 11c8030 | 2016-03-18 19:44:43 +0100 | [diff] [blame^] | 117 | =item B<--cache|-c> |
118 | |||||
119 | File to mmap a cache (using L<Cache::FastMmap>). | ||||
120 | Defaults to C<korapxml2krill.cache> in the calling directory. | ||||
121 | |||||
122 | =item B<--cache-size|-cs> | ||||
123 | |||||
124 | Size of the cache. Defaults to C<50m>. | ||||
125 | |||||
126 | =item B<--cache-init|-ci> | ||||
127 | |||||
128 | Initialize cache file. | ||||
129 | Can be flagged using C<--no-cache-init> as well. | ||||
130 | Defaults to C<true>. | ||||
131 | |||||
132 | =item B<--cache-delete|-cd> | ||||
133 | |||||
134 | Delete cache file after processing. | ||||
135 | Can be flagged using C<--no-cache-delete> as well. | ||||
136 | Defaults to C<true>. | ||||
137 | |||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 138 | =item B<--sigle|-sg> |
139 | |||||
140 | Extract the given text sigles. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 141 | Can be set multiple times. |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 142 | I<Currently only supported on C<extract>.> |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 143 | |
144 | =item B<--log|-l> | ||||
145 | |||||
146 | The L<Log4perl> log level, defaults to C<ERROR>. | ||||
147 | |||||
148 | =item B<--help|-h> | ||||
149 | |||||
150 | Print this document. | ||||
151 | |||||
152 | =item B<--version|-v> | ||||
153 | |||||
154 | Print version information. | ||||
155 | |||||
156 | =back | ||||
157 | |||||
158 | =head1 ANNOTATION SUPPORT | ||||
159 | |||||
160 | L<KorAP::XML::Krill> has built-in importer for some annotation foundries and layers | ||||
161 | developed in the KorAP project that are part of the KorAP preprocessing pipeline. | ||||
162 | The base foundry with paragraphs, sentences, and the text element are mandatory for | ||||
163 | L<Krill|https://github.com/KorAP/Krill>. | ||||
164 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 165 | =over 2 |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 166 | |
167 | =item B<Base> | ||||
168 | |||||
169 | =over 4 | ||||
170 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 171 | =item #Paragraphs |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 172 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 173 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 174 | |
175 | =back | ||||
176 | |||||
177 | =item B<Connexor> | ||||
178 | |||||
179 | =over 4 | ||||
180 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 181 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 182 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 183 | =item #Phrase |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 184 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 185 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 186 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 187 | =item #Syntax |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 188 | |
189 | =back | ||||
190 | |||||
191 | =item B<CoreNLP> | ||||
192 | |||||
193 | =over 4 | ||||
194 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 195 | =item #Constituency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 196 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 197 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 198 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 199 | =item #NamedEntities |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 200 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 201 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 202 | |
203 | =back | ||||
204 | |||||
205 | =item B<DeReKo> | ||||
206 | |||||
207 | =over 4 | ||||
208 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 209 | =item #Structure |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 210 | |
211 | =back | ||||
212 | |||||
213 | =item B<Glemm> | ||||
214 | |||||
215 | =over 4 | ||||
216 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 217 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 218 | |
219 | =back | ||||
220 | |||||
221 | =item B<Mate> | ||||
222 | |||||
223 | =over 4 | ||||
224 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 225 | =item #Dependency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 226 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 227 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 228 | |
229 | =back | ||||
230 | |||||
231 | =item B<OpenNLP> | ||||
232 | |||||
233 | =over 4 | ||||
234 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 235 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 236 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 237 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 238 | |
239 | =back | ||||
240 | |||||
241 | =item B<Sgbr> | ||||
242 | |||||
243 | =over 4 | ||||
244 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 245 | =item #Lemma |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 246 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 247 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 248 | |
249 | =back | ||||
250 | |||||
251 | =item B<TreeTagger> | ||||
252 | |||||
253 | =over 4 | ||||
254 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 255 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 256 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 257 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 258 | |
259 | =back | ||||
260 | |||||
261 | =item B<XIP> | ||||
262 | |||||
263 | =over 4 | ||||
264 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 265 | =item #Constituency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 266 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 267 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 268 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 269 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 270 | |
271 | =back | ||||
272 | |||||
273 | =back | ||||
274 | |||||
275 | More importers are in preparation. | ||||
276 | New annotation importers can be defined in the C<KorAP::XML::Annotation> namespace. | ||||
277 | See the built-in annotation importers as examples. | ||||
278 | |||||
279 | =head1 AVAILABILITY | ||||
280 | |||||
281 | https://github.com/KorAP/KorAP-XML-Krill | ||||
282 | |||||
283 | |||||
284 | =head1 COPYRIGHT AND LICENSE | ||||
285 | |||||
286 | Copyright (C) 2015-2016, L<IDS Mannheim|http://www.ids-mannheim.de/> | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 287 | |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 288 | Author: L<Nils Diewald|http://nils-diewald.de/> |
289 | |||||
290 | L<KorAP::XML::Krill> is developed as part of the L<KorAP|http://korap.ids-mannheim.de/> | ||||
291 | Corpus Analysis Platform at the | ||||
292 | L<Institute for the German Language (IDS)|http://ids-mannheim.de/>, | ||||
293 | member of the | ||||
294 | L<Leibniz-Gemeinschaft|http://www.leibniz-gemeinschaft.de/en/about-us/leibniz-competition/projekte-2011/2011-funding-line-2/>. | ||||
295 | |||||
296 | This program is free software published under the | ||||
297 | L<BSD-2 License|https://raw.githubusercontent.com/KorAP/KorAP-XML-Krill/master/LICENSE>. | ||||
298 | |||||
299 | =cut |