Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions negbio/pipeline/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ def __init__(self, model_dir=None):
logging.debug("downloading GENIA+PubMed model if necessary ...")
model_dir = ModelFetcher.download_and_install_model(
'GENIA+PubMed', os.path.join(tempfile.gettempdir(), 'models'))
elif 'pathlib' in str(type(model_dir)):
# avoid python 2/3 compatibility issues with os/pathlib2
model_dir = str(model_dir)
self.model_dir = os.path.expanduser(model_dir)

logging.debug('loading model %s ...' % self.model_dir)
Expand Down
2 changes: 1 addition & 1 deletion negbio/pipeline/ptb2ud.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def convert_dg(dependency_graph, text, offset, ann_index=0, rel_index=0, has_lem
if index == -1:
logging.debug('Cannot convert parse tree to dependency graph at %d\n%d\n%s',
start, offset, str(dependency_graph))
return
return None, None

ann = bioc.BioCAnnotation()
ann.id = 'T{}'.format(ann_index)
Expand Down