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/09/14 18:22:42 UTC

[14/29] incubator-joshua git commit: Removed unused test fragmentlm

Removed unused test fragmentlm


Project: http://git-wip-us.apache.org/repos/asf/incubator-joshua/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-joshua/commit/cb42ce6b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-joshua/tree/cb42ce6b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-joshua/diff/cb42ce6b

Branch: refs/heads/7
Commit: cb42ce6ba992bdd5522e301174500137f19c396e
Parents: fa247ca
Author: Michael A. Hedderich <mi...@users.noreply.github.com>
Authored: Wed Sep 14 15:32:01 2016 +0200
Committer: Michael A. Hedderich <mi...@users.noreply.github.com>
Committed: Wed Sep 14 15:32:01 2016 +0200

----------------------------------------------------------------------
 .../resources/decoder/fragmentlm/fragments.txt  |   7 --
 src/test/resources/decoder/fragmentlm/glue      |   1 -
 src/test/resources/decoder/fragmentlm/grammar   |   4 -
 src/test/resources/decoder/fragmentlm/input     |   1 -
 .../resources/decoder/fragmentlm/joshua.config  | 109 -------------------
 .../resources/decoder/fragmentlm/mapping.txt    |   4 -
 src/test/resources/decoder/fragmentlm/test.sh   |  30 -----
 7 files changed, 156 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/fragments.txt
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/fragments.txt b/src/test/resources/decoder/fragmentlm/fragments.txt
deleted file mode 100644
index 2f1ce7c..0000000
--- a/src/test/resources/decoder/fragmentlm/fragments.txt
+++ /dev/null
@@ -1,7 +0,0 @@
-(S NP (VP (VBD "said") SBAR) (. "."))
-(S (NP (DT "the") (NN "man")) (VP (VBD "said") (SBAR (IN "that") (S (NP (PRP "he")) (VP (VBD "was") (VB "done"))))) (. "."))
-(S NP VP (. "."))
-(NP (DT "the") (NN "man"))
-(NN "man")
-(VP (VBD "said"))
-(VP (VBD "said") SBAR)

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/glue
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/glue b/src/test/resources/decoder/fragmentlm/glue
deleted file mode 100644
index dae682b..0000000
--- a/src/test/resources/decoder/fragmentlm/glue
+++ /dev/null
@@ -1 +0,0 @@
-[GOAL] ||| <s> [S,1] </s> ||| <s> [S,1] </s> ||| 0

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/grammar
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/grammar b/src/test/resources/decoder/fragmentlm/grammar
deleted file mode 100644
index 0488e69..0000000
--- a/src/test/resources/decoder/fragmentlm/grammar
+++ /dev/null
@@ -1,4 +0,0 @@
-[S] ||| the man [VP,1] [.,2] ||| the man [VP,1] [.,2] ||| 1
-[SBAR] ||| that he was done ||| that he was done ||| 1
-[VP] ||| said [SBAR,1] ||| said [SBAR,1] ||| 1
-[.] ||| . ||| . ||| 1

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/input
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/input b/src/test/resources/decoder/fragmentlm/input
deleted file mode 100644
index 4643dbb..0000000
--- a/src/test/resources/decoder/fragmentlm/input
+++ /dev/null
@@ -1 +0,0 @@
-the man said that he was done .

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/joshua.config
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/joshua.config b/src/test/resources/decoder/fragmentlm/joshua.config
deleted file mode 100644
index 6f88ec8..0000000
--- a/src/test/resources/decoder/fragmentlm/joshua.config
+++ /dev/null
@@ -1,109 +0,0 @@
-# This file is a template for the Joshua pipeline; variables enclosed
-# in <angle-brackets> are substituted by the pipeline script as
-# appropriate.  This file also serves to document Joshua's many
-# parameters.
-
-# These are the grammar file specifications.  Joshua supports an
-# arbitrary number of grammar files, each specified on its own line
-# using the following format:
-#
-#   tm = TYPE OWNER LIMIT FILE
-# 
-# TYPE is "packed", "thrax", or "samt".  The latter denotes the format
-# used in Zollmann and Venugopal's SAMT decoder
-# (http://www.cs.cmu.edu/~zollmann/samt/).
-# 
-# OWNER is the "owner" of the rules in the grammar; this is used to
-# determine which set of phrasal features apply to the grammar's
-# rules.  Having different owners allows different features to be
-# applied to different grammars, and for grammars to share features
-# across files.
-#
-# LIMIT is the maximum input span permitted for the application of
-# grammar rules found in the grammar file.  A value of -1 implies no limit.
-#
-# FILE is the grammar file (or directory when using packed grammars).
-# The file can be compressed with gzip, which is determined by the
-# presence or absence of a ".gz" file extension.
-#
-# By a convention defined by Chiang (2007), the grammars are split
-# into two files: the main translation grammar containing all the
-# learned translation rules, and a glue grammar which supports
-# monotonic concatenation of hierarchical phrases. The glue grammar's
-# main distinction from the regular grammar is that the span limit
-# does not apply to it.  
-
-tm = thrax pt 20 grammar
-tm = thrax glue -1 glue
-
-# This symbol is used over unknown words in the source language
-
-default-non-terminal = OOV
-
-# This is the goal nonterminal, used to determine when a complete
-# parse is found.  It should correspond to the root-level rules in the
-# glue grammar.
-
-goal-symbol = GOAL
-
-# Language model config.
-
-# Multiple language models are supported.  For each language model,
-# create a line in the following format, 
-#
-# lm = TYPE 5 false false 100 FILE
-#
-# where the six fields correspond to the following values:
-# - LM type: one of "kenlm", "berkeleylm", "javalm" (not recommended), or "none"
-# - LM order: the N of the N-gram language model
-# - whether to use left equivalent state (currently not supported)
-# - whether to use right equivalent state (currently not supported)
-# - the ceiling cost of any n-gram (currently ignored)
-# - LM file: the location of the language model file
-# You also need to add a weight for each language model below.
-
-# The suffix _OOV is appended to unknown source-language words if this
-# is set to true.
-
-mark-oovs = false
-
-# The pop-limit for decoding.  This determines how many hypotheses are
-# considered over each span of the input.
-
-pop-limit = 100
-
-# How many hypotheses to output
-
-top-n = 300
-
-# Whether those hypotheses should be distinct strings
-
-use-unique-nbest = true
-
-# This is the default format of the ouput printed to STDOUT.  The variables that can be
-# substituted are:
-#
-# %i: the sentence number (0-indexed)
-# %s: the translated sentence
-# %t: the derivation tree
-# %f: the feature string
-# %c: the model cost
-
-output-format = %i ||| %s ||| %f ||| %c
-
-# When printing the trees (%t in 'output-format'), this controls whether the alignments
-# are also printed.
-
-include-align-index = false
-
-## Feature functions and weights.
-
-# And these are the feature functions to activate.
-feature_function = OOVPenalty
-feature_function = WordPenalty
-
-tm_pt_0 0
-tm_glue_0 0
-
-OOVPenalty 1
-WordPenalty -1

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/mapping.txt
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/mapping.txt b/src/test/resources/decoder/fragmentlm/mapping.txt
deleted file mode 100644
index af6191d..0000000
--- a/src/test/resources/decoder/fragmentlm/mapping.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-(S (NP (DT "the") (NN "man")) VP .) ||| the man [VP,1] [.,2]
-(SBAR (IN "that") (S (NP (PRP "he")) (VP (VBD "was") (VB "done")))) ||| that he was done
-(VP (VBD "said") SBAR) ||| said [SBAR,1]
-(. ".") ||| .

http://git-wip-us.apache.org/repos/asf/incubator-joshua/blob/cb42ce6b/src/test/resources/decoder/fragmentlm/test.sh
----------------------------------------------------------------------
diff --git a/src/test/resources/decoder/fragmentlm/test.sh b/src/test/resources/decoder/fragmentlm/test.sh
deleted file mode 100644
index ce5b3b7..0000000
--- a/src/test/resources/decoder/fragmentlm/test.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-set -u
-
-cat input | $JOSHUA/bin/decoder -config joshua.config -feature_function "FragmentLM -lm fragments.txt -build-depth 1" -fragment-map mapping.txt > output 2> log
-
-# Compare
-diff -u output output.gold > diff
-
-if [ $? -eq 0 ]; then
-	rm -f diff log output output.scores
-	exit 0
-else
-	exit 1
-fi