stanfordmlgroup / chexpert-labeler

CheXpert NLP tool to extract observations from radiology reports.
MIT License
328 stars 78 forks source link

ERROR::root:Cannot process sentence 39 in 0 #48

Open zoule41 opened 1 year ago

zoule41 commented 1 year ago

'UserWarning: This jar doesn't support universal dependencies, falling back to Stanford Dependencies. To suppress this message, call with universal=False warnings.warn("This jar doesn't support universal " Traceback (most recent call last): File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 120, in convert_doc has_lemmas=self._backend == 'jpype') File "/media/zoule/Elements/chexpert-labeler/chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 172, in convert_dg index = text.find(node_form, start) TypeError: must be str, not java.lang.String'

When I run 'python label.py --reports_path sample_reports.csv', the error will happen. I check the type of text by 'print(type(text))' before 'index = text.find(node_form, start)'. It will print '<class 'str'>.

I don't know what is the problem and how to fix it. Can anybody help me? error1

gysabc commented 11 months ago

I had a similar problem, have you solved it yet? 1 2 3 4 5

gysabc commented 11 months ago

I had a similar problem, have you solved it yet? 1 2 3 4 5

to solve this problem,I just use the method below: https://blog.csdn.net/weixin_46235937/article/details/124520951