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:
authorHieu Hoang <hieuhoang@gmail.com>2015-01-14 14:07:42 +0300
committerHieu Hoang <hieuhoang@gmail.com>2015-01-14 14:07:42 +0300
commit05ead45e71916c5763c5c4b6375e2ca6838f3995 (patch)
treec279bd4aacfb31758720ffbaf5aaf62022574a52 /moses/TabbedSentence.cpp
parent91cb549ccf09fc33122f3d531f47c38ad0e99b3d (diff)
beautify
Diffstat (limited to 'moses/TabbedSentence.cpp')
-rw-r--r--moses/TabbedSentence.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/moses/TabbedSentence.cpp b/moses/TabbedSentence.cpp
index 471a8cc7d..ae0876595 100644
--- a/moses/TabbedSentence.cpp
+++ b/moses/TabbedSentence.cpp
@@ -29,44 +29,44 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
namespace Moses
{
- void TabbedSentence::CreateFromString(const std::vector<FactorType> &factorOrder
- , const std::string &tabbedString) {
- TabbedColumns allColumns;
-
- boost::split(allColumns, tabbedString, boost::is_any_of("\t"));
-
- if(allColumns.size() < 2) {
- Sentence::CreateFromString(factorOrder, tabbedString);
- }
- else {
- m_columns.resize(allColumns.size() - 1);
- std::copy(allColumns.begin() + 1, allColumns.end(), m_columns.begin());
- Sentence::CreateFromString(factorOrder, allColumns[0]);
- }
+void TabbedSentence::CreateFromString(const std::vector<FactorType> &factorOrder
+ , const std::string &tabbedString)
+{
+ TabbedColumns allColumns;
+
+ boost::split(allColumns, tabbedString, boost::is_any_of("\t"));
+
+ if(allColumns.size() < 2) {
+ Sentence::CreateFromString(factorOrder, tabbedString);
+ } else {
+ m_columns.resize(allColumns.size() - 1);
+ std::copy(allColumns.begin() + 1, allColumns.end(), m_columns.begin());
+ Sentence::CreateFromString(factorOrder, allColumns[0]);
}
-
- int TabbedSentence::Read(std::istream& in, const std::vector<FactorType>& factorOrder) {
- TabbedColumns allColumns;
-
- std::string line;
- if (getline(in, line, '\n').eof())
- return 0;
-
- 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);
- }
- 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);
- }
+}
+
+int TabbedSentence::Read(std::istream& in, const std::vector<FactorType>& factorOrder)
+{
+ TabbedColumns allColumns;
+
+ std::string line;
+ if (getline(in, line, '\n').eof())
+ return 0;
+
+ 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);
+ } 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);
}
+}
}