Usage: pmltq COMMAND [OPTIONS] pmltq version pmltq configuration pmltq init schema1.xml schema2.xml pmltq convert pmltq load pmltq initdb pmltq delete pmltq webload pmltq webdelete pmltq webtreebank pmltq webverify Options (for all commands): -c, --config Config file, by default commands will look for config file called C<pmltq.yml> in the current directory.
These commands are available by default.
$ pmltq convert
Uses PMLTQ::Command::configuration to to get current configuration
Uses PMLTQ::Command::convert to convert data in the data_dir based on layers configuration
data_dir
$ pmltq delete
Uses PMLTQ::Command::delete to delete the database for current treebank
$ pmltq init resources/schema1.xml resources/schema2.xml
Uses PMLTQ::Command::init to generate initial configuration file skeleton based on given schemas. This command can help you quickly bootstrap the layers configuration
$ pmltq initdb
Uses PMLTQ::Command::initdb to create and initialize new database for given treebank
$ pmltq load
Uses PMLTQ::Command::load to load the data generated by convert command
convert
Uses PMLTQ::Command::query to run a query on given treebank.
Uses PMLTQ::Command::verify to check if database exists and contains some data. For now the checking is very simple
Uses PMLTQ::Command::version to display current PMLTQ version
Uses PMLTQ::Command::webdelete to delete treebank from web interface
Uses PMLTQ::Command::webload to load treebank to web interface
Uses PMLTQ::Command::webtreebank to get list of treebanks or single treebank info
Uses PMLTQ::Command::webverify to verify treebank visibility in web interface
treebank_id
ID of the treebank. Can contain only [a-zA-Z0-9_]. It will be default for the database name and treebank name in web interface.
Directory where the data are (this is also base directory for data layers)
Defaults: data
resources
Base directory for PML schemas
Defaults: resources
output_dir
Directory for all sql dump files. The files generated by convert and used by load command
load
Defaults: sql_dump
db
name
Database name
Defaults: treebank_id if defined
host
Database server hostname or IP address
Defaults: localhost
port
Database port
Defaults: 5432
user
password
Database credentials
sys_db
Name of the 'system database' used for administration commands such as CREATE and DROP.
CREATE
DROP
layers
The configuration of treebank's layers and references for each layer.
Schema root name
data
A glob path name matching pattern relative to data_dir
glob
path
A path name matching pattern relative to PML-TQ server data directory
related-schema
List of related schemas that contain node types required in this layer's reference configuration
references
This is key-value hash where key is path to the member of the node structure and value is node type or '-' (dash) if you intend to ignore that particular reference. If the node type is not in the current layer schema you have to prefix node type with the schema name and the appropriate schema have to be listed in related-schema list.
Examples:
references: path/attr1: '-' #--> ignore this reference path/attr2: ref-node #--> reference node type 'ref-node' path/attr3: schema:other-node #--> reference node type 'other-node' in schema 'schema'
title
Treebank title visible at the web.
homepage
Treebank homepage url.
description
Treebank description visible at the web.
isFree
Boolean value (true, false) sets if the logging in is not required for querying treebank.
true
false
Defaults: false
isAllLogged
Boolean value (true, false) sets if treebank is queryable for all logged in users.
isPublic
Boolean value (true, false) sets if the treebank is visible for not logged users.
isFeatured
Boolean value (true, false) sets if the treebank is featured.
web_api
dbserver
Name of database server setted in web interface.
url
Link to PML-TQ web service.
Web API credentials of user with admin privileges.
manuals
List of manuals
Title and link to manual
tags
List of tags
language
Language code
test_query
result_dir
Directory where should be saved results of test queries (SVG and text files)
queries
filename
Name of the file where the results should be saved
query
PML-TQ query
You can use command line parameters to modify any configuration options.
For example you can use
pmltq load --output_dir='/some/path' --data_dir='some/other/path' --db-name='abc'
Dash - in the parameter's name means dive into the hash, so --db-name='abc' is going to change db: name: 'abc' while --db_name='abc' would just set configuration option db_name: 'abc'.
-
--db-name='abc'
db: name: 'abc'
--db_name='abc'
db_name: 'abc'
Following table shows which options are used in commands.
data_dir: /pmltq/data/dir/ # directory where the data are (this is also base directory for data layers) resources: /pmltq/resources/ # main directory with PML schemas treebank_id: tbid db: # typical DB auth stuff name: treebank_db_name host: localhost port: 5432 user: pmltq password: pwd layers: # description of all data layers - name: adata data: ./relative/to/data_dir/**/*.a.gz related-schema: - adata_schema.xml references: t-node/val_frame.rf: '-' t-a/aux.rf: 'adata:a-node' t-node/coref_gram.rf: t-node - name: tdata data: **/*.t.gz web_api: user: webuser password: pwd url: 'https://serviceurl.com/' dbserver: myserver title: 'Treebank name' description: 'Short trebank descrioprion' language: cs tags: - mytag1 - mytag2
To install PMLTQ::Commands, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PMLTQ::Commands
CPAN shell
perl -MCPAN -e shell install PMLTQ::Commands
For more information on module installation, please visit the detailed CPAN module installation guide.