Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.86 KB | None | 0 0
  1. --- /home/kouf/test/yamcha-0.33/src/common.h 2005-09-05 23:50:59.000000000 +0900
  2. +++ common.h 2017-04-25 16:10:37.217158500 +0900
  3. @@ -51,6 +51,7 @@
  4. #include <vector>
  5. #include <string>
  6. #include <stdexcept>
  7. +#include <cstring>
  8.  
  9. namespace YamCha {
  10.  
  11. --- /home/kouf/test/yamcha-0.33/src/feature_index.cpp 2005-09-05 23:50:59.000000000 +0900
  12. +++ feature_index.cpp 2017-04-26 12:39:28.324695900 +0900
  13. @@ -147,11 +147,11 @@
  14. if (rclist[0] == "F" || rclist[0] == "f") {
  15. for (std::set<int>::iterator rit = tmp_row.begin(); rit != tmp_row.end(); ++rit)
  16. for (std::set<int>::iterator cit = tmp_col.begin(); cit != tmp_col.end(); ++cit)
  17. - feature_set.insert (std::make_pair <int, int>( *rit, *cit ) );
  18. + feature_set.insert (std::make_pair <int, int>( (const int)*rit, (const int)*cit ) );
  19. } else {
  20. for (std::set<int>::iterator rit = tmp_row.begin(); rit != tmp_row.end(); ++rit)
  21. for (std::set<int>::iterator cit = tmp_col.begin(); cit != tmp_col.end(); ++cit)
  22. - bow_feature_set.insert (std::make_pair <int, int>( *rit, *cit ) );
  23. + bow_feature_set.insert (std::make_pair <int, int>( (const int)*rit, (const int)*cit ) );
  24. }
  25.  
  26. } else if (size == 2 && (rclist[0] == "T" || rclist[0] == "t")) {
  27. --- /home/kouf/test/yamcha-0.33/src/chunkersub.h 2005-09-05 23:50:59.000000000 +0900
  28. +++ chunkersub.h 2017-04-26 13:10:32.050131400 +0900
  29. @@ -54,7 +54,7 @@
  30.  
  31. #ifdef _YAMCHA_PARSE_DETAIL
  32. dist[i].push_back (std::make_pair <char*, double>
  33. - (result[n].name, result[n].dist));
  34. + ((char*)result[n].name, (const double)result[n].dist));
  35. #endif
  36.  
  37. if (! c[result[n].name]) continue;
  38. @@ -71,7 +71,7 @@
  39.  
  40. #ifdef _YAMCHA_PARSE_DETAIL
  41. dist[i].push_back (std::make_pair <char*, double>
  42. - (result[n].name, result[n].dist));
  43. + ((char*)result[n].name, (const double)result[n].dist));
  44. #endif
  45.  
  46. if (max_score < result[n].score) {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement