Alberto Simões 🐪

NAME

cwb-regedit - A simple command-line editor for CWB registry files

SYNOPSIS

  cwb-regedit [options] (CORPUS | <filename>) <command> [<command> ...]

Options:

  -r <dir>, --registry=<dir>  use registry directory <dir> [system default]
  -h, --help                  display usage summary
     

Commands:

  :info
       print basic information about the registry entry
  (:id | :home | :name | :ifile) [<value>]
       print or set corpus ID (:id), data directory (:home),
       descriptive name (:name) or info file path (:ifile)
  :prop <property> [<value>]
       query or set corpus property
  :list (:p | :s | :a)
       list declared attributes of specified type
  :add (:p | :s | :a) <names>
       add positional, structural or alignment attributes
  :del <names>
       delete attributes of any type

Command names are case-insensitive, and some intuitive abbreviations and variations are allowed (but only the forms listed above are guaranteed to work).

DESCRIPTION

cwb-regedit is a simple command-line editor for CWB registry files in canonical format. It allows you to display and modify header information, corpus properties and attribute declarations. For more complex editing tasks (such as adding descriptive comments), use the functionality provided by the CWB module (see "REGISTRY FILE EDITING" in CWB manpage).

The first argument must be the name of a CWB registry file or a corpus ID. In the latter case, cwb-regedit will attempt to locate the corresponding registry file in the system registry, or in a directory specified with the --registry (-r) option. The remaining arguments are editing or display commands, which are applied to the registry entry in turn. If any changes have been made, the modified registry file will be written back to disk automatically.

The following commands are currently supported:

:info

Print basic information about the registry entry, including pathname of the registry file, corpus ID, name, data directory and info file, as well as all corpus properties defined in the registry entry.

(:id | :name | :home | :ifile)

Display corpus header information (corpus ID, corpus name, data directory, info file).

(:id | :name | :home | :ifile) value

Modify corpus header information (corpus ID, corpus name, data directory, info file). Don't forget to quote value with single or double quotes if it contains whitespace or other special characters.

:prop name

Display corpus property name. If this property is not defined, cwb-regedit prints an empty line and issues a warning message on stderr.

:prop name value

Modify or add corpus property name. Don't forget to quote value if it contains whitespace or special characters.

:list (:p | :s | :a) ...

List all attributes of the specified type: :p for positional attributes, :s for structural attributes, and :a for alignment attributes. Attribute names are printed on a single line separated by blanks. You can specify multiple attribute types without repeating the :list keyword, e.g. :list :p :s.

:add (:p | :s | :a) name ... [ (:p | :s | :a) name ... ]

Add one or more attribute declarations to the registry entry. The attribute type is indicated by :p (positional), :s (structural) or :a (alignment), followed by the names of the new attributes. For structural attributes, the same extended specifications are supported as in the cwb-encode program (see the cwb-encode manpage and the Corpus Encoding Tutorial for details).

:del name ...

Delete attribute declarations, regardless of attribute type. Note that the corresponding data files will not automatically be deleted.

COPYRIGHT

Copyright (C) 2002-2010 Stefan Evert [http::/purl.org/stefan.evert]

This software is provided AS IS and the author makes no warranty as to its use and performance. You may use the software, redistribute and modify it under the same terms as Perl itself.