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
diff options
context:
space:
mode:
authorUlrich Germann <Ulrich.Germann@gmail.com>2015-12-10 06:17:36 +0300
committerUlrich Germann <Ulrich.Germann@gmail.com>2015-12-11 04:09:22 +0300
commit29694af6e43c1cec7a6fd0b157eb44faca706129 (patch)
treeacda250a83c5a3a4244be011f1f4b9e6337f5d6b /moses/TabbedSentence.cpp
parent240b88c6834c9c94e8a6448a34dc4ad33bdf3fbd (diff)
Code cleanup and refactoring.
Diffstat (limited to 'moses/TabbedSentence.cpp')
-rw-r--r--moses/TabbedSentence.cpp15
1 files changed, 5 insertions, 10 deletions
diff --git a/moses/TabbedSentence.cpp b/moses/TabbedSentence.cpp
index a94674cef..6339ad596 100644
--- a/moses/TabbedSentence.cpp
+++ b/moses/TabbedSentence.cpp
@@ -47,9 +47,7 @@ void TabbedSentence::CreateFromString(const std::vector<FactorType> &factorOrder
int
TabbedSentence::
-Read(std::istream& in,
- std::vector<FactorType> const& factorOrder,
- AllOptions const& opts)
+Read(std::istream& in)
{
TabbedColumns allColumns;
@@ -60,17 +58,14 @@ Read(std::istream& in,
boost::split(allColumns, line, boost::is_any_of("\t"));
if(allColumns.size() < 2) {
- std::stringstream dummyStream;
- dummyStream << line << std::endl;
- return Sentence::Read(dummyStream, factorOrder, opts);
+ Sentence::init(line);
} else {
m_columns.resize(allColumns.size() - 1);
std::copy(allColumns.begin() + 1, allColumns.end(), m_columns.begin());
-
- std::stringstream dummyStream;
- dummyStream << allColumns[0] << std::endl;
- return Sentence::Read(dummyStream, factorOrder, opts);
+ Sentence::init(allColumns[0]);
}
+ return 1;
+
}
}