The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

SYNOPSIS

  pmltq [--server <URL_or_server_ID> ] [ <options> ] [ --stdin | --query-file <filename> | --query <query> | <query> ]
  pmltq --btred [ <options> ] [ --stdin | --query-file <filename> | --query <query> ] [ -l <filelist> |  <file(s)> ]
  pmltq --ntred [ <options> ] [ --stdin | --query-file <filename> | --query <query> ] [ -l <filelist> |  <file(s)> ]
  pmltq --jtred [ <options> ] [ --stdin | --query-file <filename> | --query <query> ] [ -l <filelist> |  <file(s)> ]

or

  pmltq [options] [ --print-servers|-P | --node-types | --relations ]

or

  pmltq -P           for a list of configured connections
  pmltq -u           for usage
  pmltq -h           for help
  pmltq --man        for the manual page
  pmltq --version    for version

DESCRIPTION

pmltq is a command-line interface to PML-TQ. It can use either a SQL-based query engine, btred, ntred, or jtred (btred over a SGE cluster) to evaluate the query. The results are printed to the standard output.

OPTIONS

--sql|-S

Use SQL-based query engine (default).

--btred|-B

Query given files or filelist using btred.

--ntred|-N

Query given files or filelist using ntred (ntred servers must be already up and running).

--jtred|-J

Run query query over given files/filelist using jtred (multiple btred instances distributed over an SGE cluster).

--server|-s URL_or_ID

If used with SQL-based engine, this option can be used to specify a URL (http://hostname:port) to a pmltq http server, or an ID of a pre-configured SQL or HTTP server (use --print-servers to get a list).

If used with btred or jtred, it can be used to specify a server to run btred/jtred on using SSH.

If used with ntred, it can be used to specify a hostname and port (hostname:port) for the ntred hub.

--stdin

Read query from the standard input.

--query|-Q string

Specify PML-TQ query on the command-line.

--query-file filename

Read PML-TQ query from a given (utf-8 encoded text) file

--query-pml-file filename

Read PML-TQ query from a given PML file

--query-id ID

Use query with a given ID. If the input is a text file, it can contain more than one query. In that case, each query must start with a line of the following form:

  # == query: ID ==

where ID is a unique identifier of the query. This option can be used to select a single query from the input.

If the input is a PML file, then the ID is just the id of the query tree.

--filelist|-l filename

This flag can be used with --btred, --ntred, or --jtred to spedify a file containing a list of files to search, each on a separate line.

Note that for --ntred, the files must be already loaded on the ntred servers and this flag simply allows you to specify a subcorpus.

--auth-id URL_or_ID

Use username/password stored in the configuration for a given service (spcified by URL or config-file ID) on the serice specified using --server.

--username username

Username for a HTTP or SQL PML-TQ service.

--password password

Password for a HTTP or SQL PML-TQ service.

--limit|-L number

Only applicable to SQL-based engine. Specify maximum number of results (i.e. rows printed by pmltq).

--timeout|-t seconds

Only applicable to SQL-based engine. Specify a timeout for the query. If the query evaluation takes longer than a given number of seconds, pmltq terminates the connection with the server and returns with a message "Evaluation of query timed out" and exit code 2.

--config-file|-c filename

Specify a configuration file. The configuration file is a XML file (in fact, a PML instance conforming to the treebase_conf_schema.xml) that lists available SQL engine configurations. If this option is not provided, pmltq attempts to find a file named treebase.conf in the resource paths (namely in ~/.tred.d).

--node-types

List available node types and exit.

--print-servers|-P

Print list of configured query server connections and exit. If a HTTP service is specified using the --server option, the service is contacted to provide a list of all other public PML-TQ services running on the same server for which the user is authorized.

--netgraph-query|-N type_name

Assume the query is in NetGraph syntax and translate it to PMLTQ, using a given node type as the default type.

--debug|-D

Print some extended information (e.g. evaluation benchmarks).

--usage|-u

Print a brief help message on usage and exits.

--help|-h

Prints the help page and exits.

--man

Displays the help as manual page.

--version

Print program version.