-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_path - allow to load from disk instead #1
Comments
A quick-and-dirty way of doing it would be to first load the supported model for the same language (e.g. for English): nlp = spacy_udpipe.load('en') and then (re)load the custom underlying UDPipe model from the disk from ufal.udpipe import Model
my_model = Model.load(path)
if my_model:
nlp.udpipe.model = my_model |
That's a bit silly :). 2 times loading that .udpipe file. Can't we just do
|
I added that option in the pull request #2, along with a convenience function |
Great! Thank you. |
Would it be possible to allow the language to be the path to the file on disk? Currently this https://github.com/TakeLab/spacy-udpipe/blob/master/spacy_udpipe/language.py#L195 only allows to set a language specified in that json
I have some home-brew udpipe models (e.g. some of them are here: https://github.com/bnosac/udpipe.models.ud, which I basically use alongside the R wrapper of udpipe https://github.com/bnosac/udpipe) and it would be nice to allow them to be read from the location of the file on disk instead.
The text was updated successfully, but these errors were encountered: