Fix typo 31/281531/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Tue, 6 Sep 2022 08:08:59 +0000 (17:08 +0900)
committerTizen AI <ai.tzn.sec@samsung.com>
Tue, 20 Sep 2022 02:54:14 +0000 (11:54 +0900)
Change-Id: I91cce2a1fc8835bcfd04e6680017c015438dabbb
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
src/mmimgr/iu/CommandFinder.cpp
src/mmimgr/iu/CommandFinder.h

index b2cf744fe0c2e1f46b60e353043c83ccea0fa07b..a733cd80278dc826763e6f45e9c18241170e2c8a 100644 (file)
@@ -39,7 +39,7 @@ CommandFinder::CommandFinder(std::string text, std::list<std::shared_ptr<Command
        _I("[CommandFinder] Initiate command searcher. text(%s)", text.c_str());
 
        __loweredText = StringUtil::makeLowerCase(text);
-       __splitedText = StringUtil::splitText(__loweredText, ' ');
+       __splitText = StringUtil::splitText(__loweredText, ' ');
 
        __isLabel = true;
 }
@@ -107,7 +107,7 @@ Command* CommandFinder::findCommandByText()
                string label = StringUtil::makeLowerCase(command->getLabel());
 
                bool isValid = true;
-               for (auto& word : __splitedText) {
+               for (auto& word : __splitText) {
                        if (label.find(word) == string::npos) {
                                isValid = false;
                                break;
@@ -126,14 +126,14 @@ Command* CommandFinder::findCommandByWord()
 {
        _I("[CommandFinder] Find command by word");
 
-       int maxNumber = __splitedText.size() * __WORD_MATCHING_RATE;
+       int maxNumber = __splitText.size() * __WORD_MATCHING_RATE;
        Command* result = nullptr;
 
        for (auto command : __commands) {
                string label = StringUtil::makeLowerCase(command->getLabel());
 
                int numOfWord = 0;
-               for (auto& word : __splitedText) {
+               for (auto& word : __splitText) {
                        if (label.find(word) != string::npos) {
                                numOfWord++;
                        }
@@ -157,10 +157,10 @@ Command* CommandFinder::findCommandByChar()
 
        for (auto command : __commands) {
                string label = StringUtil::makeLowerCase(command->getLabel());
-               vector<string> splitedLabel = StringUtil::splitText(label, ' ');
+               vector<string> splitLabel = StringUtil::splitText(label, ' ');
 
                int score = 0;
-               for (auto& word : __splitedText) {
+               for (auto& word : __splitText) {
                        if (word.size() < 3) {
                                continue;
                        }
@@ -168,7 +168,7 @@ Command* CommandFinder::findCommandByChar()
                        // This is for calculating Levenshtein distance as similarity matric.
                        const int __MIN_THRESHOLD = word.size() * __CHAR_MATCHING_RATE;
                        int minScore = __MIN_THRESHOLD;
-                       for (auto& labelWord : splitedLabel) {
+                       for (auto& labelWord : splitLabel) {
                                if (labelWord.size() < 3) {
                                        continue;
                                }
@@ -230,7 +230,7 @@ Command* CommandFinder::findCommandByChar()
        }
 
        int threshold = 0;
-       for (auto& word : __splitedText) {
+       for (auto& word : __splitText) {
                if (3 <= word.size()) {
                        threshold += word.size();
                }
index 8a2d062286ea489f3be008df3505a6f3d4ef60bd..f2a2c02829a566523c3a2366217c40eb34b9d4ac 100644 (file)
@@ -51,7 +51,7 @@ class CommandFinder {
                const double __CHAR_MATCHING_RATE;
 
                std::list<std::shared_ptr<Command>>& __commands;
-               std::vector<std::string> __splitedText;
+               std::vector<std::string> __splitText;
                std::string __loweredText;
                int __index;