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 | |
Akron | af38698 | 2016-10-12 00:33:25 +0200 | [diff] [blame] | 28 | $ cpanm https://github.com/KorAP/KorAP-XML-Krill.git |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 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 | 7438151 | 2016-10-14 11:56:22 +0200 | [diff] [blame^] | 32 | Minimum requirement for L<KorAP::XML::Krill> is Perl 5.14. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 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 | |
Akron | a5920b1 | 2016-06-29 18:51:21 +0200 | [diff] [blame] | 53 | =item B<--input|-i> <directory|file|files> |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 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 | |
Akron | a5920b1 | 2016-06-29 18:51:21 +0200 | [diff] [blame] | 57 | Archiving supports multiple input archives with the constraint, |
| 58 | that the first archive listed contains all primary data files |
| 59 | and all meta data files. |
| 60 | |
| 61 | -i file/news.zip -i file/news.malt.zip -i #file/news.tt.zip |
| 62 | |
| 63 | (The directory structure follows the base directory format, |
| 64 | that may include a C<.> root folder. |
| 65 | In this case further archives lacking a C<.> root folder |
| 66 | need to be passed with a hash sign in front of the archive's name.) |
| 67 | |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 68 | =item B<--output|-o> <directory|file> |
| 69 | |
| 70 | Output folder for archive processing or |
| 71 | document name for single output (optional), |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 72 | writes to C<STDOUT> by default |
| 73 | (in case C<output> is not mandatory due to further options). |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 74 | |
| 75 | =item B<--overwrite|-w> |
| 76 | |
| 77 | Overwrite files that already exist. |
| 78 | |
| 79 | =item B<--token|-t> <foundry>[#<file>] |
| 80 | |
| 81 | Define the default tokenization by specifying |
| 82 | the name of the foundry and optionally the name |
| 83 | of the layer-file. Defaults to C<OpenNLP#tokens>. |
| 84 | |
| 85 | =item B<--skip|-s> <foundry>[#<layer>] |
| 86 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 87 | Skip specific annotations by specifying the foundry |
| 88 | (and optionally the layer with a C<#>-prefix), |
| 89 | 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] | 90 | Can be set multiple times. |
| 91 | |
| 92 | =item B<--anno|-a> <foundry>#<layer> |
| 93 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 94 | Convert specific annotations by specifying the foundry |
| 95 | (and optionally the layer with a C<#>-prefix), |
| 96 | e.g. C<Mate> or C<Mate#Morpho>. |
| 97 | Can be set multiple times. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 98 | |
| 99 | =item B<--primary|-p> |
| 100 | |
| 101 | Output primary data or not. Defaults to C<true>. |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 102 | Can be flagged using C<--no-primary> as well. |
| 103 | This is I<deprecated>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 104 | |
| 105 | =item B<--jobs|-j> |
| 106 | |
| 107 | Define the number of concurrent jobs in seperated forks |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 108 | for archive processing. |
Akron | 11c8030 | 2016-03-18 19:44:43 +0100 | [diff] [blame] | 109 | Defaults to C<0> (everything runs in a single process). |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 110 | This is I<experimental>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 111 | |
Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 112 | =item B<--meta|-m> |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 113 | |
Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 114 | Define the metadata parser to use. Defaults to C<I5>. |
| 115 | Metadata parsers can be defined in the C<KorAP::XML::Meta> namespace. |
| 116 | This is I<experimental>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 117 | |
| 118 | =item B<--pretty|-y> |
| 119 | |
| 120 | Pretty print JSON output. Defaults to C<false>. |
Akron | 35db6e3 | 2016-03-17 22:42:22 +0100 | [diff] [blame] | 121 | This is I<deprecated>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 122 | |
| 123 | =item B<--gzip|-z> |
| 124 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 125 | Compress the output. |
| 126 | Expects a defined C<output> file in single processing. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 127 | |
Akron | 11c8030 | 2016-03-18 19:44:43 +0100 | [diff] [blame] | 128 | =item B<--cache|-c> |
| 129 | |
| 130 | File to mmap a cache (using L<Cache::FastMmap>). |
| 131 | Defaults to C<korapxml2krill.cache> in the calling directory. |
| 132 | |
| 133 | =item B<--cache-size|-cs> |
| 134 | |
| 135 | Size of the cache. Defaults to C<50m>. |
| 136 | |
| 137 | =item B<--cache-init|-ci> |
| 138 | |
| 139 | Initialize cache file. |
| 140 | Can be flagged using C<--no-cache-init> as well. |
| 141 | Defaults to C<true>. |
| 142 | |
| 143 | =item B<--cache-delete|-cd> |
| 144 | |
| 145 | Delete cache file after processing. |
| 146 | Can be flagged using C<--no-cache-delete> as well. |
| 147 | Defaults to C<true>. |
| 148 | |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 149 | =item B<--sigle|-sg> |
| 150 | |
| 151 | Extract the given text sigles. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 152 | Can be set multiple times. |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 153 | I<Currently only supported on C<extract>.> |
Akron | a5920b1 | 2016-06-29 18:51:21 +0200 | [diff] [blame] | 154 | Sigles have the structure C<Corpus>/C<Document>/C<Text>. |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 155 | |
| 156 | =item B<--log|-l> |
| 157 | |
| 158 | The L<Log4perl> log level, defaults to C<ERROR>. |
| 159 | |
| 160 | =item B<--help|-h> |
| 161 | |
| 162 | Print this document. |
| 163 | |
| 164 | =item B<--version|-v> |
| 165 | |
| 166 | Print version information. |
| 167 | |
| 168 | =back |
| 169 | |
| 170 | =head1 ANNOTATION SUPPORT |
| 171 | |
| 172 | L<KorAP::XML::Krill> has built-in importer for some annotation foundries and layers |
| 173 | developed in the KorAP project that are part of the KorAP preprocessing pipeline. |
| 174 | The base foundry with paragraphs, sentences, and the text element are mandatory for |
| 175 | L<Krill|https://github.com/KorAP/Krill>. |
| 176 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 177 | =over 2 |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 178 | |
| 179 | =item B<Base> |
| 180 | |
| 181 | =over 4 |
| 182 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 183 | =item #Paragraphs |
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 | |
| 187 | =back |
| 188 | |
| 189 | =item B<Connexor> |
| 190 | |
| 191 | =over 4 |
| 192 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 193 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 194 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 195 | =item #Phrase |
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 #Sentences |
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 #Syntax |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 200 | |
| 201 | =back |
| 202 | |
| 203 | =item B<CoreNLP> |
| 204 | |
| 205 | =over 4 |
| 206 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 207 | =item #Constituency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 208 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 209 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 210 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 211 | =item #NamedEntities |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 212 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 213 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 214 | |
| 215 | =back |
| 216 | |
| 217 | =item B<DeReKo> |
| 218 | |
| 219 | =over 4 |
| 220 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 221 | =item #Structure |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 222 | |
| 223 | =back |
| 224 | |
| 225 | =item B<Glemm> |
| 226 | |
| 227 | =over 4 |
| 228 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 229 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 230 | |
| 231 | =back |
| 232 | |
| 233 | =item B<Mate> |
| 234 | |
| 235 | =over 4 |
| 236 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 237 | =item #Dependency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 238 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 239 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 240 | |
| 241 | =back |
| 242 | |
| 243 | =item B<OpenNLP> |
| 244 | |
| 245 | =over 4 |
| 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 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 249 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 250 | |
| 251 | =back |
| 252 | |
| 253 | =item B<Sgbr> |
| 254 | |
| 255 | =over 4 |
| 256 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 257 | =item #Lemma |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 258 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 259 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 260 | |
| 261 | =back |
| 262 | |
| 263 | =item B<TreeTagger> |
| 264 | |
| 265 | =over 4 |
| 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 | =item B<XIP> |
| 274 | |
| 275 | =over 4 |
| 276 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 277 | =item #Constituency |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 278 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 279 | =item #Morpho |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 280 | |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 281 | =item #Sentences |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 282 | |
| 283 | =back |
| 284 | |
| 285 | =back |
| 286 | |
| 287 | More importers are in preparation. |
| 288 | New annotation importers can be defined in the C<KorAP::XML::Annotation> namespace. |
| 289 | See the built-in annotation importers as examples. |
| 290 | |
| 291 | =head1 AVAILABILITY |
| 292 | |
| 293 | https://github.com/KorAP/KorAP-XML-Krill |
| 294 | |
| 295 | |
| 296 | =head1 COPYRIGHT AND LICENSE |
| 297 | |
| 298 | Copyright (C) 2015-2016, L<IDS Mannheim|http://www.ids-mannheim.de/> |
Akron | f7ad89e | 2016-03-16 18:22:47 +0100 | [diff] [blame] | 299 | |
Akron | c13a170 | 2016-03-15 19:33:14 +0100 | [diff] [blame] | 300 | Author: L<Nils Diewald|http://nils-diewald.de/> |
| 301 | |
| 302 | L<KorAP::XML::Krill> is developed as part of the L<KorAP|http://korap.ids-mannheim.de/> |
| 303 | Corpus Analysis Platform at the |
| 304 | L<Institute for the German Language (IDS)|http://ids-mannheim.de/>, |
| 305 | member of the |
| 306 | L<Leibniz-Gemeinschaft|http://www.leibniz-gemeinschaft.de/en/about-us/leibniz-competition/projekte-2011/2011-funding-line-2/>. |
| 307 | |
| 308 | This program is free software published under the |
| 309 | L<BSD-2 License|https://raw.githubusercontent.com/KorAP/KorAP-XML-Krill/master/LICENSE>. |
| 310 | |
| 311 | =cut |