finished hw5

This commit is contained in:
2019-10-21 23:27:48 -06:00
parent 672bd8313d
commit a731c257cf

View File

@@ -36,12 +36,15 @@ int main()
}
std::cout << input << std::endl;
//Found on Stack OverFlow//
int i = input.length() - 1; // last character
while (i != 0 && !isspace(input[i]))
{
--i;
}
std::string lastword = input.substr(i + 1);
//------------------//
auto words = tree->predict(lastword, rlutil::trows() - 3);
std::cout << "-----prediction-----" << std::endl;