summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Simianer <p@simianer.de>2016-05-03 14:22:07 +0200
committerPatrick Simianer <p@simianer.de>2016-05-03 14:22:07 +0200
commit54bc620c309d471989824d5de50915728b2f3afc (patch)
tree46f9faffd08fca5ed669c54a2ba139d104cdbf9b
parent96d954177a95fe69ebebf8ebdbab63434bf4c600 (diff)
mv
-rw-r--r--.htaccess2
-rw-r--r--README.md25
-rw-r--r--external/lfpe-apache8
-rw-r--r--inc/db.inc.php2
-rw-r--r--js/interface.js5
-rw-r--r--static/pattr-abstracts.html10
-rwxr-xr-xutil/run_server22
7 files changed, 46 insertions, 28 deletions
diff --git a/.htaccess b/.htaccess
index a2cb1b7..cf61c47 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,5 +1,5 @@
AuthName "Post-Editing Interface"
AuthType Basic
-AuthUserFile /fast_scratch/simianer/lfpe/.htpasswd
+AuthUserFile /srv/postedit/.htpasswd
require valid-user
diff --git a/README.md b/README.md
index 403d745..a3d4e96 100644
--- a/README.md
+++ b/README.md
@@ -2,20 +2,35 @@
Post-editing interface for learning from post-edited machine translations.
# Setup
+
+`
+ export BASE_DIR=/srv/postedit
+`
+
## nanomsg lib
- export LD_LIBRARY_PATH=/fast_scratch/simianer/lfpe/lib/nanomsg-0.5-beta/lib
+`
+ export LD_LIBRARY_PATH=$BASE_DIR/lib/nanomsg-0.5-beta/lib
+`
## ruby
- [see $(pwd)/lib/ruby/gems/nanomsg-0.4.0/ext/extconf.rb]
- gem install nanomsg -i $(pwd)/lib/ruby
- export GEM_PATH=/fast_scratch/simianer/lfpe/lib/ruby/:$GEM_PATH
+`
+ [see $BASE_DIR/lib/ruby/gems/nanomsg-0.4.0/ext/extconf.rb]
+ gem install nanomsg -i $BSAE_DIR/lib/ruby
+ export GEM_PATH=$BASE_DIR/lib/ruby/:$GEM_PATH
+`
## iptables
+`
iptables -A INPUT -i eth0 -p tcp -m multiport --dports 50000:50100 -j ACCEPT
+`
## apache
+`
ln -s /etc/apache2/sites-available/lfpe /etc/apache2/sites-enabled/020-lfpe
+`
## python
- export PYTHONPATH=/fast_scratch/simianer/lfpe/lib/python:$PYTHONPATH
+`
+ export PYTHONPATH=$BASE_DIR/lib/python:$PYTHONPATH
+`
diff --git a/external/lfpe-apache b/external/lfpe-apache
index e4de4be..eec5e5c 100644
--- a/external/lfpe-apache
+++ b/external/lfpe-apache
@@ -3,13 +3,13 @@
ServerAdmin simianer@cl.uni-heidelberg.de
- DocumentRoot /fast_scratch/simianer/lfpe/lfpe
+ DocumentRoot /srv/postedit/lfpe
- ErrorLog /fast_scratch/simianer/lfpe/lfpe/logs/apache2.error.log
+ ErrorLog /srv/postedit/lfpe/logs/apache2.error.log
LogLevel warn
- CustomLog /fast_scratch/simianer/lfpe/lfpe/logs/apache2.access.log combined
+ CustomLog /srv/postedit/lfpe/logs/apache2.access.log combined
- <Directory /fast_scratch/simianer/lfpe/lfpe>
+ <Directory /srv/postedit/lfpe>
Options +FollowSymLinks
AllowOverride All
order allow,deny
diff --git a/inc/db.inc.php b/inc/db.inc.php
index f08eda5..ed45f7b 100644
--- a/inc/db.inc.php
+++ b/inc/db.inc.php
@@ -1,6 +1,6 @@
<?php
-$SESSION_DIR="/fast_scratch/simianer/lfpe/sessions";
+$SESSION_DIR="/srv/postedit/sessions";
$json = file_get_contents($SESSION_DIR."/".$_GET["key"]."/data.json");
$db = json_decode($json);
diff --git a/js/interface.js b/js/interface.js
index c946e0c..d346b96 100644
--- a/js/interface.js
+++ b/js/interface.js
@@ -230,7 +230,7 @@ var next = function ()
working();
// get metadata stored in DOM
- var base_url = "http://coltrane.cl.uni-heidelberg.de";
+ var base_url = "http://lemmy.cl.uni-heidelberg.de";
var port = document.getElementById("port").value;
var key = document.getElementById("key").value;
@@ -334,7 +334,7 @@ var request_and_process_next = function ()
var last_post_edit = document.getElementById("last_post_edit");
// get metadata stored in DOM
- var base_url = "http://coltrane.cl.uni-heidelberg.de";
+ var base_url = "http://lemmy.cl.uni-heidelberg.de";
var port = document.getElementById("port").value;
var key = document.getElementById("key").value;
@@ -525,6 +525,7 @@ $().ready(function()
init_text_editor();
document.getElementById("textboxes").style.display = "block";
}
+
});
diff --git a/static/pattr-abstracts.html b/static/pattr-abstracts.html
index c24598c..09f5779 100644
--- a/static/pattr-abstracts.html
+++ b/static/pattr-abstracts.html
@@ -20,7 +20,7 @@ div.ex:hover {
<h2>Abstracts</h2>
-<h3><a href="http://coltrane.cl.uni-heidelberg.de:60666/load/0">EP-0005734-A1</a> (H01H)</h3>
+<h3><a href="http://lemmy.cl.uni-heidelberg.de:60666/load/0">EP-0005734-A1</a> (H01H)</h3>
<div class="ex">
<strong>Ein elektromagnetisch betätigtes Schaltgerät, z. B. ein elektrisches Schütz, hat einen magnetischen Eisenkern, der aus zwei gleichen E-förmigen Magnetteilen besteht, nämlich dem die Wicklung tragenden Magnetkern (8) und dem Anker (7).</strong><br/><hr/>
<strong>An electromagnetically operated switchgear, e.g. an electrical contactor, has a magnetic iron core which consists of two identical E- shaped magnet parts, specifically the magnet core (8), carrying the winding, and the armature (7).</strong>
@@ -38,7 +38,7 @@ div.ex:hover {
<hr />
-<h3><a href="http://coltrane.cl.uni-heidelberg.de:60666/load/1">EP-0003301-A1</a> (A01N,C07C)</h3>
+<h3><a href="http://lemmy.cl.uni-heidelberg.de:60666/load/1">EP-0003301-A1</a> (A01N,C07C)</h3>
<div class="ex">
<strong>Sie weisen starke insektizide, akarizide und nematizide Eigenschaften auf.</strong><br/><hr/>
<strong>They have strong insecticidal, acaricidal and nematicidal properties.</strong>
@@ -50,7 +50,7 @@ div.ex:hover {
<hr/>
-<h3><a href="http://coltrane.cl.uni-heidelberg.de:60666/load/2">EP-0003578-A2</a> (F25B)</h3>
+<h3><a href="http://lemmy.cl.uni-heidelberg.de:60666/load/2">EP-0003578-A2</a> (F25B)</h3>
<div class="ex">
<strong>Die Erfindung bezieht sich auf den Kältemittelkreislauf (1) einer Wärmepumpe.</strong><br/><hr/>
<strong>The invention relates to the refrigerant circuit (1) of a heat pump.</strong>
@@ -78,7 +78,7 @@ div.ex:hover {
<hr/>
-<h3><a href="http://coltrane.cl.uni-heidelberg.de:60666/load/3">EP-0002017-A1</a> (C25B)</h3>
+<h3><a href="http://lemmy.cl.uni-heidelberg.de:60666/load/3">EP-0002017-A1</a> (C25B)</h3>
<div class="ex">
<strong>Anoden für Elektrolysezwecke bestehen aus einem elektrisch leitenden Trägerkörper und einer darauf aufgebrachten Schicht aus metallischem Silicium und/oder Germanium.</strong><br/><hr/>
<strong>Anodes for electrochemical purposes are composed of an electrically conducting support body and a layer of metallic silicon and/or germanium applied thereto.</strong>
@@ -94,7 +94,7 @@ div.ex:hover {
<hr/>
- <h3><a href="http://coltrane.cl.uni-heidelberg.de:60666/load/4">EP-0018427-A1</a> (G05B)</h3>
+ <h3><a href="http://lemmy.cl.uni-heidelberg.de:60666/load/4">EP-0018427-A1</a> (G05B)</h3>
<div class="ex">
<strong>Elektrische Steuerschaltung mit einem Signalgenerator­ teil (20), der in Abhängigkeit von einem Führungssignal auf­ einanderfolgende gleichmäßige Impulse erzeugt.</strong><br/><hr/>
<strong>Electrical control circuit comprising a signal generator section (20) which generates successive uniform pulses in dependence on a control signal.</strong>
diff --git a/util/run_server b/util/run_server
index 7d45583..a4b7a6c 100755
--- a/util/run_server
+++ b/util/run_server
@@ -1,15 +1,17 @@
#!/bin/bash -x
-export LD_LIBRARY_PATH=/fast_scratch/simianer/lfpe/lib/nanomsg-0.5-beta/lib:$LD_LIBRARY_PATH
-export PYTHONPATH=/fast_scratch/simianer/lfpe/lib/python:$PYTHONPATH
-export GEM_PATH=/fast_scratch/simianer/lfpe/lib/ruby/:$GEM_PATH
-UTIL=/fast_scratch/simianer/lfpe/lfpe/util
+BASE_DIR=/srv/postedit
+export LD_LIBRARY_PATH=$BASE_DIR/lib/nanomsg-0.5-beta/lib:$LD_LIBRARY_PATH
+export PYTHONPATH=$BASE_DIR/lib/python:$PYTHONPATH
+export GEM_PATH=$BASE_DIR/lib/ruby/:$GEM_PATH
+UTIL=$BASE_DIR/lfpe/util
SESSION=$1
-DIR=/fast_scratch/simianer/lfpe/sessions/$SESSION
+SESSION_DIR=$BASE_DIR/sessions/$SESSION
-rm $DIR/work/lockfile
-rm -r $DIR/work/
-mkdir -p $DIR/work
-cp $DIR/data.json.original $DIR/data.json
-$UTIL/../server.rb $DIR/conf.rb &>$DIR/work/session.out
+rm $SESSION_DIR/work/lockfile
+rm -r $SESSION_DIR/work/
+mkdir -p $SESSION_DIR/work
+cp $SESSION_DIR/data.json.original $SESSION_DIR/data.json
+cp $SESSION_DIR/g/original/* $SESSION_DIR/g/
+$UTIL/../server.rb $SESSION_DIR/conf.rb &>$SESSION_DIR/work/session.out