You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@joshua.apache.org by mj...@apache.org on 2016/08/17 10:46:17 UTC
[02/12] incubator-joshua git commit: quick add rules for OOVs,
format fiddling
quick add rules for OOVs, format fiddling
Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/1038a144
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/1038a144
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/1038a144
Branch: refs/heads/master
Commit: 1038a144468b48408f3eca1122efb3c8f84e4537
Parents: c465e71
Author: Matt Post <po...@cs.jhu.edu>
Authored: Tue Aug 2 09:41:39 2016 -0400
Committer: Matt Post <po...@cs.jhu.edu>
Committed: Tue Aug 2 09:41:39 2016 -0400
----------------------------------------------------------------------
demo/README.md | 2 +-
demo/demo.config | 3 +++
demo/demo.js | 6 ++++++
demo/index.html | 7 +++----
4 files changed, 13 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1038a144/demo/README.md
----------------------------------------------------------------------
diff --git a/demo/README.md b/demo/README.md
index 96a7876..d086532 100644
--- a/demo/README.md
+++ b/demo/README.md
@@ -9,7 +9,7 @@ There are two steps:
-feature-function OOVPenalty \
-feature-function "PhrasePenalty -owner custom" \
-weight-overwrite "OOVPenalty 1 PhrasePenalty -1" \
- -mark-oovs
+ -mark-oovs -lowercase -projectcase -output-format %S
Alternately, you can use the config file in this directory, which
contains all the above parameteres, and simply run it like this:
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1038a144/demo/demo.config
----------------------------------------------------------------------
diff --git a/demo/demo.config b/demo/demo.config
index f10ec32..4c29c9a 100644
--- a/demo/demo.config
+++ b/demo/demo.config
@@ -1,6 +1,9 @@
server-type = http
server-port = 5674
mark-oovs = true
+lowercase = true
+project-case = true
+output-format = %S
feature-function = OOVPenalty
feature-function = PhrasePenalty -owner custom
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1038a144/demo/demo.js
----------------------------------------------------------------------
diff --git a/demo/demo.js b/demo/demo.js
index aea4a01..a6a5711 100644
--- a/demo/demo.js
+++ b/demo/demo.js
@@ -218,6 +218,12 @@ function record_results(data, status) {
result += "</ul>";
$("#output").html(result);
+
+ $(".oov").click(function(e) {
+ var oov = e.target.innerHTML;
+ $("#addPhrase_source").val(oov);
+ $("#addPhrase_target").select();
+ });
};
/**
http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/1038a144/demo/index.html
----------------------------------------------------------------------
diff --git a/demo/index.html b/demo/index.html
index 9c014cd..aa2acd9 100644
--- a/demo/index.html
+++ b/demo/index.html
@@ -9,7 +9,7 @@
<meta name="author" content="">
<link rel="icon" href="favicon.ico">
- <title>Apache Joshua Machine Translation Toolkit</title>
+ <title>Apache Joshua Machine Translation Demonstration</title>
<!-- Bootstrap core CSS -->
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
@@ -22,15 +22,14 @@
background-position: -300px -300px;
}
- oov {
+ .oov {
color: red;
font-weight: bold;
- text-decoration: -300px -300px;
+ text-decoration: underline;
}
.navbar-brand {
font-weight: bold;
- color: black
}
</style>
</head>