User guide

92
Label Studio User’s Guide
File masks
When you print output to multiple files, you must specify a name for each file. To
keep the files from having the same name and overwriting each other, include a
variable, or file mask, in the name. At print time the file mask is replaced,
resulting in a unique file name.
How it works You associate a file mask character with a data field (input or output) that
identifies the unit or subunit. For example, if your units are formed based on
segments, you may want to associate a mask character with the output field
DB.Seg_No. To successfully create your file masks, you must use the same fields
used to define your breaks.
Label Studio has two default file masks. If you don't define your own file masks,
Label Studio uses these default file masks:
The number of characters specified translates into the minimum number of
characters to print. For example, if ^,ap.unt_no was defined, the output file
setup as jobname^^^.out would translate into jobname001.out if
ap.unt_no = 1, and jobname1000.out if ap.unt_no = 1000. The amount of
characters can grow but not shrink.
Characters You can use any character for file masks except for Windows reserved characters:
It is recommended that you use “special” characters and not just any letter or
number as a file mask. If the file mask character that you choose is also present in
the file name, it will get replaced. Here are some characters that you could use:
Guidelines When you use file masking to name output files, follow these guidelines:
You need to only define one mask character for all of the file names to be
generated. For example, if you are splitting by segment and you have defined
115 segments in your job, then you only need to include one character for the
segment number; test@ would be a valid mask. The files created would be
name test1 - test115.
You cannot use mask characters in the file extension. For example,
test.@@@ is invalid.
Use multiple mask character to create static length filenames. For example, in
the example in the first bullet, test@@@ would create the files test001 -
test115.
Split output by Mask character Syntax
Unit number ^ ^,ap.unit_no
Subunit number % %,ap.subunit_no
:\/.?<>|$
^@%! ~&#