NAME
concatBratFiles.pl - Perl script for concatenating Brat files
SYNOPSIS
concatBratFiles.pl [options]
where option can be --help --man --verbose
OPTIONS AND ARGUMENTS
- --input-dir <filename>, -d <filename>
-
Specification of the name of the directory containing the input files. Several directories can be specified.
- --input-file <filename>, -i <filename>
-
Specification of the name of an input file (either the text or annotation file). Several input files can be specified.
- --output-file <filename>, -o <filename>
-
Specification of the name of the output files (either the text or annotation file). The filename can be
-
to print the results on the standard output. - --file-list <filename>, -l <filename>
-
Specification of the list of files to concatenate. Each line contains one file name.
- --help
-
print help message for using concatBratFiles.pl
- --man
-
print man page of concatBratFiles.pl
- --verbose
-
Go into the verbose mode
DESCRIPTION
This script concatenates several files which have been annotated with Brat (<http://brat.nlplab.org/>). Two output files are created: a text file which contains all the input text files, and a annotation file which contains all the annotations of the input files. Annotations are merged and their offset are shift.
It is required the name of the output file has the txt
or ann
extension.
If no output files are specified, the concatenated files (text and annotations) are printed on the standard output.
EXAMPLES
Concatenation of all the files in the directory examples
and print text in the file concat1.txt
and the annotations in the file concat1.ann
.
concatBratFiles.pl -d examples -o concat1.ann
Concatenation of all the three files and print text in the file concatFile.txt
and the annotations in the file concatFile.ann
.
concatBratFiles.pl -i examples/taln-2012-long-001-resume.txt -i examples/taln-2012-long-002-resume.ann -i examples/taln-2012-long-003-resume.txt -o concatFile.txt
Concatenation of all the files indicated in examples/list.txt
and print text in the file concat2.txt
and the annotations in the file concat2.ann
.
concatBratFiles.pl -l examples/list.txt -o concat2.ann
SEE ALSO
http://brat.nlplab.org/
AUTHOR
Thierry Hamon, <hamon@limsi.fr>
COPYRIGHT AND LICENSE
Copyright (C) 2015 Thierry Hamon
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available.