WARNING: WORK IN PROGRESS - THIS IS ONLY A TEMPLATE FOR THE DOCUMENTATION.
RELEASE DOCS ARE ON THE PROJECT WEBSITE
This release allows to perform basic import / export of XML in Diversicon LMF format and SQL dumps. Some function to query db metadata and import log is also provided.
You can download Diver CLI from here, then unzip somewhere on your system.
NOTE: This manual assumes you have added bin/divercli
to the path of your shell,
see INSTALL.txt instructions.
To see usage commands:
In Linux / Mac, from terminal just type:
bin/divercli
In Windows, click on Start menu, run command cmd
and in the console type:
bin\divercli.bat
In DiverCli, a project is a folder with configuration for connecting to a database, plus possibly the database itself and other custom scripts. It might look like this:
divercli.ini
my-diversicon.db.h2
my-script.sql
.
.
.
DiverCli comes with full support for H2 database, which is shipped with DiverCli and doesn't require separate installation (for info on browsing databases, see Tools page).
Let's create our first H2 file-based database with Wordnet 3.1 inside:
$eval{wn31.init}
In detail:
--prj wn31
tells DiverCLI in which folder to put the projectinit
is the actual comand given to DiverCli--db
specifies toinit
command where to take the db. In this case Wordnet 3.1 is pre-packaged in the DiverCLI distribution so we picked it with the special URL beginning withclasspath:
Notice that --prj
always goes before commands.
These files were generated:
$eval{wn31.cd}
$eval{wn31.dir}
The file divercli.ini
tells DiverCli where to connect when we launch the tool from the project directory. In this particular case the database is in the same folder, but it could be anywhere, even a remote connection.
You can check things are working by issuing the log
command, which will show a status of the database and a log of the imports done so far. Notice the first import is always the div-upper
lexical resource:
$eval{wn31.log}
We can now try to import the lexical resource smartphones.xml
, which depends upon the already imported Wordnet:
$eval{smartphones.import.success}
After the import we can check the log:
$eval{smartphones.import.success.log}
If instead of Wordnet you want to start with an empty database, you can create an empty database for example in directory myprj
by issuing divercli --prj myprj init
. Note that the system will always preload in the db the lexical resource DivUpper
:
$eval{empty.init}
$eval{empty.cd}
$eval{empty.dir}
$eval{empty.log}
You can learn more about handling XMLs in Commands page. In Configuration you can read about global and per-project configuration, and logging.