Make file urls amenable to the scorer
Closed this issue · 2 comments
sven-nm commented
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
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
Part of the code already used smart open. Now it's done.