diff options
author | Hieu Hoang <hieu@hoang.co.uk> | 2013-07-26 18:46:15 +0400 |
---|---|---|
committer | Hieu Hoang <hieu@hoang.co.uk> | 2013-07-26 18:46:15 +0400 |
commit | 9e8402deddd7b0da030b36d4f05c8156f8e64e16 (patch) | |
tree | 715f98bbde2dbf90cb984bbf6caf5cb2ded47b3a /phrase-extract/extract-main.cpp | |
parent | e3917f911b324ec9f7087075c0f396be55f95260 (diff) |
add placeholder support to extract
Diffstat (limited to 'phrase-extract/extract-main.cpp')
-rw-r--r-- | phrase-extract/extract-main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phrase-extract/extract-main.cpp b/phrase-extract/extract-main.cpp index b0770317a..53e4b804d 100644 --- a/phrase-extract/extract-main.cpp +++ b/phrase-extract/extract-main.cpp @@ -104,7 +104,7 @@ private: void extract(SentenceAlignment &); void addPhrase(SentenceAlignment &, int, int, int, int, string &); void writePhrasesToFile(); - bool isGoodPlaceholderRule (const SentenceAlignment &sentence, int startE, int endE, int startF, int endF); + bool checkPlaceholders (const SentenceAlignment &sentence, int startE, int endE, int startF, int endF); bool isPlaceholder(const string &word); SentenceAlignment &m_sentence; @@ -686,7 +686,7 @@ void ExtractTask::addPhrase( SentenceAlignment &sentence, int startE, int endE, return; } - if (!isGoodPlaceholderRule(sentence, startE, endE, startF, endF)) { + if (!checkPlaceholders(sentence, startE, endE, startF, endF)) { return; } @@ -811,7 +811,7 @@ void ExtractTask::extractBase( SentenceAlignment &sentence ) } -bool ExtractTask::isGoodPlaceholderRule (const SentenceAlignment &sentence, int startE, int endE, int startF, int endF) +bool ExtractTask::checkPlaceholders (const SentenceAlignment &sentence, int startE, int endE, int startF, int endF) { for (size_t pos = startF; pos <= endF; ++pos) { const string &word = sentence.source[pos]; |