UPREAD --- a tool for selecting segments from UNIPEN files


SYNOPSIS

upread [options] file [files]

DESCRIPTION

Using the tool upread, allows for the extraction of UNIPEN segments from a number of UNIPEN files. For example, the following command generates a new file, which can be viewed with upview.
upread -l WORD -s Unipen -o test.dat *.dat
(The result can be viewed at upview.gif). Note that when starting upread, two environment variables have to be set (see general environment settings).

OPTIONS

     -o  outfile
     -p  patfile
     -s  string
     -i  index
     -l  level
     -F  first
     -L  last

USAGE

By default, upread matches any segment on any level. If these are not set, upread can thus be used to concatenate a number of UNIPEN files into one file like:
upread file1.dat file2.dat file3.dat -o file_all.dat
Matching is done via:
  1. exact match - where segment names must exactly match the query
  2. asterix match - using '*'. For example the query '*an' matches any name ending with 'an'.
By creating a patfile containing search patterns, upread will match each segment with as name a matching query in the file. Note that this can also be achieved by entering multiple -s queries at the command line. If the file d.d contains, e.g., two queries one and '*an*', the following calls result in the same output:
upread -o output.dat -p d.d -l WORD *.dat
upread -o output.dat -s one -s '*an*' -l WORD *.dat
The -i option can be used to select the i-th segment out of the matching segments, so the second word labeled "Unipen" can be selected from a file by entering:
upread -l WORD -o Unipen.dat -i 2 file.dat -s Unipen
Note that if there is only one word matching "Unipen", no items fulfill your query. To select the first ten paragraphs from a file, use:
upread -l PARAGRAPH -o paragraphs.dat -F 1 -L 10 file.dat

(known) problems

If upread is used with files having unknown delineations as well as multiple levels, like
.SEGMENT LINE ? ? "some line containing ink"
.SEGMENT WORD ? ? "something"
a level must be entered as search criterion. For files with bounded delineations this restriction is not needed.

AUTHORS

Louis Vuurpijl Lambert Schomaker
Back to the uptools3 homepage
Page last updated on Fri Mar 14 12:18:15 MET 1997
You are visitor


Generated by htmlize at Fri Nov 14 12:31:49 1997 Louis Vuurpijl