From dca134ba2e9a012493ed6058286bed7d3b879399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Jaworski?= Date: Fri, 28 Oct 2016 11:49:52 +0200 Subject: [PATCH] modified cat --- cat/js/cat.js | 4 ++-- cat/publish.py | 2 +- cat/republish.sh | 7 +++++-- cat/{versions => versions_available}/jrc_enes.cfg | 0 cat/versions_available/jrc_enpl.cfg | 10 ++++++++++ cat/{versions => versions_available}/jrc_plen.cfg | 2 +- cat/{versions => versions_available}/setimes_enhr.cfg | 2 +- cat/{versions => versions_available}/setimes_hren.cfg | 0 cat/versions_enabled/jrc_enpl.cfg | 1 + cat/versions_enabled/jrc_plen.cfg | 1 + cat/versions_enabled/setimes_enhr.cfg | 1 + 11 files changed, 23 insertions(+), 7 deletions(-) rename cat/{versions => versions_available}/jrc_enes.cfg (100%) create mode 100644 cat/versions_available/jrc_enpl.cfg rename cat/{versions => versions_available}/jrc_plen.cfg (99%) rename cat/{versions => versions_available}/setimes_enhr.cfg (98%) rename cat/{versions => versions_available}/setimes_hren.cfg (100%) create mode 120000 cat/versions_enabled/jrc_enpl.cfg create mode 120000 cat/versions_enabled/jrc_plen.cfg create mode 120000 cat/versions_enabled/setimes_enhr.cfg diff --git a/cat/js/cat.js b/cat/js/cat.js index e0c0291..9702b10 100644 --- a/cat/js/cat.js +++ b/cat/js/cat.js @@ -10,7 +10,7 @@ function searchHandle(tmid) { } $.ajax({ - url: '/concordia_gate.php', + url: '/cat/concordia_gate.php', type: 'post', dataType: 'json', success: function (data) { @@ -30,7 +30,7 @@ function phraseSearchHandle(tmid, intervals) { $.ajax({ - url: '/concordia_gate.php', + url: '/cat/concordia_gate.php', type: 'post', dataType: 'json', success: function (data) { diff --git a/cat/publish.py b/cat/publish.py index 6ed25ff..0be494b 100755 --- a/cat/publish.py +++ b/cat/publish.py @@ -38,7 +38,7 @@ with open('concordia_gate.php_pattern', 'r') as gate_pattern_file, open(root_dir gate_file.write(line) -versions_dir = 'versions' +versions_dir = 'versions_enabled' versions = [] diff --git a/cat/republish.sh b/cat/republish.sh index 791fd04..5b9effe 100755 --- a/cat/republish.sh +++ b/cat/republish.sh @@ -1,4 +1,7 @@ #!/bin/sh -sudo rm -rf /var/www/html/* -sudo ./publish.py /var/www/html +ROOT_PATH="/var/www/html/cat" + +sudo rm -rf $ROOT_PATH +sudo mkdir $ROOT_PATH +sudo ./publish.py $ROOT_PATH diff --git a/cat/versions/jrc_enes.cfg b/cat/versions_available/jrc_enes.cfg similarity index 100% rename from cat/versions/jrc_enes.cfg rename to cat/versions_available/jrc_enes.cfg diff --git a/cat/versions_available/jrc_enpl.cfg b/cat/versions_available/jrc_enpl.cfg new file mode 100644 index 0000000..c1ccff0 --- /dev/null +++ b/cat/versions_available/jrc_enpl.cfg @@ -0,0 +1,10 @@ +dir@#@jrc_enpl +concordia_host@#@concordia.vm.wmi.amu.edu.pl +concordia_port@#@8800 +tmid@#@2 +desc@#@Welcome to the interactive Concordia demo. The system finds the longest matches of the pattern sentence in its translation memory. This translation memory is 200 000 sentences taken from English-Polish corpus of European Law. Please enter an English sentence in the field below and press Enter (or use the search button). This instance of Concordia works best with law sentences, but is very likely to output some results for any English sentence. You can also use predefined samples, simply use the link "show/hide samples" and apply one of the sample sentences. After the search, click on the highlighted fragments to see their context. +enjoy@#@Enjoy your work with the system! +prompt@#@Enter search pattern (English sentence): +suggestion@#@Every ship in the European Union must have a crew of 50 or more workers. +suggestion@#@It is impossible to abolish the customs duties on fruit and vegetables. +suggestion@#@The convention on human rights was held in Geneva. diff --git a/cat/versions/jrc_plen.cfg b/cat/versions_available/jrc_plen.cfg similarity index 99% rename from cat/versions/jrc_plen.cfg rename to cat/versions_available/jrc_plen.cfg index de025d9..8ea9a9d 100644 --- a/cat/versions/jrc_plen.cfg +++ b/cat/versions_available/jrc_plen.cfg @@ -1,7 +1,7 @@ dir@#@jrc_plen concordia_host@#@concordia.vm.wmi.amu.edu.pl concordia_port@#@8800 -tmid@#@3 +tmid@#@1 desc@#@Witamy w interaktywnym demo systemu Concordia. System znajduje najdłuższe fragmenty zdania wejściowego w pamięci tłumaczeń. W pamięci tej znajduje się 200 000 zdań z polsko-angielskiego korpusu ustawodawstwa Unii Europejskiej. Proszę wpisać polskie zdanie w poniższe pole i nacisnąć Enter (albo użyć przycisku "search"). Ta wersja Concordii działa najlepiej ze zdaniami prawniczymi, ale jest bardzo prawdopodobne, że uzyska się jakiekolwiek wyniki dla dowolnego polskiego zdania. Aby zapoznać się z systemem możesz użyć wcześniej przygotowanych przykładów - po prostu kliknij link "show/hide samples" a następnie przycisk "apply" przy wybranym przykładzie. Po wyszukaniu, kliknij na wybrany podświetlony fragment, aby zobaczyć jego kontekst. enjoy@#@Życzymy udanej pracy z systemem! prompt@#@Wprowadź zdanie (po polsku): diff --git a/cat/versions/setimes_enhr.cfg b/cat/versions_available/setimes_enhr.cfg similarity index 98% rename from cat/versions/setimes_enhr.cfg rename to cat/versions_available/setimes_enhr.cfg index f543ea3..3cfc94d 100644 --- a/cat/versions/setimes_enhr.cfg +++ b/cat/versions_available/setimes_enhr.cfg @@ -1,7 +1,7 @@ dir@#@setimes_enhr concordia_host@#@concordia.vm.wmi.amu.edu.pl concordia_port@#@8800 -tmid@#@4 +tmid@#@3 desc@#@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 English-Croatian 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. After the search, click on the highlighted fragments to see their context. enjoy@#@Enjoy your work with the system! prompt@#@Enter search pattern (English sentence): diff --git a/cat/versions/setimes_hren.cfg b/cat/versions_available/setimes_hren.cfg similarity index 100% rename from cat/versions/setimes_hren.cfg rename to cat/versions_available/setimes_hren.cfg diff --git a/cat/versions_enabled/jrc_enpl.cfg b/cat/versions_enabled/jrc_enpl.cfg new file mode 120000 index 0000000..f020ebd --- /dev/null +++ b/cat/versions_enabled/jrc_enpl.cfg @@ -0,0 +1 @@ +../versions_available/jrc_enpl.cfg \ No newline at end of file diff --git a/cat/versions_enabled/jrc_plen.cfg b/cat/versions_enabled/jrc_plen.cfg new file mode 120000 index 0000000..66a188d --- /dev/null +++ b/cat/versions_enabled/jrc_plen.cfg @@ -0,0 +1 @@ +../versions_available/jrc_plen.cfg \ No newline at end of file diff --git a/cat/versions_enabled/setimes_enhr.cfg b/cat/versions_enabled/setimes_enhr.cfg new file mode 120000 index 0000000..94774d4 --- /dev/null +++ b/cat/versions_enabled/setimes_enhr.cfg @@ -0,0 +1 @@ +../versions_available/setimes_enhr.cfg \ No newline at end of file