1
$\begingroup$

I am annotating a new corpus with BRAT. I have a set of .txt files to annotate. Is it possible to configure BRAT so that if no .ann file is found, then an empty .ann file is created? Or am I supposed to myself provide the empty .ann files?

$\endgroup$
1
$\begingroup$

I run into the same problem with BRAT from time to time. The way I solved it for a folder with .txt files is to run this Bash one-liner directly in the shell when inside the directory with these files:

for f in *.txt; do touch $(basename $f .txt)".ann"; done

What is does is the following: With a for-loop, it loops over every .txt file, and creates an empty file with touch having the same basename, but a .ann extension instead of a .txt extension.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.