changed important parameter name

This commit is contained in:
rjawor 2019-07-18 22:16:35 +02:00
parent 2fb17e2bed
commit fb6440eba6
3 changed files with 7 additions and 7 deletions

View File

@ -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<std::string> sourceSentences;
std::vector<std::string> lemmatizedSourceSentences;
std::vector<std::string> concordiaSourceSentences;
std::vector<std::string> targetSentences;
std::vector<std::vector<std::vector<int> > > alignments;
std::vector<int> 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<std::string> sourceSentences;
std::vector<std::string> targetSentences;

View File

@ -64,7 +64,7 @@ void IndexController::addSentence(
void IndexController::addSentences(rapidjson::Writer<rapidjson::StringBuffer> & jsonWriter,
const std::vector<std::string> & sourceSentences,
const std::vector<std::string> & lemmatizedSourceSentences,
const std::vector<std::string> & concordiaSourceSentences,
const std::vector<std::string> & targetSentences,
const std::vector<std::vector<std::vector<int> > > & alignments,
const std::vector<int> & sourceIds,
@ -73,11 +73,11 @@ void IndexController::addSentences(rapidjson::Writer<rapidjson::StringBuffer> &
boost::ptr_map<int,Concordia>::iterator it = _concordiasMap->find(tmId);
if (it != _concordiasMap->end()) {
std::vector<TokenizedSentence> tokenizedSourceSentences = it->second->tokenizeAll(sourceSentences, false, false);
std::vector<TokenizedSentence> tokenizedLemmatizedSourceSentences = it->second->tokenizeAll(lemmatizedSourceSentences, true, true);
std::vector<TokenizedSentence> tokenizedConcordiaSourceSentences = it->second->tokenizeAll(concordiaSourceSentences, true, true);
std::vector<TokenizedSentence> tokenizedTargetSentences = it->second->tokenizeAll(targetSentences, false, false);
std::vector<SUFFIX_MARKER_TYPE> sentenceIds = _unitDAO.addAlignedSentences(tokenizedSourceSentences, tokenizedTargetSentences, alignments, sourceIds, tmId);
it->second->addAllTokenizedExamples(tokenizedLemmatizedSourceSentences, sentenceIds);
it->second->addAllTokenizedExamples(tokenizedConcordiaSourceSentences, sentenceIds);
jsonWriter.StartObject();
jsonWriter.String("status");

View File

@ -33,7 +33,7 @@ public:
void addSentences(rapidjson::Writer<rapidjson::StringBuffer> & jsonWriter,
const std::vector<std::string> & sourceSentences,
const std::vector<std::string> & lemmatizedSourceSentences,
const std::vector<std::string> & concordiaSourceSentences,
const std::vector<std::string> & targetSentences,
const std::vector<std::vector<std::vector<int> > > & alignments,
const std::vector<int> & sourceIds,