From 9e8402deddd7b0da030b36d4f05c8156f8e64e16 Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Fri, 26 Jul 2013 15:46:15 +0100 Subject: add placeholder support to extract --- phrase-extract/extract-main.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'phrase-extract/extract-main.cpp') 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]; -- cgit v1.2.3