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:
authorMatthias Huck <huck@i6.informatik.rwth-aachen.de>2014-07-28 22:49:43 +0400
committerMatthias Huck <huck@i6.informatik.rwth-aachen.de>2014-07-28 22:49:43 +0400
commit7b02017da1e2a09486627b543446ec78e51541a7 (patch)
tree89feda8685bd74ca1dcdfb30dccb1e57643b0259 /phrase-extract
parent56a3655ba9f72b407c9088b6d1c9ee6a3a0605b4 (diff)
use std::numeric_limits
Diffstat (limited to 'phrase-extract')
-rw-r--r--phrase-extract/extract-ghkm/PhraseOrientation.cpp5
-rw-r--r--phrase-extract/extract-main.cpp3
-rw-r--r--phrase-extract/extract-ordering-main.cpp3
-rw-r--r--phrase-extract/extract-rules-main.cpp3
4 files changed, 9 insertions, 5 deletions
diff --git a/phrase-extract/extract-ghkm/PhraseOrientation.cpp b/phrase-extract/extract-ghkm/PhraseOrientation.cpp
index a96e5361c..f6abc9db8 100644
--- a/phrase-extract/extract-ghkm/PhraseOrientation.cpp
+++ b/phrase-extract/extract-ghkm/PhraseOrientation.cpp
@@ -20,6 +20,7 @@
#include "PhraseOrientation.h"
#include <iostream>
+#include <limits>
#include <boost/assign/list_of.hpp>
@@ -63,7 +64,7 @@ PhraseOrientation::PhraseOrientation(const std::vector<std::string> &source,
for (int startF=0; startF<countF; ++startF) {
for (int endF=startF; endF<countF; ++endF) {
- int minE = 9999;
+ int minE = std::numeric_limits<int>::max();
int maxE = -1;
for (int fi=startF; fi<=endF; ++fi) {
for (size_t i=0; i<alignedToS[fi].size(); ++i) {
@@ -86,7 +87,7 @@ PhraseOrientation::PhraseOrientation(const std::vector<std::string> &source,
for (int startE=0; startE<countE; ++startE) {
for (int endE=startE; endE<countE; ++endE) {
- int minF = 9999;
+ int minF = std::numeric_limits<int>::max();
int maxF = -1;
std::vector< int > usedF = alignedCountS;
for (int ei=startE; ei<=endE; ++ei) {
diff --git a/phrase-extract/extract-main.cpp b/phrase-extract/extract-main.cpp
index 552dcb739..2f22d8aba 100644
--- a/phrase-extract/extract-main.cpp
+++ b/phrase-extract/extract-main.cpp
@@ -18,6 +18,7 @@
#include <map>
#include <set>
#include <vector>
+#include <limits>
#include "SentenceAlignment.h"
#include "tables-core.h"
@@ -373,7 +374,7 @@ void ExtractTask::extract(SentenceAlignment &sentence)
(endE<countE && (relaxLimit || endE<startE+m_options.maxPhraseLength));
endE++) {
- int minF = 9999;
+ int minF = std::numeric_limits<int>::max();
int maxF = -1;
vector< int > usedF = sentence.alignedCountS;
for(int ei=startE; ei<=endE; ei++) {
diff --git a/phrase-extract/extract-ordering-main.cpp b/phrase-extract/extract-ordering-main.cpp
index b418ba24d..753879877 100644
--- a/phrase-extract/extract-ordering-main.cpp
+++ b/phrase-extract/extract-ordering-main.cpp
@@ -18,6 +18,7 @@
#include <map>
#include <set>
#include <vector>
+#include <limits>
#include "SentenceAlignment.h"
#include "tables-core.h"
@@ -321,7 +322,7 @@ void ExtractTask::extract(SentenceAlignment &sentence)
(endE<countE && (relaxLimit || endE<startE+m_options.maxPhraseLength));
endE++) {
- int minF = 9999;
+ int minF = std::numeric_limits<int>::max();
int maxF = -1;
vector< int > usedF = sentence.alignedCountS;
for(int ei=startE; ei<=endE; ei++) {
diff --git a/phrase-extract/extract-rules-main.cpp b/phrase-extract/extract-rules-main.cpp
index 592946b0d..676c145e2 100644
--- a/phrase-extract/extract-rules-main.cpp
+++ b/phrase-extract/extract-rules-main.cpp
@@ -29,6 +29,7 @@
#include <sstream>
#include <string>
#include <vector>
+#include <limits>
#ifdef WIN32
// Include Visual Leak Detector
@@ -407,7 +408,7 @@ void ExtractTask::extractRules()
// find find aligned source words
// first: find minimum and maximum source word
- int minS = 9999;
+ int minS = std::numeric_limits<int>::max();
int maxS = -1;
vector< int > usedS = m_sentence.alignedCountS;
for(int ti=startT; ti<=endT; ti++) {