yanyiwu / gojieba

"结巴"中文分词的Golang版本
MIT License
2.45k stars 303 forks source link

报错,看不懂 #107

Closed aohanhongzhi closed 3 weeks ago

aohanhongzhi commented 1 year ago
# github.com/yanyiwu/gojieba
In file included from ../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/cppjieba/DictTrie.hpp:13,
                 from ../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/cppjieba/QuerySegment.hpp:8,
                 from ../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/cppjieba/Jieba.hpp:4,
                 from jieba.cpp:5:
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::LTrim(std::string&)’:
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:87:93: warning: ‘std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result (*)(_Arg)) [with _Arg = unsigned int; _Result = bool]’ is deprecated: use 'std::function' instead [-Wdeprecated-declarations]
   87 |   s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
      |                                                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/12/bits/stl_tree.h:65,
                 from /usr/include/c++/12/set:60,
                 from ../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/cppjieba/QuerySegment.hpp:5:
/usr/include/c++/12/bits/stl_function.h:1126:5: note: declared here
 1126 |     ptr_fun(_Result (*__x)(_Arg))
      |     ^~~~~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:87:64: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
   87 |   s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))));
      |                                                       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
 1046 |     not1(const _Predicate& __pred)
      |     ^~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::RTrim(std::string&)’:
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:92:84: warning: ‘std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result (*)(_Arg)) [with _Arg = unsigned int; _Result = bool]’ is deprecated: use 'std::function' instead [-Wdeprecated-declarations]
   92 |   s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
      |                                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1126:5: note: declared here
 1126 |     ptr_fun(_Result (*__x)(_Arg))
      |     ^~~~~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:92:55: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
   92 |   s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end());
      |                                              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
 1046 |     not1(const _Predicate& __pred)
      |     ^~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::LTrim(std::string&, char)’:
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:101:77: warning: ‘std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to<char>; _Tp = char]’ is deprecated: use 'std::bind' instead [-Wdeprecated-declarations]
  101 |   s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
      |                                                                 ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/bits/stl_function.h:1438:
/usr/include/c++/12/backward/binders.h:172:5: note: declared here
  172 |     bind2nd(const _Operation& __fn, const _Tp& __x)
      |     ^~~~~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:101:64: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = binder2nd<equal_to<char> >]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
  101 |   s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to<char>(), x))));
      |                                                       ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
 1046 |     not1(const _Predicate& __pred)
      |     ^~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp: In function ‘std::string& limonp::RTrim(std::string&, char)’:
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:106:68: warning: ‘std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to<char>; _Tp = char]’ is deprecated: use 'std::bind' instead [-Wdeprecated-declarations]
  106 |   s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
      |                                                        ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/backward/binders.h:172:5: note: declared here
  172 |     bind2nd(const _Operation& __fn, const _Tp& __x)
      |     ^~~~~~~
../../pkg/mod/github.com/yanyiwu/gojieba@v1.3.0/deps/limonp/StringUtil.hpp:106:55: warning: ‘constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = binder2nd<equal_to<char> >]’ is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations]
  106 |   s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to<char>(), x))).base(), s.end());
      |                                              ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/stl_function.h:1046:5: note: declared here
 1046 |     not1(const _Predicate& __pred)
      |     ^~~~
zzdboy commented 1 year ago

github.com/yanyiwu/gojieba

In file included from E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/cppjieba/DictTrie.hpp:13, from E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/cppjieba/QuerySegment.hpp:8, from E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/cppjieba/Jieba.hpp:4, from jieba.cpp:5: E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::LTrim(std::string&)': E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:87:93: warning: 'std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result ()(_Arg)) [with _Arg = unsigned int; _Result = bool]' is deprecated: use 'std::function' instead [-Wdeprecated-declarations] 87 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace)))); | ~~~~~~^~~ In file included from D:/msys64/mingw64/include/c++/13.2.0/bits/stl_tree.h:65, from D:/msys64/mingw64/include/c++/13.2.0/set:62, from E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/cppjieba/QuerySegment.hpp:5: D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1126:5: note: declared here 1126 | ptr_fun(_Result (x)(_Arg)) | ^~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:87:64: warning: 'constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]' is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations] 87 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace)))); | ~~~^~~~~~~~~ D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1046:5: note: declared here 1046 | not1(const _Predicate& __pred) | ^~~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::RTrim(std::string&)': E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:92:84: warning: 'std::pointer_to_unary_function<_Arg, _Result> std::ptr_fun(_Result ()(_Arg)) [with _Arg = unsigned int; _Result = bool]' is deprecated: use 'std::function' instead [-Wdeprecated-declarations] 92 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end()); | ~~~~~~^~~ D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1126:5: note: declared here 1126 | ptr_fun(_Result (x)(_Arg)) | ^~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:92:55: warning: 'constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = pointer_to_unary_function<unsigned int, bool>]' is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations] 92 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<unsigned, bool>(IsSpace))).base(), s.end()); | ~~~^~~~~~~~~ D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1046:5: note: declared here 1046 | not1(const _Predicate& pred) | ^~~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::LTrim(std::string&, char)': E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:101:77: warning: 'std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to; _Tp = char]' is deprecated: use 'std::bind' instead [-Wdeprecated-declarations] 101 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to(), x)))); | ~~^~~~~~~~ In file included from D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1438: D:/msys64/mingw64/include/c++/13.2.0/backward/binders.h:172:5: note: declared here 172 | bind2nd(const _Operation& fn, const _Tp& x) | ^~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:101:64: warning: 'constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = binder2nd<equal_to >]' is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations] 101 | s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::bind2nd(std::equal_to(), x)))); | ~~~^~~~~~~~~~ D:/msys64/mingw64/include/c++/13.2.0/bits/stl_function.h:1046:5: note: declared here 1046 | not1(const _Predicate& pred) | ^~~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp: In function 'std::string& limonp::RTrim(std::string&, char)': E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:106:68: warning: 'std::binder2nd<_Operation> std::bind2nd(const _Operation&, const _Tp&) [with _Operation = equal_to; _Tp = char]' is deprecated: use 'std::bind' instead [-Wdeprecated-declarations] 106 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to(), x))).base(), s.end()); | ~~^~~~~~~~ D:/msys64/mingw64/include/c++/13.2.0/backward/binders.h:172:5: note: declared here 172 | bind2nd(const _Operation& __fn, const _Tp& __x) | ^~~ E:\Go\pkg\mod\github.com\yanyiwu\gojieba@v1.3.0\deps/limonp/StringUtil.hpp:106:55: warning: 'constexpr std::unary_negate<_Predicate> std::not1(const _Predicate&) [with _Predicate = binder2nd<equal_to >]' is deprecated: use 'std::not_fn' instead [-Wdeprecated-declarations] 106 | s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::bind2nd(std::equal_to(), x))).base(), s.end());

karlhuang95 commented 1 year ago

同问

aohanhongzhi commented 1 year ago

@karlhuang95 @zzdboy

推荐 https://github.com/go-ego/gse 纯粹的go实现,不带cpp。

DeerShark commented 1 year ago

同问 一模一样的报错...没有解决方法

github-actions[bot] commented 1 month ago

This issue has not been updated for over 1 year and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.

github-actions[bot] commented 3 weeks ago

This issue has been automatically closed due to inactivity. If the issue still exists, please reopen it.