add debug into segment

This commit is contained in:
gwdwyy 2013-07-26 13:40:25 +08:00
parent 7e1186a4ba
commit f104ef043e

View File

@ -66,6 +66,23 @@ namespace CppJieba
return false;
}
#ifdef DEBUG
{
string tmp("{");
FOR_VECTOR(dag, i)
{
tmp += "[";
FOR_VECTOR(dag[i], j)
{
tmp += string_format("%d,", dag[i][j]);
}
tmp += "],";
}
tmp += "}";
LogDebug(tmp);
}
#endif
vector<pair<int, double> > dp;
retFlag = _calcDP(unicode, dag, dp);
if(!retFlag)
@ -74,6 +91,7 @@ namespace CppJieba
return false;
}
retFlag = _cutDAG(unicode, dp, res);
if(!retFlag)
{