ckiplab / ckipnlp

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

Constituency parser not working #36

Open FishInBed opened 3 weeks ago

FishInBed commented 3 weeks ago

Dear authors/ developers/ editors,

The constituency parser seems to have crashed down for a few days. I have tried to send raw text and segmented tokens into the function get_conparse, but I can only get None as result. Please kindly help checking if there is error happening to the module or if there exist any problem to my code. Thank a lot.

from ckipnlp.container.seg import SegParagraph 
test_tokens = ['暑假','到','了','卻','難','出國','?']
test_pos = ['Nd','VCL','Di','D','VH','VA','QUESTIONCATEGORY']
data = CkipDocument(ws = SegParagraph([test_tokens]), pos = SegParagraph([test_pos]))
pipeline.get_conparse(data)
### Output
ParseParagraph([ParseSentence([ParseClause(clause=None, delim='?')])])
pipeline.get_conparse(CkipDocument(raw="暑假到了卻難出國?"))
### Output
"ParseParagraph([ParseSentence([ParseClause(clause=None, delim='?')])])"