Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/moses
diff options
context:
space:
mode:
authorredpony <redpony@1f5c12ca-751b-0410-a591-d2e778427230>2006-09-29 23:39:08 +0400
committerredpony <redpony@1f5c12ca-751b-0410-a591-d2e778427230>2006-09-29 23:39:08 +0400
commit47e192f02c4a593869c9af7da5a3c23259948ff5 (patch)
treeb1bafa2d33a4dab428a9364f6fe928c2521e5d18 /moses
parenta71f247596bc35e09235603f6c69b4f3e6dea3e6 (diff)
remove unused DistortionOrientation files
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@836 1f5c12ca-751b-0410-a591-d2e778427230
Diffstat (limited to 'moses')
-rwxr-xr-xmoses/src/DistortionOrientation.cpp52
-rwxr-xr-xmoses/src/DistortionOrientation.h44
-rw-r--r--moses/src/Makefile.am1
3 files changed, 0 insertions, 97 deletions
diff --git a/moses/src/DistortionOrientation.cpp b/moses/src/DistortionOrientation.cpp
deleted file mode 100755
index ab98fd87b..000000000
--- a/moses/src/DistortionOrientation.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-// $Id$
-
-#include <iostream>
-#include <limits>
-#include <cassert>
-#include "DistortionOrientation.h"
-#include "TypeDef.h"
-#include "Hypothesis.h"
-using namespace std;
-/*
- * Load the file pointed to by filename; set up the table according to
- * the orientation and condition parameters. Direction will be used
- * later for computing the score.
- *
- * default type is Msd, meaning will distinguish between monotone, swap, discontinuous rather than
- * just monotone/non-monotone.
- */
-int DistortionOrientation::GetOrientation(const Hypothesis *curr_hypothesis, int direction, int type)
-{
- const Hypothesis *prevHypo = curr_hypothesis->GetPrevHypo();
- if(prevHypo==NULL){
- //if there's no previous source we judge the first hypothesis as monotone.
- return DistortionOrientationType::MONO;
- }
- const WordsRange &currTargetRange = curr_hypothesis->GetCurrTargetWordsRange()
- , &currSourceRange = curr_hypothesis->GetCurrSourceWordsRange();
- size_t curr_source_start = currSourceRange.GetStartPos();
- size_t curr_source_end = currSourceRange.GetEndPos();
- const WordsRange &prevSourceRange = prevHypo->GetCurrSourceWordsRange();
- size_t prev_source_start = prevSourceRange.GetStartPos();
- size_t prev_source_end = prevSourceRange.GetEndPos();
- if(prev_source_end==curr_source_start-1)
- {
- return DistortionOrientationType::MONO;
- }
- else if(type==DistortionOrientationType::Msd) //distinguish between monotone, swap, discontinuous
- {
- if(prev_source_start==curr_source_end+1)
- {
- return DistortionOrientationType::SWAP;
- }
- else
- {
- return DistortionOrientationType::DISC;
- }
- }
- else //only distinguish between Monotone, non monotone
- {
- return DistortionOrientationType::NON_MONO;
- }
-}
-
diff --git a/moses/src/DistortionOrientation.h b/moses/src/DistortionOrientation.h
deleted file mode 100755
index d539a426a..000000000
--- a/moses/src/DistortionOrientation.h
+++ /dev/null
@@ -1,44 +0,0 @@
-// $Id$
-
-/***********************************************************************
-Moses - factored phrase-based language decoder
-Copyright (C) 2006 University of Edinburgh
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-***********************************************************************/
-
-/*
-* The DistortionOrientation class contains a static method which returns
-* what DistortionOrientation type (one of {MONO, NON_MONO, SWAP, DISC }
-* as enumerated under ORIENTATIONS in TypeDef.h) the current phrase
-* is with respect to the previous.
-*/
-
-#pragma once
-
-#include <string>
-#include <vector>
-#include <map>
-#include "TypeDef.h"
-#include "WordsRange.h"
-#include "Hypothesis.h"
-
-
-class DistortionOrientation
-{
- public:
- static int GetOrientation(const Hypothesis *curr_hypothesis, int direction, int type=DistortionOrientationType::Msd);
-};
-
diff --git a/moses/src/Makefile.am b/moses/src/Makefile.am
index 013dbdc34..96550a44e 100644
--- a/moses/src/Makefile.am
+++ b/moses/src/Makefile.am
@@ -6,7 +6,6 @@ libmoses_a_SOURCES_TMP = \
DecodeStepGeneration.cpp \
DecodeStepTranslation.cpp \
Dictionary.cpp \
- DistortionOrientation.cpp \
DummyScoreProducers.cpp \
Factor.cpp \
FactorCollection.cpp \