Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python argument types in SementicRoleLabeller.label(SementicRoleLabeller, VectorOfString, VectorOfString, VectorOfString, VectorOfParseResult) did not match C++ signature: #4

Closed
yzho0907 opened this issue Mar 19, 2018 · 3 comments

Comments

@yzho0907
Copy link

when i run my test.py which is:
from zhopenie.extractor import Extractor

sentence = ''

extractor = Extractor()
extractor.load()
extractor.chunk_str(sentence)
extractor.resolve_all_conference()

print("Triple: ")
print('\n'.join(str(p) for p in extractor.triple_list))
extractor.release()

the error below throws!, can i ask how to fix it?or where the problem is??thx

[dynet] random seed: 1375008154
[dynet] allocating memory: 2000MB
[dynet] memory allocation done.
Python argument types in
SementicRoleLabeller.label(SementicRoleLabeller, VectorOfString, VectorOfString, VectorOfString, VectorOfParseResult)
did not match C++ signature:
label(SementicRoleLabeller {lvalue}, boost::python::list, boost::python::list, std::vector<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >)
label(SementicRoleLabeller {lvalue}, boost::python::list, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::vector<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >)
label(SementicRoleLabeller {lvalue}, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, boost::python::list, std::vector<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >)
label(SementicRoleLabeller {lvalue}, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::vector<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<int, std::__cxx11::basic_string<char, std::char_traits, std::allocator > > > >)
Triple:

@tim5go
Copy link
Owner

tim5go commented Mar 19, 2018

Please refer to issue #3, you should use LTP 3.3.1 instead

@yzho0907
Copy link
Author

thx, this issue is indeed fixed by using LTP 3.3.1 but another issue occurs when i run this line:
self.__labeller.load('/home/young/Downloads/zhopenie-master/zhopenie/ltp_data/srl')
RuntimeError: basic_filebuf::underflow error reading the file: iostream error

@yzho0907
Copy link
Author

@tim5go the problem is now solved by using pyltp 0.1.9.1 with model 3.3.1. the tech is very cool, thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants