From bb5cd677c28f5ceaf40e61c8313b07c173871bd1 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Sat, 4 Jun 2016 08:57:36 +0200 Subject: demo --- index.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/index.php b/index.php index 66b4f43..7d0fba8 100644 --- a/index.php +++ b/index.php @@ -22,17 +22,12 @@ -
Select: + + +Assignment -- cgit v1.2.3 From 30d1bd804d1e9891287289388015bfecc5e25a12 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Tue, 7 Jun 2016 17:10:19 +0200 Subject: phrase2_extraction: adjacent nt, MAX_SRC_SZ --- phrase2_extraction/phrase2_extraction.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/phrase2_extraction/phrase2_extraction.rb b/phrase2_extraction/phrase2_extraction.rb index 01bdae9..1f268cd 100755 --- a/phrase2_extraction/phrase2_extraction.rb +++ b/phrase2_extraction/phrase2_extraction.rb @@ -7,7 +7,7 @@ module PhrasePhraseExtraction DEBUG = false MAX_NT = 1 # Chiang: 2 MAX_SEED_NUM_WORDS = 3 # Chiang: 10 words, -> phrases! -MAX_SRC_SZ = 7 # Chiang: 5 words, -> words! +MAX_SRC_SZ = 8 # Chiang: 5 words, -> words! FORBID_SRC_ADJACENT_SRC_NT = true # Chiang:true class Rule @@ -649,6 +649,8 @@ def PhrasePhraseExtraction.remove_adjacent_nt rules prev = false end } + b +=begin c = false prev = false r.target.each { |i| @@ -663,6 +665,7 @@ def PhrasePhraseExtraction.remove_adjacent_nt rules end } b || c +=end } end -- cgit v1.2.3 From 2380944390691789dfaea133cd76f3c921820272 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Tue, 7 Jun 2016 17:10:44 +0200 Subject: util: run_* --- util/run_all | 7 +++++++ util/run_demo | 4 ++++ 2 files changed, 11 insertions(+) create mode 100755 util/run_all create mode 100755 util/run_demo diff --git a/util/run_all b/util/run_all new file mode 100755 index 0000000..2fc511c --- /dev/null +++ b/util/run_all @@ -0,0 +1,7 @@ +#!/bin/zsh -x + +for i in `find ../sessions -maxdepth 1 | cut -d "/" -f 3 | grep -P "^session_"`; do + echo $i + ./util/run_server $i & +done + diff --git a/util/run_demo b/util/run_demo new file mode 100755 index 0000000..2140a1c --- /dev/null +++ b/util/run_demo @@ -0,0 +1,4 @@ +#!/bin/zsh -x + +for i in {0..24}; do for j in pe nomt; do ./util/run_server g0_"$i"_"$j" &; done; done + -- cgit v1.2.3 From 83db5f918da692f13bd0fd886caf5374337e1d00 Mon Sep 17 00:00:00 2001 From: Patrick Simianer
Date: Tue, 7 Jun 2016 17:11:08 +0200 Subject: pool --- js/pool.js | 29 +++++++++++++++++++++++++ pool.php | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ pool_save.php | 25 ++++++++++++++++++++++ static/pool.css | 14 +++++++++++++ static/pool.html | 36 +++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100644 js/pool.js create mode 100644 pool.php create mode 100644 pool_save.php create mode 100644 static/pool.css create mode 100644 static/pool.html diff --git a/js/pool.js b/js/pool.js new file mode 100644 index 0000000..4cb2af8 --- /dev/null +++ b/js/pool.js @@ -0,0 +1,29 @@ +var ids = []; +var clicked = false; +var clicked_sess = ""; + +$().ready(function() +{ + $(".item").click(function () { + var id = $(this).attr("id"); + if (!ids.includes(id) && !clicked) { + $(this).append(""); + ids.push(id); + clicked = true; + clicked_sess = $(this).attr("session"); + } + }); + + $("#button").click(function () { + if (!clicked) return; + if ($("#name").val()=="") return; + $.ajax({url: "pool_save.php?name="+encodeURIComponent($("#name").val())+"&session="+encodeURIComponent(clicked_sess), success: function(result){ + if (result=="ok") { + window.location = "http://postedit.cl.uni-heidelberg.de/interface.php?key="+clicked_sess+"&ui_type=t"; // FIXME + } else { + alert("Session taken, choose another session."); + } + }}); + }); +}); + diff --git a/pool.php b/pool.php new file mode 100644 index 0000000..6ea0e2a --- /dev/null +++ b/pool.php @@ -0,0 +1,64 @@ + + +
+ + +Click on a table cell, enter your name, and click 'Begin' to begin your session. Reload the page if you clicked on the wrong cell.
+#0 |
#".$i." ".$b[$i]." | \n";
+ if ($i%5 == 0) {
+ echo "
#0 |
#1 | #2 | #3 | #4 | #5 |
#6 | #7 | #8 | #9 | #10 |
#11 | #12 | #13 | #14 | #15 |
#16 | #17 | #18 | #19 | #20 |
#21 | #22 | #23 | #24 | #25 |
Date: Tue, 7 Jun 2016 17:14:46 +0200 Subject: pool.php: fix --- pool.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pool.php b/pool.php index 6ea0e2a..ad8de29 100644 --- a/pool.php +++ b/pool.php @@ -31,14 +31,12 @@ $max) { $max = $j; } -- cgit v1.2.3