Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- /home/kouf/test/yamcha-0.33/src/common.h 2005-09-05 23:50:59.000000000 +0900
- +++ common.h 2017-04-25 16:10:37.217158500 +0900
- @@ -51,6 +51,7 @@
- #include <vector>
- #include <string>
- #include <stdexcept>
- +#include <cstring>
- namespace YamCha {
- --- /home/kouf/test/yamcha-0.33/src/feature_index.cpp 2005-09-05 23:50:59.000000000 +0900
- +++ feature_index.cpp 2017-04-26 12:39:28.324695900 +0900
- @@ -147,11 +147,11 @@
- if (rclist[0] == "F" || rclist[0] == "f") {
- for (std::set<int>::iterator rit = tmp_row.begin(); rit != tmp_row.end(); ++rit)
- for (std::set<int>::iterator cit = tmp_col.begin(); cit != tmp_col.end(); ++cit)
- - feature_set.insert (std::make_pair <int, int>( *rit, *cit ) );
- + feature_set.insert (std::make_pair <int, int>( (const int)*rit, (const int)*cit ) );
- } else {
- for (std::set<int>::iterator rit = tmp_row.begin(); rit != tmp_row.end(); ++rit)
- for (std::set<int>::iterator cit = tmp_col.begin(); cit != tmp_col.end(); ++cit)
- - bow_feature_set.insert (std::make_pair <int, int>( *rit, *cit ) );
- + bow_feature_set.insert (std::make_pair <int, int>( (const int)*rit, (const int)*cit ) );
- }
- } else if (size == 2 && (rclist[0] == "T" || rclist[0] == "t")) {
- --- /home/kouf/test/yamcha-0.33/src/chunkersub.h 2005-09-05 23:50:59.000000000 +0900
- +++ chunkersub.h 2017-04-26 13:10:32.050131400 +0900
- @@ -54,7 +54,7 @@
- #ifdef _YAMCHA_PARSE_DETAIL
- dist[i].push_back (std::make_pair <char*, double>
- - (result[n].name, result[n].dist));
- + ((char*)result[n].name, (const double)result[n].dist));
- #endif
- if (! c[result[n].name]) continue;
- @@ -71,7 +71,7 @@
- #ifdef _YAMCHA_PARSE_DETAIL
- dist[i].push_back (std::make_pair <char*, double>
- - (result[n].name, result[n].dist));
- + ((char*)result[n].name, (const double)result[n].dist));
- #endif
- if (max_score < result[n].score) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement