NAME

opus2multi

SYNOPSIS

# Combine all sentence alignments via Swedish 
# for German, English, Spanish and French. 
# The alignment units will cover the same English sentences.

opus2multi /path/to/OPUS/corpus/RF/xml sv de en es fr

# shortcut without full path to xml-dir 
# (requires OPUS in some standard directory)

opus2multi RF sv de en es fr

# use intralingual links (for pivot language) to extend the data set
# (useful for OpenSubtitles-corpora)

opus2multi -a OpenSubtitles2016 sv de en es fr

USAGE

opus2multi [OPTIONS] xmldir pivot [lang-ids]*

OUTPUT: sentence alignment files for all languages together with the pivot language

OPTIONS

-e ................. keep segments with empty links in any of the languages
-i pivot-links ..... intralingual pivot link file
-a ................. same as -i but read intralingual links from xmldir/../alt/
-s nr .............. max number of sentences in an alignment unit
-h ................. this help

DESCRIPTION

opus2multi [OPTIONS] xmldir pivot [lang-ids]*

combine sentence alignments for several language pairs using a pivot language as intermediate language for all other languages

<xmldir> should be the path to the XML directory that contains 
         sentence alignment files
         for each individual language pair (e.g. xmldir/en-fr.xml.gz)
<pivot> is the language ID of the pivot language (e.g. en)
<lang-ids> are language IDs of the other language to be combined 
           in the multilingual corpus

LICENSE

---------------------------------------------------------------------------
Copyright (c) 2004-2019 Joerg Tiedemann

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---------------------------------------------------------------------------

See also

This script is part of opus-tools https://github.com/Helsinki-NLP/opus-tools See also OPUS http://opus.nlpl.eu for more information about the corpus.