├── hunalign
├── _none_.dic
└── process.sh
├── index.php
├── cli
├── .htaccess
├── renumber
├── update
├── import
├── align
└── export
├── icons
├── add.png
├── asc.png
├── .DS_Store
├── arrow.png
├── desc.png
├── go-up.png
├── mark.png
├── merge.png
├── nomark.png
├── remove.png
├── search.png
├── swap.png
├── arrow-up.png
├── flag-red.png
├── go-down.png
├── go-first.png
├── go-jump.png
├── go-last.png
├── go-next.png
├── go-prev.png
├── journal.png
├── to-check.png
├── .directory
├── arrow-down.png
├── automatic.png
├── changelog.png
├── dialog-ok.png
├── edit-delete.png
├── edit-rename.png
├── flag-yellow.png
├── legalmoves.png
├── document-edit.png
├── document-new.png
├── document-save.png
├── go-next-view.png
├── help-contents.png
├── arrow-up-double.png
├── dialog-ok-apply.png
├── document-export.png
├── document-import.png
├── go-previous-view.png
├── layer-visible-on.png
├── status_unknown.png
├── arrow-down-double.png
├── edit-delete-shred.png
├── layer-visible-off.png
├── format-list-ordered.png
├── format-list-unordered.png
├── LICENSE
└── COPYING.LESSER
├── docker
├── mysql_charset.cnf
├── Dockerfile
├── import
│ ├── test_pl.txt
│ ├── test_pl.xml
│ ├── test_en.txt
│ └── test_en.xml
├── docker-compose.yml
├── init
│ └── 01.sql
├── Readme.md
└── config.php
├── update-1.5.sql
├── css
├── cupertino
│ └── images
│ │ ├── ui-icons_2694e8_256x240.png
│ │ ├── ui-icons_2e83ff_256x240.png
│ │ ├── ui-icons_3d80b3_256x240.png
│ │ ├── ui-icons_72a7cf_256x240.png
│ │ ├── ui-icons_ffffff_256x240.png
│ │ ├── ui-bg_flat_15_cd0a0a_40x100.png
│ │ ├── ui-bg_glass_100_e4f1fb_1x400.png
│ │ ├── ui-bg_glass_50_3baae3_1x400.png
│ │ ├── ui-bg_glass_80_d7ebf9_1x400.png
│ │ ├── ui-bg_highlight-hard_70_000000_1x100.png
│ │ ├── ui-bg_highlight-soft_25_ffef8f_1x100.png
│ │ ├── ui-bg_diagonals-thick_90_eeeeee_40x40.png
│ │ ├── ui-bg_highlight-hard_100_f2f5f7_1x100.png
│ │ └── ui-bg_highlight-soft_100_deedf7_1x100.png
└── intertext.css
├── triggers
├── alstat_finished
└── alstat_closed
├── tca2
├── no-cs.cfg
└── no-cs.dic
├── users.sql
├── intertext.sql
├── init.php
├── LICENSE
├── update-2.0.php
├── config
├── export_customization.php
├── default_permissions.php
├── login_handler.php
└── config.php
├── UPDATE.txt
├── progress.php
├── js
├── ui.progressbar.js
├── jxs.js
├── jeip.js
└── ui.core.js
├── update-2.2.php
├── alignment.php
├── header.php
├── users.php
├── INSTALL
├── CHANGELOG
├── README.md
└── textmanager.php
/hunalign/_none_.dic:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 | aligner.php
--------------------------------------------------------------------------------
/cli/.htaccess:
--------------------------------------------------------------------------------
1 | Deny from all
2 |
3 |
--------------------------------------------------------------------------------
/icons/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/add.png
--------------------------------------------------------------------------------
/icons/asc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/asc.png
--------------------------------------------------------------------------------
/icons/.DS_Store:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/.DS_Store
--------------------------------------------------------------------------------
/icons/arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/arrow.png
--------------------------------------------------------------------------------
/icons/desc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/desc.png
--------------------------------------------------------------------------------
/icons/go-up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-up.png
--------------------------------------------------------------------------------
/icons/mark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/mark.png
--------------------------------------------------------------------------------
/icons/merge.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/merge.png
--------------------------------------------------------------------------------
/icons/nomark.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/nomark.png
--------------------------------------------------------------------------------
/icons/remove.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/remove.png
--------------------------------------------------------------------------------
/icons/search.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/search.png
--------------------------------------------------------------------------------
/icons/swap.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/swap.png
--------------------------------------------------------------------------------
/icons/arrow-up.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/arrow-up.png
--------------------------------------------------------------------------------
/icons/flag-red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/flag-red.png
--------------------------------------------------------------------------------
/icons/go-down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-down.png
--------------------------------------------------------------------------------
/icons/go-first.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-first.png
--------------------------------------------------------------------------------
/icons/go-jump.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-jump.png
--------------------------------------------------------------------------------
/icons/go-last.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-last.png
--------------------------------------------------------------------------------
/icons/go-next.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-next.png
--------------------------------------------------------------------------------
/icons/go-prev.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-prev.png
--------------------------------------------------------------------------------
/icons/journal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/journal.png
--------------------------------------------------------------------------------
/icons/to-check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/to-check.png
--------------------------------------------------------------------------------
/icons/.directory:
--------------------------------------------------------------------------------
1 | [Dolphin]
2 | PreviewsShown=true
3 | Timestamp=2014,2,26,14,31,27
4 | Version=3
5 |
--------------------------------------------------------------------------------
/icons/arrow-down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/arrow-down.png
--------------------------------------------------------------------------------
/icons/automatic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/automatic.png
--------------------------------------------------------------------------------
/icons/changelog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/changelog.png
--------------------------------------------------------------------------------
/icons/dialog-ok.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/dialog-ok.png
--------------------------------------------------------------------------------
/icons/edit-delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/edit-delete.png
--------------------------------------------------------------------------------
/icons/edit-rename.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/edit-rename.png
--------------------------------------------------------------------------------
/icons/flag-yellow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/flag-yellow.png
--------------------------------------------------------------------------------
/icons/legalmoves.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/legalmoves.png
--------------------------------------------------------------------------------
/docker/mysql_charset.cnf:
--------------------------------------------------------------------------------
1 | [mysqld]
2 | character-set-server=utf8
3 | collation-server=utf8_general_ci
4 |
--------------------------------------------------------------------------------
/icons/document-edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/document-edit.png
--------------------------------------------------------------------------------
/icons/document-new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/document-new.png
--------------------------------------------------------------------------------
/icons/document-save.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/document-save.png
--------------------------------------------------------------------------------
/icons/go-next-view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-next-view.png
--------------------------------------------------------------------------------
/icons/help-contents.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/help-contents.png
--------------------------------------------------------------------------------
/icons/arrow-up-double.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/arrow-up-double.png
--------------------------------------------------------------------------------
/icons/dialog-ok-apply.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/dialog-ok-apply.png
--------------------------------------------------------------------------------
/icons/document-export.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/document-export.png
--------------------------------------------------------------------------------
/icons/document-import.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/document-import.png
--------------------------------------------------------------------------------
/icons/go-previous-view.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/go-previous-view.png
--------------------------------------------------------------------------------
/icons/layer-visible-on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/layer-visible-on.png
--------------------------------------------------------------------------------
/icons/status_unknown.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/status_unknown.png
--------------------------------------------------------------------------------
/icons/arrow-down-double.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/arrow-down-double.png
--------------------------------------------------------------------------------
/icons/edit-delete-shred.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/edit-delete-shred.png
--------------------------------------------------------------------------------
/icons/layer-visible-off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/layer-visible-off.png
--------------------------------------------------------------------------------
/icons/format-list-ordered.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/format-list-ordered.png
--------------------------------------------------------------------------------
/icons/format-list-unordered.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/icons/format-list-unordered.png
--------------------------------------------------------------------------------
/update-1.5.sql:
--------------------------------------------------------------------------------
1 | USE intertext;
2 | ALTER TABLE versions ADD COLUMN filename TEXT;
3 | ALTER TABLE versions ADD INDEX index_filename (filename(20));
4 |
--------------------------------------------------------------------------------
/css/cupertino/images/ui-icons_2694e8_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-icons_2694e8_256x240.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-icons_2e83ff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-icons_2e83ff_256x240.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-icons_3d80b3_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-icons_3d80b3_256x240.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-icons_72a7cf_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-icons_72a7cf_256x240.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-icons_ffffff_256x240.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-icons_ffffff_256x240.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_flat_15_cd0a0a_40x100.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_glass_100_e4f1fb_1x400.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_glass_50_3baae3_1x400.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_glass_80_d7ebf9_1x400.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_highlight-hard_70_000000_1x100.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_highlight-hard_100_f2f5f7_1x100.png
--------------------------------------------------------------------------------
/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/czcorpus/InterText_server/HEAD/css/cupertino/images/ui-bg_highlight-soft_100_deedf7_1x100.png
--------------------------------------------------------------------------------
/icons/LICENSE:
--------------------------------------------------------------------------------
1 | This directory contains images from the KDE project Oxygen:
2 | http://www.kde.org
3 | https://techbase.kde.org/Projects/Oxygen
4 |
5 | These icons are licensed under LGPL v3 (see COPYING.LESSER).
6 |
--------------------------------------------------------------------------------
/hunalign/process.sh:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # Insert preprocessing here (tokenizing, conversion to stemmed text, etc.)
4 |
5 | echo 'Running hunalign aligner...'
6 | ./hunalign -utf -realign $1.dic $2 $3 2>&1 >$4
7 | echo 'Hunalign finished.'
8 |
--------------------------------------------------------------------------------
/docker/Dockerfile:
--------------------------------------------------------------------------------
1 | FROM php:apache
2 |
3 | RUN apt-get update && apt-get -y install git
4 |
5 | RUN git clone https://github.com/czcorpus/InterText_server.git .
6 |
7 | RUN docker-php-ext-install mysqli
8 |
9 | RUN cp /var/www/html/icons/* /usr/share/apache2/icons
10 |
11 | RUN ln -s /usr/local/bin/php /usr/bin/php
12 |
13 | #COPY hunalign /var/www/html/hunalign/
14 |
--------------------------------------------------------------------------------
/triggers/alstat_finished:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # script called when status 'finished' is set
4 | # parameters: text_name version1_name version2_name old_status alignment_id
5 | # old_status can be 'open', 'finished', 'closed' or 'blocked'
6 | # last line written to STDOUT will be showed to the used as 'WARNING'
7 |
8 | #echo "alignment of text '$1', version '$2' and '$3' (with id '$5') changed status from '$4' to 'finished'" >/tmp/report.txt
9 |
10 | #echo "Error message to show to the user."
11 |
--------------------------------------------------------------------------------
/tca2/no-cs.cfg:
--------------------------------------------------------------------------------
1 | relevantElementNames=s head
2 | relevantAncestorElementNames=p div
3 | specialCharacters=.,;:?!&^(){}[]'„“"«»…‚’->
4 | scoringCharacters=?!%;:…*-
5 | lengthRatio=0.9
6 | diceMinWordLength=5
7 | diceMinCountingScore=0.7
8 | largeClusterScorePercentage=25
9 | anchorWordMatchWeight=1.8
10 | anchorPhraseMatchWeight=1.6
11 | properNameMatchWeight=1.3
12 | diceMatchWeight=1.1
13 | dicePhraseMatchWeight=1.3
14 | numberMatchWeight=1.3
15 | scoringCharacterMatchWeight=1.3
16 | maxPathLength=10
17 | ancestorInfo=none
18 | ancestorInfoElementNames=
19 | ancestorInfoAttributeNames=
20 |
--------------------------------------------------------------------------------
/users.sql:
--------------------------------------------------------------------------------
1 | USE intertext;
2 | SET CHARACTER SET utf8;
3 | CREATE TABLE `users` (
4 | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
5 | `username` tinytext,
6 | `password` tinytext,
7 | `status` int(10) unsigned DEFAULT NULL,
8 | `name` tinytext,
9 | `surname` tinytext,
10 | PRIMARY KEY (`id`)
11 | );
12 |
13 | INSERT INTO `users` VALUES
14 | (1,'admin','098f6bcd4621d373cade4e832627b4f6',0,'Admin','Allmighty'),
15 | (2,'resp','098f6bcd4621d373cade4e832627b4f6',1,'Responsible','Supervisor'),
16 | (3,'editor','098f6bcd4621d373cade4e832627b4f6',2,'Any','Editor');
17 |
--------------------------------------------------------------------------------
/docker/import/test_pl.txt:
--------------------------------------------------------------------------------
1 | Dziękuję bardzo, na początek dziękuję panu Sameckiego z~ z~ za jego pracę. Wszyscy zgadzamy się, że dyrektywa ta powinna obowiązywać +y+ nie tylko w Unii Europejskiej, ale nawet na całym świecie. My to dyskutowaliśmy w gronie delegacji do spraw kontaktów z Kanadą, ale by było to możliwe musimy dołożyć staranie, by porównywalne poziomy kwalifikacji w Europie, i na świecie też, powinno być uznawane. I jest taka anegdota, że w niektórych +y+ państwach, kiedy uczniowie nie zdają jakiegoś kursu to mogą pojechać do innego kraju i tam startować jeszcze raz czy zdawać łatwiej, dlatego musimy mieć system jasnych +yy+ kwalifikacji w całej Unii i, w stosownej chwili, może na całym świecie. Nawet byśmy mieli swobodny przepływ +y+ pracowników. Dziękuję.
2 |
--------------------------------------------------------------------------------
/docker/docker-compose.yml:
--------------------------------------------------------------------------------
1 | version: '3.3'
2 |
3 | services:
4 | db:
5 | image: mysql:5
6 | volumes:
7 | - db_data:/var/lib/mysql
8 | - ./init:/docker-entrypoint-initdb.d
9 | - ./mysql_charset.cnf:/etc/mysql/mysql.conf.d/charset.cnf
10 | restart: always
11 | environment:
12 | MYSQL_ROOT_PASSWORD: root
13 | MYSQL_DATABASE: intertext
14 | MYSQL_USER: intertext
15 | MYSQL_PASSWORD: intertext
16 |
17 | www:
18 | depends_on:
19 | - db
20 | build:
21 | context: ./
22 | image: intertext:latest
23 | volumes:
24 | - ./config.php:/var/www/html/config/config.php
25 | - ./import:/import
26 | ports:
27 | - "80:80"
28 | restart: always
29 | volumes:
30 | db_data: {}
31 |
--------------------------------------------------------------------------------
/triggers/alstat_closed:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # script called when status 'closed' is set
4 | # parameters: text_name version1_name version2_name old_status alignment_id responsible_userid editor_userid
5 | # old_status can be 'open', 'finished', 'closed' or 'blocked'
6 | # last line written to STDOUT will be showed to the used as 'WARNING'
7 |
8 | #echo "alignment of text '$1', version '$2' and '$3' (with id '$5') changed status from '$4' to 'closed', responsible userid: $6, editor userid: $7" >/tmp/report.txt
9 |
10 | ### Export all files to $OUT_DIR
11 | #OUT_DIR=/tmp
12 | #cli/export -f xml_links:ic aid $5 >$OUT_DIR/$1.$2_$3.aln.xml
13 | #cli/export -f orig:ic t1aid $5 >$OUT_DIR/$1.$2.xml
14 | #cli/export -f orig:ic t2aid $5 >$OUT_DIR/$1.$3.xml
15 |
16 | #echo "Error message to show to the user."
17 |
--------------------------------------------------------------------------------
/docker/import/test_pl.xml:
--------------------------------------------------------------------------------
1 |
2 | Dziękuję bardzo, na początek dziękuję panu Sameckiego z~ z~ za jego pracę.Wszyscy zgadzamy się, że dyrektywa ta powinna obowiązywać +y+ nie tylko w Unii Europejskiej, ale nawet na całym świecie.My to dyskutowaliśmy w gronie delegacji do spraw kontaktów z Kanadą, ale by było to możliwe musimy dołożyć staranie, by porównywalne poziomy kwalifikacji w Europie, i na świecie też, powinno być uznawane.I jest taka anegdota, że w niektórych +y+ państwach, kiedy uczniowie nie zdają jakiegoś kursu to mogą pojechać do innego kraju i tam startować jeszcze raz czy zdawać łatwiej, dlatego musimy mieć system jasnych +yy+ kwalifikacji w całej Unii i, w stosownej chwili, może na całym świecie.Nawet byśmy mieli swobodny przepływ +y+ pracowników.Dziękuję.
--------------------------------------------------------------------------------
/docker/import/test_en.txt:
--------------------------------------------------------------------------------
1 | +Eh+ thank you, mister president, firstly, my thanks to mister Samecki for his good work. I think we all agree with the theme we're discussing here this morning, not only should it apply across the European Union but it sh~ should apply worldwide as well. And this is something we discussed recently at the Canadian delegation, which is a step in the right direction. But if we want that +eh+ utopian situation, we must ensure that the professional qualifications are of an equal standard across the European Union and worldwide, ideally. And there is anecdotal evidence to suggest that, in some countries at least, when students haven't reached the educational standard to qualify for a course, they can go to another country and pay to do it there. So there is need for independent verifiable evidence that the standards are equal and, if they are equal, then there is no excuse for not transposing this theme across the European Union and, hopefully, in due course, worldwide, to attain what we desire, free movement of professionals~ in labour. Thank you very much.
2 |
--------------------------------------------------------------------------------
/docker/import/test_en.xml:
--------------------------------------------------------------------------------
1 |
2 | +Eh+ thank you, mister president, firstly, my thanks to mister Samecki for his good work.I think we all agree with the theme we're discussing here this morning, not only should it apply across the European Union but it sh~ should apply worldwide as well.And this is something we discussed recently at the Canadian delegation, which is a step in the right direction.But if we want that +eh+ utopian situation, we must ensure that the professional qualifications are of an equal standard across the European Union and worldwide, ideally.And there is anecdotal evidence to suggest that, in some countries at least, when students haven't reached the educational standard to qualify for a course, they can go to another country and pay to do it there.So there is need for independent verifiable evidence that the standards are equal and, if they are equal, then there is no excuse for not transposing this theme across the European Union and, hopefully, in due course, worldwide, to attain what we desire, free movement of professionals~ in labour.Thank you very much.
--------------------------------------------------------------------------------
/intertext.sql:
--------------------------------------------------------------------------------
1 | #DROP DATABASE intertext;
2 | SET default_storage_engine=InnoDB;
3 | CREATE DATABASE intertext DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
4 |
5 | GRANT ALL PRIVILEGES ON intertext.* TO 'intertext'@'localhost' IDENTIFIED BY 'intertext';
6 |
7 | USE intertext;
8 |
9 | CREATE TABLE texts (
10 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
11 | name TINYTEXT,
12 |
13 | PRIMARY KEY (id),
14 | INDEX index_name (name(20))
15 | );
16 |
17 | CREATE TABLE `versions` (
18 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
19 | text_id BIGINT UNSIGNED,
20 | version_name TINYTEXT,
21 | root_id BIGINT UNSIGNED,
22 | text_changed BOOL DEFAULT FALSE,
23 | uniq_ids BOOL DEFAULT FALSE,
24 | text_elements TEXT NOT NULL,
25 | filename TEXT,
26 |
27 | PRIMARY KEY (id),
28 | INDEX index_text_id (text_id),
29 | INDEX index_name (version_name(20))
30 | );
31 |
32 | CREATE TABLE `alignments` (
33 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
34 | ver1_id BIGINT UNSIGNED,
35 | ver2_id BIGINT UNSIGNED,
36 | method TINYTEXT NOT NULL,
37 | profile TINYTEXT NOT NULL,
38 | resp INT UNSIGNED,
39 | editor INT UNSIGNED,
40 | c_chstruct BOOLEAN DEFAULT 0,
41 | chtext BOOLEAN DEFAULT 0,
42 | status INT UNSIGNED DEFAULT 0,
43 | remote_user BIGINT UNSIGNED,
44 |
45 | PRIMARY KEY (id),
46 | INDEX index_ver1 (ver1_id),
47 | INDEX index_ver2 (ver2_id),
48 | INDEX index_resp (resp),
49 | INDEX index_editor (editor),
50 | INDEX index_status (status),
51 | INDEX index_remote_user (remote_user)
52 | );
53 |
--------------------------------------------------------------------------------
/init.php:
--------------------------------------------------------------------------------
1 | .
20 | *
21 | */
22 |
23 | ini_set('error_reporting', E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED);
24 |
25 | # Session initialization
26 | ini_set('session.gc_maxlifetime', '31104000');
27 | session_name('InterText_SID');
28 | session_start();
29 | $cookie=session_get_cookie_params();
30 | $ctimeout = time()+60*60*24*30*12*5;
31 | setcookie(session_name(),session_id(),$ctimeout);
32 |
33 | require 'config/config.php';
34 | require 'config/login_handler.php';
35 | require 'config/default_permissions.php';
36 | require 'config/export_customization.php';
37 | ?>
--------------------------------------------------------------------------------
/tca2/no-cs.dic:
--------------------------------------------------------------------------------
1 | —/—
2 | Jorunn/Janou,Jana
3 | liv*/život*
4 | men/ale
5 | og/a
6 | i/v,ve
7 | —/—
8 | Jorunn/Jan*
9 | Hilde/Hild*
10 | ja/ano
11 | nei/ne
12 | også/také,taky,i
13 | at/že
14 | for/pro,aby
15 | med/s
16 | hvilke*/jak*,kter*
17 | menneske*/člověk*
18 | Gud/Bůh,Boh*
19 | krist*/křes*
20 | dette/to*,ono
21 | denne/ten*,to*
22 | forst*/rozum*,pochop*,cháp*
23 | skjøn*/rozum*,pochop*,cháp*
24 | slik/tak
25 | sa/řekl*,prohlásil*
26 | sier/říká,tvrdí
27 | ja/ano,jo
28 | nei/ne
29 | av/z,ze
30 | hva/co
31 | hvem/kdo
32 | hvor/kde
33 | hel*/cel*
34 | i dag/dnes
35 | selvfølgelig/samozřejmě
36 | hvorfor/proč
37 | hvordan/jak
38 | når/kdy,když
39 | mange/mnoh*,hodně
40 | så/tak,takže
41 | nå/teď,nyní
42 | da/když,jak*
43 | Tomas/Tomáš*
44 | dag*/den*,dn*
45 | natt*/noc*,noč*
46 | to/dva,dvě
47 | han/on
48 | ham/jeho,ho,jej,něm
49 | henne/ona,jí,ní,ji
50 | hans/jeho
51 | hennes/její
52 | kan/mohu,mohou,může*
53 | jeg/já
54 | du/ty
55 | må/musí*,smí*
56 | tenk*/mysl*
57 | al*/vš*
58 | mandag/pondělí
59 | tirsdag/úterý
60 | onsdag/střed*
61 | torsdag/čtvrtek,čtvrtk*
62 | fredag/pátek,pátk*
63 | lørdag/sobot*
64 | søndag/neděl*
65 | føl*/cíti*,cítě*
66 | enn/než
67 | som/jak*,kter*,kdo,koho,komu,kým
68 | hør*/slyš*
69 | ingenting/nic
70 | vite/vědět
71 | visste/věděl*
72 | vet/ví
73 | meg/mně,mi,mě,mn*
74 | deg/tobě,ti,tě,teb*
75 | min/můj,má,mé*,moj*
76 | din/tvůj,tv*
77 | disse/tito,tyto,tato,takov*
78 | side*/stran*
79 | svar*/odpov*
80 | allerede/už
81 | likevel/přesto
82 | allikevel/přesto
83 | Cecilie/Cecílie,Cilk*
84 | ler/směj*,usmív*
85 | le/smát,usmívat
86 | lo/smál*,usmíval*
87 | far*/otec,otc*
88 | mor*/matk*,matce
89 | bare/jen,jenom,sotva
90 | Hobsyssel*/Kraj*
91 | trollm*/čarod*
92 | alv*/elf*
93 | dverg*/trpasl*
94 | fjell*/hor*
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | ***************************************************************************
2 | Copyright (c) 2010-2017 Pavel Vondřička (Pavel.Vondricka@korpus.cz)
3 | Copyright (c) 2010-2017 Charles University in Prague, Faculty of Arts,
4 | Institute of the Czech National Corpus
5 | ***************************************************************************
6 |
7 | This package contains InterText Server.
8 |
9 | InterText Server is free software: you can redistribute it and/or modify
10 | it under the terms of the GNU General Public License as published by
11 | the Free Software Foundation, either version 3 of the License, or
12 | (at your option) any later version.
13 |
14 | InterText Server is distributed in the hope that it will be useful,
15 | but WITHOUT ANY WARRANTY; without even the implied warranty of
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 | GNU General Public License for more details.
18 |
19 | You should have received a copy of the GNU General Public License
20 | along with InterText Server. If not, see .
21 |
22 | ***************************************************************************
23 |
24 | The subdirectory "icons" contains files from the KDE project Oxygen
25 | (http://www.kde.org/) licensed under LGPL v3. See icons/LICENSE
26 | for details.
27 |
28 | ***************************************************************************
29 |
30 | InterText Server uses additional third-party javascript libraries licensed
31 | under their own licenses as provided in their code:
32 |
33 | jQuery:
34 | - js/jquery-1.3.2.min.js
35 | - js/ui.core.js
36 | - js/ui.progressbar.js
37 | - css/cupertino/ (all contents within this directory and its subdirectories)
38 |
39 | JEIP:
40 | - js/jeip.js
41 |
42 | JXS:
43 | - js/jxs.js
44 |
--------------------------------------------------------------------------------
/docker/init/01.sql:
--------------------------------------------------------------------------------
1 | USE intertext;
2 | SET CHARACTER SET utf8;
3 |
4 | CREATE TABLE texts (
5 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
6 | name TINYTEXT,
7 |
8 | PRIMARY KEY (id),
9 | INDEX index_name (name(20))
10 | );
11 |
12 | CREATE TABLE `versions` (
13 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
14 | text_id BIGINT UNSIGNED,
15 | version_name TINYTEXT,
16 | root_id BIGINT UNSIGNED,
17 | text_changed BOOL DEFAULT FALSE,
18 | uniq_ids BOOL DEFAULT FALSE,
19 | text_elements TEXT NOT NULL,
20 | filename TEXT,
21 |
22 | PRIMARY KEY (id),
23 | INDEX index_text_id (text_id),
24 | INDEX index_name (version_name(20))
25 | );
26 |
27 | CREATE TABLE `alignments` (
28 | id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
29 | ver1_id BIGINT UNSIGNED,
30 | ver2_id BIGINT UNSIGNED,
31 | method TINYTEXT NOT NULL,
32 | profile TINYTEXT NOT NULL,
33 | resp INT UNSIGNED,
34 | editor INT UNSIGNED,
35 | c_chstruct BOOLEAN DEFAULT 0,
36 | chtext BOOLEAN DEFAULT 0,
37 | status INT UNSIGNED DEFAULT 0,
38 | remote_user BIGINT UNSIGNED,
39 |
40 | PRIMARY KEY (id),
41 | INDEX index_ver1 (ver1_id),
42 | INDEX index_ver2 (ver2_id),
43 | INDEX index_resp (resp),
44 | INDEX index_editor (editor),
45 | INDEX index_status (status),
46 | INDEX index_remote_user (remote_user)
47 | );
48 |
49 | CREATE TABLE `users` (
50 | `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
51 | `username` tinytext,
52 | `password` tinytext,
53 | `status` int(10) unsigned DEFAULT NULL,
54 | `name` tinytext,
55 | `surname` tinytext,
56 | PRIMARY KEY (`id`)
57 | );
58 |
59 | INSERT INTO `users` VALUES
60 | (1,'admin','098f6bcd4621d373cade4e832627b4f6',0,'Admin','Allmighty'),
61 | (2,'resp','098f6bcd4621d373cade4e832627b4f6',1,'Responsible','Supervisor'),
62 | (3,'editor','098f6bcd4621d373cade4e832627b4f6',2,'Any','Editor');
63 |
--------------------------------------------------------------------------------
/update-2.0.php:
--------------------------------------------------------------------------------
1 | #!/usr/bin/php
2 | .
21 | *
22 | */
23 |
24 | set_time_limit(9999);
25 | $CLI_MODE = true;
26 | require 'init.php';
27 | require 'lib_intertext.php';
28 | $it = new InterText;
29 |
30 | $query = "ALTER TABLE alignments ADD COLUMN remote_user BIGINT UNSIGNED, ADD INDEX index_remote_user (remote_user)";
31 | print "Modifying table 'alignments'.\n";
32 | mysqli_query($it->DB,$query) OR print("- ERROR: Cannot modify database: ".mysqli_error($it->DB)."\n");
33 |
34 | $query = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='$DB_DATABASE' AND TABLE_NAME LIKE '%_changelog' AND TABLE_NAME NOT LIKE '%_align_%'";
35 | if (!$dbresult = mysqli_query($it->DB,$query))
36 | die("Cannot access database: ".mysqli_error($it->DB));
37 | $tables = array();
38 | while ($ret = mysqli_fetch_assoc($dbresult)) { $tables[] = $ret['TABLE_NAME']; }
39 |
40 | foreach($tables as $table) {
41 | $query = "ALTER TABLE $table ADD COLUMN open BOOLEAN DEFAULT FALSE, ADD INDEX index_open (open)";
42 | print "Modifying table '$table'.\n";
43 | mysqli_query($it->DB,$query) OR print("- ERROR: Cannot modify database: ".mysqli_error($it->DB)."\n");
44 | }
45 |
46 |
47 | ?>
--------------------------------------------------------------------------------
/docker/Readme.md:
--------------------------------------------------------------------------------
1 | # InterText server docker setup
2 |
3 | This folder contains a self-maintained Docker setup for the InterText server. To use the setup you need to first build the *intertext* image using the Dockerfile below and then you can start the service using the provided docker-compose configuration. Of course, this all assumes you have the official docker and docker-compose commands installed on your system.
4 |
5 | ## Dockerfile
6 |
7 | As there is no image at any public repository at the moment, you need to run this script to build the image locally. The script clones the official Github repository and creates an image using the latest sources. You need only the files from this folder to build the image.
8 |
9 | If you want *hunalign* functionality, you need to acquire the binary (eg. from the GUI version of the program), copy it to this folder (same as the Dockerfile) and uncomment the last line of the Dockerfile.
10 |
11 | Once you are ready, simply run:
12 |
13 | ```
14 | docker build -t intertext .
15 | ```
16 |
17 | This will take a little while. If everything is succesful, you should see your *intertext* image on the list by running `docker images`.
18 |
19 | ## docker-compose
20 |
21 | This script will run the service and the database instance required for it to function.
22 |
23 | The configuration mounts a couple of scripts to initialize the database the first time the image is created. These will create the default users and tables needed for the page to load for the first time.
24 |
25 | We also mount the import folder to `/import` if you want to use the CLI tools to import many files.
26 |
27 | To run the service, simply run the folowing command in this folder:
28 |
29 | ```
30 | docker-compose up -d
31 | ```
32 |
33 | Then you can observe the running processes:
34 |
35 | ```
36 | docker-compose ps
37 | ```
38 |
39 | And the logs:
40 |
41 | ```
42 | docker-compose logs
43 | ```
44 |
45 | To enter the terminal to use the CLI tools use the following command:
46 |
47 | ```
48 | docker exec -it intertext_www_1 bash
49 | ```
50 |
51 | Then simply enter the `cli` dir and try out all the commands there. Remeber, you can share the files between the docker containter and the host using the `./import` dir (mounted as `/import` inside the container).
52 |
--------------------------------------------------------------------------------
/config/export_customization.php:
--------------------------------------------------------------------------------
1 | .
20 | *
21 | */
22 |
23 | # Format header for exported files
24 | function format_exported_header($tname,$vname,$format,$idformat) {
25 | $ret = "\n";
26 | return $ret;
27 | }
28 |
29 | # Format IDs for exported files
30 | function format_exported_ids($ename,$id,$tname,$vname,$format='',$idformat='',$filename='') {
31 | # add text name as ID for our root element
32 | if ($ename=='doc') {
33 | return $tname;
34 | } elseif ($id!='') {
35 | # for other elements with non-empty ID:
36 | switch ($idformat) {
37 | # generate InterCorp long ID
38 | case 'ic':
39 | $id = strtr($id,'.:-_,',':::::');
40 | #$tname = strtolower($tname);
41 | #$vname = strtolower($vname);
42 | $vname = preg_replace('/-00$/','',$vname);
43 | $divid = 0;
44 | return "$vname:$tname:$divid:$id";
45 | # generate ECPC filename based long ID
46 | case 'fn':
47 | $id = strtr($id,'.:-_,',':::::');
48 | # trim the file extension
49 | $filename=preg_replace('/\..*$/','',$filename);
50 | return "$filename-se$id";
51 | # or just ensure the use of colon as separator otherwise
52 | case '_alignable_':
53 | default:
54 | $id = strtr($id,'.:-_,',':::::');
55 | return $id;
56 | }
57 | } else return '';
58 | }
59 | ?>
--------------------------------------------------------------------------------
/UPDATE.txt:
--------------------------------------------------------------------------------
1 | -> version 2.3
2 | ==============
3 |
4 | - the configuration file settings.php has been replaced and split into the files:
5 | init.php
6 | config/config.php
7 | config/default_permissions.php
8 | config/export_customization.php
9 | config/login_handler.php
10 | (you need to move your configuration settings into the appropriate files; in most
11 | cases this will only concern the settings in the config/config.php file)
12 |
13 | -> version 2.2
14 | ==============
15 |
16 | - you need EITHER to have MySQL version >= 5.6 OR to turn off fulltext searches
17 | explicitly by inserting '$DISABLE_FULLTEXT = true;' into your config.php -
18 | this must be decided/solved FIRST OF ALL!
19 | - it is highly suggested to use the option innodb_file_per_table in your
20 | MySQL configuration (usually in /etc/mysql/my.cnf, see the database
21 | documentation)
22 | - ensure that you have no upper size limit set for the main tablespace
23 | in innodb_data_file_path and that you have enough space available on your disk;
24 | the file may grow by several gigabytes even when using
25 | innodb_file_per_table and if it hits a size limit, you may get into troubles with
26 | the conversion process (below); the database will also grow significantly in
27 | size after conversion
28 | - in order to make the new transaction support effective on existing data,
29 | you need to run the script 'update-2.2.php', which will convert all
30 | existing tables into the InnoDB format (and remove fulltext indexes if
31 | fulltext is disabled in config.php) - this conversion is NOT neccessary for
32 | InterText to run, but until you convert the tables, the transactions will
33 | silently be ineffective for all texts existing before the update
34 | (and even for newly added translations of those texts!) - this conversion should
35 | in theory be safe to do on a running system, but making back-ups before any
36 | change is always highly recommended!
37 |
38 | version 1.7 -> version 2.0
39 | ==========================
40 | - before updating, the database must be updated by running the
41 | 'update-2.0.php' script
42 | - new options need to be added to settings.php
43 |
44 | version 1.4 -> version 1.5
45 | ==========================
46 | - before updating, the database must be updated by running the
47 | 'update-1.5.sql' script in MySQL
48 | - additional changes in settings.php may apply
49 |
--------------------------------------------------------------------------------
/cli/renumber:
--------------------------------------------------------------------------------
1 | #!/usr/bin/php
2 | .
21 | *
22 | */
23 |
24 | $CLI_MODE = true;
25 | $pwd = preg_replace('/[^\/]*$/','',$_SERVER['PATH_TRANSLATED']);
26 | require $pwd.'/../init.php';
27 | require $pwd.'/../lib_intertext.php';
28 |
29 | $verbose = false;
30 | $twolevel = true;
31 | $tname = '';
32 | $vname = '';
33 |
34 | array_shift($argv);
35 | while ($arg = array_shift($argv)) {
36 | switch ($arg) {
37 | case '-1':
38 | $twolevel = false;
39 | break;
40 | default:
41 | if (substr($arg,0,1)=='-') {
42 | print "Error: Unknow option '$arg'.\n"; exit;
43 | } elseif ($tname=='') $tname = $arg;
44 | elseif ($vname=='') $vname = $arg;
45 | else $fail=true;
46 | }
47 | }
48 |
49 | if (($tname=='' || $vname=='') || $fail) {
50 | print "InterText CLI renumbering utility
51 | ==================================
52 | Tool to renumber ID of the given text version in the InterText system.
53 |
54 | Usage:
55 |
56 | renumber [options]
57 |
58 | Options:
59 |
60 | -1
61 | single level numbering only
62 |
63 | ===============================
64 | ";
65 | exit;
66 | }
67 |
68 | $it = new InterText;
69 | if (!($txtid=$it->text_id_by_name($tname))) die("Error: Text '$tname' not found in database.\n");
70 | $vid = $it->txtver_info($txtid,$vname);
71 | $vid = $vid['id'];
72 | if (!$vid) die("Error: Version '$vname' not found in database.\n");
73 |
74 |
75 | $res = $it->update_eids($txtid, $vid, $twolevel);
76 |
77 | if ($res==1 && $twolevel) {
78 | print "Warning: Text renumbered, but only single level alignment was possible.\n";
79 | }
80 |
81 | return 0;
82 |
83 | ?>
84 |
--------------------------------------------------------------------------------
/progress.php:
--------------------------------------------------------------------------------
1 | .
20 | *
21 | */
22 | ?>
23 |