main(){ char xx[] = "DOD stands for hello. this isn't for fun"; //printf("Original array: %s\n", xx); removeSpaces(xx); removePunctuation(xx); findPalindrome(xx); //printf("Redone array: %s\n", xx); }
vector<Token> TokenizerRus::Tokenize( const wstring& sentence) const { wstring replaced = replaceSpecialSymbols(sentence); wstring alignedSentence = alignSentence(replaced); wstring correctedSentece = applyMultipleTokensRule(alignedSentence); vector<wstring> splitted = Tools::Split(correctedSentece, L" ", L"\u00A0", L"\t"); vector<Token> tokens; for (size_t splittedIndex = 0; splittedIndex < splitted.size(); ++splittedIndex) { wstring current = splitted[splittedIndex]; vector<wstring> punctuation; removePunctuation(¤t, &punctuation); Token token(current, punctuation); tokens.push_back(token); } applyFirstSymbolPunctuationRule(&tokens); return tokens; }