hipe-eval / HIPE-scorer

A python module for evaluating NERC and NEL system performances as defined in the HIPE shared tasks (formerly CLEF-HIPE-2020-scorer).
https://hipe-eval.github.io
MIT License
13 stars 4 forks source link

Make file urls amenable to the scorer #20

Closed sven-nm closed 2 years ago

sven-nm commented 2 years ago

Feature request : because all the modules in HIPE-pycommons can be called either with a path or an url, I think the scorer should too. Adding a simple

import urllib
if url:
    response = urllib.request.urlopen(url)
    tsv_data = response.read().decode('utf-8')

Would do the job !

simon-clematide commented 2 years ago

Good point. I would suggest that we just use https://github.com/RaRe-Technologies/smart_open's open in the code, and then we have a very general solution, in whichever way the input files are specified. Agreed?

simon-clematide commented 2 years ago

Part of the code already used smart open. Now it's done.