Thanks for open sourcing your labeler! I'm running into the following error with the sample reports:
/root/miniconda3/envs/chexpert-label/lib/python3.8/site-packages/StanfordDependencies/JPypeBackend.py:160: UserWarning: This jar doesn't support universal dependencies, falling back to Stanford Depen
dencies. To suppress this message, call with universal=False
warnings.warn("This jar doesn't support universal "
ERROR:root:Cannot process sentence 0 in 0
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process sentence 39 in 0
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process sentence 62 in 0
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process 0
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/negdetect.py", line 75, in detect
total_loc = ann.get_total_location()
AttributeError: 'BioCAnnotation' object has no attribute 'get_total_location'
ERROR:root:Cannot process sentence 0 in 1
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process sentence 52 in 1
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process sentence 84 in 1
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process 1
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/negdetect.py", line 75, in detect
total_loc = ann.get_total_location()
AttributeError: 'BioCAnnotation' object has no attribute 'get_total_location'
ERROR:root:Cannot process sentence 0 in 2
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process 2
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/negdetect.py", line 75, in detect
total_loc = ann.get_total_location()
AttributeError: 'BioCAnnotation' object has no attribute 'get_total_location'
ERROR:root:Cannot process sentence 0 in 3
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process sentence 29 in 3
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 118, in convert_doc
anns, rels = convert_dg(dependency_graph, sentence.text,
File "/root/Y_chexpert-labeler-master/negbio/pipeline/ptb2ud.py", line 171, in convert_dg
index = text.find(node_form, start)
TypeError: must be str, not java.lang.String
ERROR:root:Cannot process 3
Traceback (most recent call last):
File "/root/Y_chexpert-labeler-master/negbio/pipeline/negdetect.py", line 75, in detect
total_loc = ann.get_total_location()
AttributeError: 'BioCAnnotation' object has no attribute 'get_total_location'
One of the problems here is that 'TypeError: must be str'. However, when I print the type of sample_report, it is indeed str type.