SYNOPSIS

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

or

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

DESCRIPTION

Run the query.

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/APIpath/treebanks/treebankID) 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).

--history|-H

Sets whether should be query logged to users query history on server.

--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.

--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).