remove newline from input

This commit is contained in:
Hieu Hoang 2017-02-20 12:44:53 +00:00
parent fd631d317f
commit c316b64d34
2 changed files with 4 additions and 0 deletions

View File

@ -9,6 +9,9 @@ print filePath
with open(filePath) as f:
for line in f:
#print line
line = line[:-1]
#print line
ws = create_connection("ws://localhost:8080/translate")
ws.send(line)
result=ws.recv()

View File

@ -30,6 +30,7 @@ void init(const std::string& options) {
boost::python::list translate(boost::python::list& in)
{
cerr << "in=" << boost::python::len(in) << endl;
size_t miniSize = god_.Get<size_t>("mini-batch");
size_t maxiSize = god_.Get<size_t>("maxi-batch");