mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-11-10 10:59:21 +03:00
sigtest-filter can now also filter lexical reordering tables.
didn't have a significant effect on performance in my tests, but it's nice to have smaller tables.
This commit is contained in:
parent
bed4bc08ad
commit
c9f2f73de3
@ -99,10 +99,15 @@ PTEntry::PTEntry(const std::string& str, int index) :
|
|||||||
|
|
||||||
pos = nextPos + SEPARATOR.size();
|
pos = nextPos + SEPARATOR.size();
|
||||||
nextPos = str.find(SEPARATOR, pos);
|
nextPos = str.find(SEPARATOR, pos);
|
||||||
this->scores = str.substr(pos,nextPos-pos);
|
if (nextPos < str.size()) {
|
||||||
|
this->scores = str.substr(pos,nextPos-pos);
|
||||||
|
|
||||||
pos = nextPos + SEPARATOR.size();
|
pos = nextPos + SEPARATOR.size();
|
||||||
this->extra = str.substr(pos);
|
this->extra = str.substr(pos);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this->scores = str.substr(pos,str.size()-pos);
|
||||||
|
}
|
||||||
|
|
||||||
int c = 0;
|
int c = 0;
|
||||||
std::string::iterator i=scores.begin();
|
std::string::iterator i=scores.begin();
|
||||||
|
Loading…
Reference in New Issue
Block a user