Update of /cvsroot/open-jtalk/open_jtalk/src/mecab/src
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv7183/mecab/src
Modified Files:
dictionary.cpp
Log Message:
add CR code checker to dict compiler
Index: dictionary.cpp
===================================================================
RCS file: /cvsroot/open-jtalk/open_jtalk/src/mecab/src/dictionary.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** dictionary.cpp 23 Dec 2015 03:54:47 -0000 1.4
--- dictionary.cpp 25 Dec 2015 01:17:03 -0000 1.5
***************
*** 326,329 ****
--- 326,343 ----
while (is->getline(line.get(), line.size())) {
+ #if 1 /* for Open JTalk */
+ {
+ /* if there is CR code, it should be removed */
+ char *tmpstr = line.get();
+ if(tmpstr != NULL){
+ size_t tmplen = strlen(tmpstr);
+ if(tmplen > 0){
+ if(tmpstr[tmplen-1] == '\r'){
+ tmpstr[tmplen-1] = '\0';
+ }
+ }
+ }
+ }
+ #endif
char *col[8];
const size_t n = tokenizeCSV(line.get(), col, 5);
|