ckiplab / ckipnlp

CKIP CoreNLP Toolkits
https://ckipnlp.readthedocs.io
GNU General Public License v3.0
114 stars 15 forks source link

Co-Reference Pipeline sample code is not working #28

Closed jungyitsai closed 3 years ago

jungyitsai commented 3 years ago

I use sample code from document-reference, but I get the error-message NodeIDAbsentError: Node 'None' is not in the tree. Do I misuse this sample code?

pipeline = CkipCorefPipeline() doc = CkipDocument(raw='畢卡索他想,完蛋了')

Co-Reference

corefdoc = pipeline(doc) print(corefdoc.coref) for line in corefdoc.coref: print(line.to_text())

emfomy commented 3 years ago

Sorry for my late response. The Co-Reference pipeline depends on CkipClassic Parser Client backend. To use the CkipClassic Parser Client backend, you need to

  1. Register an account at http://parser.iis.sinica.edu.tw/v1/reg.exe
  2. Set the environment variables $CKIPPARSER_USERNAME and $CKIPPARSER_PASSWORD to the username and password.
emfomy commented 3 years ago

CkipClassic updated. https://github.com/ckiplab/ckip-classic/releases/tag/1.2.1

Now it will raise error if username/password is invalid.