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