Skip to content
This repository has been archived by the owner on Jan 13, 2023. It is now read-only.

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Honghan committed May 21, 2019
1 parent ccc1d96 commit a60207d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ann_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ def get_semehr_ann_label(ann):
pref = ann.pref
elif hasattr(ann, 'minor_type'):
pref = ann.minor_type
return '%s%s(%s)' % (str_context, pref, ann.cui)
cui = ''
if hasattr(ann, 'cui'):
cui = ann.cui
elif hasattr(ann, 'major_type'):
cui = ann.major_type
return '%s%s(%s)' % (str_context, pref, cui)

@staticmethod
def to_eHOST(ann_doc, full_text=None, file_pattern='%s.txt', id_pattern='smehr-%s-%s',
Expand Down

0 comments on commit a60207d

Please sign in to comment.