From fb6440eba69df59e3e5310edf24a767261861e77 Mon Sep 17 00:00:00 2001 From: rjawor Date: Thu, 18 Jul 2019 22:16:35 +0200 Subject: [PATCH] changed important parameter name --- concordia-server/concordia_server.cpp | 6 +++--- concordia-server/index_controller.cpp | 6 +++--- concordia-server/index_controller.hpp | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/concordia-server/concordia_server.cpp b/concordia-server/concordia_server.cpp index b11eac9..be67fc1 100644 --- a/concordia-server/concordia_server.cpp +++ b/concordia-server/concordia_server.cpp @@ -64,7 +64,7 @@ std::string ConcordiaServer::handleRequest(std::string & requestString) { _indexController->addSentence(jsonWriter, sourceSentence, targetSentence, tmId); } else if (operation == ADD_SENTENCES_OP) { std::vector sourceSentences; - std::vector lemmatizedSourceSentences; + std::vector concordiaSourceSentences; std::vector targetSentences; std::vector > > alignments; std::vector sourceIds; @@ -79,13 +79,13 @@ std::string ConcordiaServer::handleRequest(std::string & requestString) { break; } else { sourceSentences.push_back(examplesArray[i][0].GetString()); - lemmatizedSourceSentences.push_back(examplesArray[i][1].GetString()); + concordiaSourceSentences.push_back(examplesArray[i][1].GetString()); targetSentences.push_back(examplesArray[i][2].GetString()); alignments.push_back(_getInt2DArray(examplesArray[i][3])); sourceIds.push_back(examplesArray[i][4].GetInt()); } } - _indexController->addSentences(jsonWriter, sourceSentences, lemmatizedSourceSentences, targetSentences, alignments, sourceIds, tmId); + _indexController->addSentences(jsonWriter, sourceSentences, concordiaSourceSentences, targetSentences, alignments, sourceIds, tmId); } else if (operation == ADD_ALIGNED_SENTENCES_OP) { std::vector sourceSentences; std::vector targetSentences; diff --git a/concordia-server/index_controller.cpp b/concordia-server/index_controller.cpp index 7e3717d..2ca9007 100644 --- a/concordia-server/index_controller.cpp +++ b/concordia-server/index_controller.cpp @@ -64,7 +64,7 @@ void IndexController::addSentence( void IndexController::addSentences(rapidjson::Writer & jsonWriter, const std::vector & sourceSentences, - const std::vector & lemmatizedSourceSentences, + const std::vector & concordiaSourceSentences, const std::vector & targetSentences, const std::vector > > & alignments, const std::vector & sourceIds, @@ -73,11 +73,11 @@ void IndexController::addSentences(rapidjson::Writer & boost::ptr_map::iterator it = _concordiasMap->find(tmId); if (it != _concordiasMap->end()) { std::vector tokenizedSourceSentences = it->second->tokenizeAll(sourceSentences, false, false); - std::vector tokenizedLemmatizedSourceSentences = it->second->tokenizeAll(lemmatizedSourceSentences, true, true); + std::vector tokenizedConcordiaSourceSentences = it->second->tokenizeAll(concordiaSourceSentences, true, true); std::vector tokenizedTargetSentences = it->second->tokenizeAll(targetSentences, false, false); std::vector sentenceIds = _unitDAO.addAlignedSentences(tokenizedSourceSentences, tokenizedTargetSentences, alignments, sourceIds, tmId); - it->second->addAllTokenizedExamples(tokenizedLemmatizedSourceSentences, sentenceIds); + it->second->addAllTokenizedExamples(tokenizedConcordiaSourceSentences, sentenceIds); jsonWriter.StartObject(); jsonWriter.String("status"); diff --git a/concordia-server/index_controller.hpp b/concordia-server/index_controller.hpp index 09b50be..41e52a4 100644 --- a/concordia-server/index_controller.hpp +++ b/concordia-server/index_controller.hpp @@ -33,7 +33,7 @@ public: void addSentences(rapidjson::Writer & jsonWriter, const std::vector & sourceSentences, - const std::vector & lemmatizedSourceSentences, + const std::vector & concordiaSourceSentences, const std::vector & targetSentences, const std::vector > > & alignments, const std::vector & sourceIds,