This is Anotatornia, a Ruby on Rails-based application for manual
multi-level annotation of texts.

The Anotatornia program, i.e. the contents of directories app/, db/
and files contained in the main directory, are released under the GNU
Public License version 3

A compatible copy of the Ruby on Rails framework, 
i.e. the contents of vendor/rails/, is provided under the MIT license.

For the texts of those licenses see file COPYING.



====================================
INSTALLATION and DEPLOYMENT
====================================

You'll need:
    Ruby			v.>=1.8,
    SQLite3 		v.>=3.3.6
    sqlite3-ruby	v.>=1.2.4
    mongrel		v.>=1.1.5

    Rails v==1.2.4 (provided in this package)

As you are reading this file, let's assume you have unpacked the
contents of the archive to a directory ~/anotatornia (and you want it
to stay there). To start, you should

   		sqlite3 <database-name>.db
		.read schema_NK.sql
		C-d (quit SQLite3)

This creates the database file and gives it Anotatornia's
structure. Since in the NKJP project there were many linguistic
databases with the same set of users, the users' database is contained
in another file. Create it:

     	     	 sqlite3 <users_db>.db
		 .read schema_u.sql
		 C-d (quit SQLite3)

Now configure the Rails code: add a stanza for your database to the
config/database.yml file and define an environment file for it (named
the same as the stanza in config/database.yml).

To be sure the database is most up-to-date run also
      
		RAILS_ENV=<your env. name>  rake db:migrate

Then you can probably input linguistic data. The morphosyntactic
tagset is in file gramdata/tagset.cfg.


You can add new users via admin interface. During the very first
launch of a new Anotatornia a default admin is created with login
'QueenOfSpades' and password '15 mars 1615 Paris'. It is strongly
advisable that you delete this user after creating your own admin(s)
or at least change her password.


The texts in NKJP XML format are input with the danowlew script in which
you type path to them:

    	      danowlew  <envir.>  <path to texts>

To make your Anotatornia available from outside you should open some
port (in NKJP project it was 8003) and write it down in the
anotatornia-mongrels script. Then run

		     ./anotatornia-mongrels start

for single launch (during tests etc.) or		    

   	     ./anotatornia-keeprunning

for full deployment. The latter script launches mongrel server(s) as
set in anotatornia-mongrels and every 10 seconds checks whether are
they running.



=======================================
ANNOTATION
=======================================

Too complicated to describe it here. See Instrukcja anotacji...



=======================================
EXPORT of ANNOTATED DATA
=======================================

You export the annotated data with the sowa shell script:
    	   
		./sowa [argument]

The <argument>s accepted by sowa are intended to
narrow the set of data to export and are described in the
script. They include Ruby's number interval (for interval of Akapit's)
and a Ruby's (almost Perl's) Regexp to specify the Corpus path(s).

You should modify that script to make it copy and export *your*
database.


=========================
See also:
=========================
(contained in this zip)
anotatornia.dia (the database diagram in Dia)
Technical remarks concerning the Anotatornia service...pdf 
instrukcja_NK.pdf (in Polish)
