Update code to integrate Chinese parsers/taggers
I use zpar as a dependency parsing, but I found that python-zpar can't load chinese model successfully. And the error is like “Loading tagger from ../chinese-models/tagger Loading model...terminate called after throwing an instance of 'std::string' Aborted”
My code is as: from six import print_ from zpar import ZPar chinese_model = "../chinese-models" with ZPar(chinese_model) as z: depparser = z.get_depparser()
I download the chinese-models.zip from github archive
I also try the english-models, and python-zpar load english model successfully
Thanks
Hmm, I never really had tested whether python-zpar works with Chinese models, only with English ones. It looks like the compilation process for the underlying library object might need to be changed for python-zpar to support both Chinese and English or at least a way to choose a compilation path based on the language. I will try looking into this but any help would be appreciated.
Actually, this is not a bug. It looks like the interface to the Chinese taggers and parsers in zpar is different than the interface to the English ones. So, the C++ code I wrote to interface with the zpar objects only works for English. So, it needs a lot more work than I had thought it would and I am not sure I have the time for this right now. So, help is even more welcome.
I will update the README to make it clear, that as of now, python-zpar only works with the Zpar english models.