diff --git a/.gitignore b/.gitignore
index f46bc60..bd6ebab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,3 +14,4 @@ db/pgbouncer.pid
db/pgbouncer.ini
upstart/concordia-server.conf
upstart/pgbouncer.conf
+cat/host.cfg
diff --git a/cat/README b/cat/README
new file mode 100644
index 0000000..93bae65
--- /dev/null
+++ b/cat/README
@@ -0,0 +1,5 @@
+1. Prepare host.cfg file with the address and port number of Concordia. See host.cfg_example. WARNING there should not be any empty lines in the .cfg files.
+2. Prepare version file for each tm in Concordia in teh "versions: directory.
+3. Clean a directory on your webserver (that supports PHP).
+4. sudo ./publish.py PATH_ON_SERVER.
+
diff --git a/cat/concordia_gate.php b/cat/concordia_gate.php_pattern
similarity index 60%
rename from cat/concordia_gate.php
rename to cat/concordia_gate.php_pattern
index b950507..df52e6b 100644
--- a/cat/concordia_gate.php
+++ b/cat/concordia_gate.php_pattern
@@ -1,7 +1,11 @@
$_POST["operation"],"tmId" => intval($_POST["tmId"]),"pattern" => $_POST["pattern"]);
+$url = 'http://@concordia_host@:@concordia_port@';
+$intervalsArray = array();
+foreach ($_POST["intervals"] as $interval) {
+ array_push($intervalsArray, [intval($interval[0]), intval($interval[1])]);
+}
+$data = array("operation" => $_POST["operation"],"tmId" => intval($_POST["tmId"]),"pattern" => $_POST["pattern"],"intervals" => $intervalsArray);
// use key 'http' even if you send the request to https://...
$options = array(
diff --git a/cat/css/iatagger.css b/cat/css/iatagger.css
index 7043eae..a468bd3 100644
--- a/cat/css/iatagger.css
+++ b/cat/css/iatagger.css
@@ -133,6 +133,12 @@
cursor:text;
}
+#result-sentence.phrase-mode .matchedFragmentSelected {
+ background-color:#e5e5ff;
+ border-color:#e5e5ff;
+ cursor:text;
+}
+
.matchedFragment {
background-color:#99CCFF;
border-style: solid;
diff --git a/cat/host.cfg_example b/cat/host.cfg_example
new file mode 100644
index 0000000..a9cf9de
--- /dev/null
+++ b/cat/host.cfg_example
@@ -0,0 +1,3 @@
+concordia_host@#@concordia.vm.wmi.amu.edu.pl
+concordia_port@#@8800
+
diff --git a/cat/index.html_pattern b/cat/index.html_pattern
index b14387b..3f11fc8 100644
--- a/cat/index.html_pattern
+++ b/cat/index.html_pattern
@@ -8,10 +8,11 @@
-
-
-
-
-
-
-
-
-
-
-
- Welcome to Concordia. The system finds the longest matches of the pattern sentence in its translation memory. This translation memory is 200 000 sentences taken from the SETIMES2 Croatian-English corpus (link). Please enter a Croatian sentence in the field below and press Enter (or use the search button). You can test the system on predefined samples, simply use the link "show/hide samples" and apply one of the sample sentences.
-
-
- Enjoy your work with the system!
-
-
- show/hide samples
-
-
-
-
Kazna medijskom mogulu obnovila raspravu u Makedoniji apply
-
Član Predsjedništva BiH Komšić podnio ostavku u svojoj stranci apply