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. |
98 | Defaults to C<0>. | ||||
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 | |
117 | =item B<--sigle|-sg> | ||||
118 | |||||
119 | Extract the given text sigles. | ||||
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 120 | Can be set multiple times. |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 121 | I<Currently only supported on C<extract>.> |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 122 | |
123 | =item B<--log|-l> | ||||
124 | |||||
125 | The L<Log4perl> log level, defaults to C<ERROR>. | ||||
126 | |||||
127 | =item B<--help|-h> | ||||
128 | |||||
129 | Print this document. | ||||
130 | |||||
131 | =item B<--version|-v> | ||||
132 | |||||
133 | Print version information. | ||||
134 | |||||
135 | =back | ||||
136 | |||||
137 | =head1 ANNOTATION SUPPORT | ||||
138 | |||||
139 | L<KorAP::XML::Krill> has built-in importer for some annotation foundries and layers | ||||
140 | developed in the KorAP project that are part of the KorAP preprocessing pipeline. | ||||
141 | The base foundry with paragraphs, sentences, and the text element are mandatory for | ||||
142 | L<Krill|https://github.com/KorAP/Krill>. | ||||
143 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 144 | =over 2 |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 145 | |
146 | =item B<Base> | ||||
147 | |||||
148 | =over 4 | ||||
149 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 150 | =item #Paragraphs |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 151 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 152 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 153 | |
154 | =back | ||||
155 | |||||
156 | =item B<Connexor> | ||||
157 | |||||
158 | =over 4 | ||||
159 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 160 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 161 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 162 | =item #Phrase |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 163 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 164 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 165 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 166 | =item #Syntax |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 167 | |
168 | =back | ||||
169 | |||||
170 | =item B<CoreNLP> | ||||
171 | |||||
172 | =over 4 | ||||
173 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 174 | =item #Constituency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 175 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 176 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 177 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 178 | =item #NamedEntities |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 179 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 180 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 181 | |
182 | =back | ||||
183 | |||||
184 | =item B<DeReKo> | ||||
185 | |||||
186 | =over 4 | ||||
187 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 188 | =item #Structure |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 189 | |
190 | =back | ||||
191 | |||||
192 | =item B<Glemm> | ||||
193 | |||||
194 | =over 4 | ||||
195 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 196 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 197 | |
198 | =back | ||||
199 | |||||
200 | =item B<Mate> | ||||
201 | |||||
202 | =over 4 | ||||
203 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 204 | =item #Dependency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 205 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 206 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 207 | |
208 | =back | ||||
209 | |||||
210 | =item B<OpenNLP> | ||||
211 | |||||
212 | =over 4 | ||||
213 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 214 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 215 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 216 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 217 | |
218 | =back | ||||
219 | |||||
220 | =item B<Sgbr> | ||||
221 | |||||
222 | =over 4 | ||||
223 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 224 | =item #Lemma |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 225 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 226 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 227 | |
228 | =back | ||||
229 | |||||
230 | =item B<TreeTagger> | ||||
231 | |||||
232 | =over 4 | ||||
233 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 234 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 235 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 236 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 237 | |
238 | =back | ||||
239 | |||||
240 | =item B<XIP> | ||||
241 | |||||
242 | =over 4 | ||||
243 | |||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 244 | =item #Constituency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 245 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 246 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 247 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 248 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 249 | |
250 | =back | ||||
251 | |||||
252 | =back | ||||
253 | |||||
254 | More importers are in preparation. | ||||
255 | New annotation importers can be defined in the C<KorAP::XML::Annotation> namespace. | ||||
256 | See the built-in annotation importers as examples. | ||||
257 | |||||
258 | =head1 AVAILABILITY | ||||
259 | |||||
260 | https://github.com/KorAP/KorAP-XML-Krill | ||||
261 | |||||
262 | |||||
263 | =head1 COPYRIGHT AND LICENSE | ||||
264 | |||||
265 | Copyright (C) 2015-2016, L<IDS Mannheim|http://www.ids-mannheim.de/> | ||||
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 266 | |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 267 | Author: L<Nils Diewald|http://nils-diewald.de/> |
268 | |||||
269 | L<KorAP::XML::Krill> is developed as part of the L<KorAP|http://korap.ids-mannheim.de/> | ||||
270 | Corpus Analysis Platform at the | ||||
271 | L<Institute for the German Language (IDS)|http://ids-mannheim.de/>, | ||||
272 | member of the | ||||
273 | L<Leibniz-Gemeinschaft|http://www.leibniz-gemeinschaft.de/en/about-us/leibniz-competition/projekte-2011/2011-funding-line-2/>. | ||||
274 | |||||
275 | This program is free software published under the | ||||
276 | L<BSD-2 License|https://raw.githubusercontent.com/KorAP/KorAP-XML-Krill/master/LICENSE>. | ||||
277 | |||||
278 | =cut |