Closed yzho0907 closed 6 years ago
Please refer to issue #3, you should use LTP 3.3.1
instead
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
@tim5go the problem is now solved by using pyltp 0.1.9.1 with model 3.3.1. the tech is very cool, thx.
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: