diff options
author | Hieu Hoang <hieuhoang@gmail.com> | 2014-02-05 16:18:52 +0400 |
---|---|---|
committer | Hieu Hoang <hieuhoang@gmail.com> | 2014-02-05 16:18:52 +0400 |
commit | 76e07fc774d5b942fde1a6e9509a94f20cfcc153 (patch) | |
tree | ec218e1ed1c6332737b20f0b932ea0842a2c6d97 /contrib/other-builds/manual-label | |
parent | ec1186ab9e8b0e7d0988e73efb2f21dfbafb0884 (diff) |
english phrasal verb detector
Diffstat (limited to 'contrib/other-builds/manual-label')
-rw-r--r-- | contrib/other-builds/manual-label/EnPhrasalVerb.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/other-builds/manual-label/EnPhrasalVerb.cpp b/contrib/other-builds/manual-label/EnPhrasalVerb.cpp index dc72aa33c..6454628df 100644 --- a/contrib/other-builds/manual-label/EnPhrasalVerb.cpp +++ b/contrib/other-builds/manual-label/EnPhrasalVerb.cpp @@ -160,11 +160,13 @@ void EnPhrasalVerb(const Phrase &source, ostream &out) size_t Found(const Phrase &source, int pos, int factor, const std::string &str) { + const size_t MAX_RANGE = 10; + vector<string> soughts = Moses::Tokenize(str, " "); vector<string> puncts = Moses::Tokenize(str, ". : , ;"); - size_t maxEnd = std::min(source.size(), (size_t) pos + 10); + size_t maxEnd = std::min(source.size(), (size_t) pos + MAX_RANGE); for (size_t i = pos + 1; i < maxEnd; ++i) { const Word &word = source[i]; bool found; |