-
Notifications
You must be signed in to change notification settings - Fork 8
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
Reuse StringGazetteer Object #188
Comments
Thank you for this feature request! I think it would be a good idea to be able to store and load a gazetteer instance, however currently this is not immediately possible and the code would need some work to make it possible to e.g. pickle the instance. The main issue I see at the moment is that in order to be able to pickle the object, any lambdas must be replaced with callables that can be pickled, or by plugging into the pickle process by implementing our own |
Actually, I think you could try doing this with the cloudpickle package: Save:
Load:
Does that work for you? |
Alternately, you could try using the dill package in a similar way. |
Dear Petrak,
Thanks for the information, I was able to test it and get similar results
for most gazetteers,
but in one of them I got the following error:
Cannot add gazetteer entry '', matches root node
It seems there is a blank space in the list, but I used the same procedure
for all of them, so I do not have idea how to solve this problem.
Best regards
Luis Ramos
El lun, 17 abr 2023 a las 12:15, Johann Petrak ***@***.***>)
escribió:
… Alternately, you could try using the dill
<https://github.com/uqfoundation/dill> package in a similar way.
—
Reply to this email directly, view it on GitHub
<#188 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALS7GAAICVB276CYNHGSY2LXBUJ3FANCNFSM6AAAAAAXAEMJNA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
What do you mean by that? Would you be able to cut the list down to the shortest list that produces that error and share it with me either heere, or by private email? |
Is your feature request related to a problem? Please describe.
I currently can use a text file with a list of terms to create a StringGazetteer, which I can use without any problem.
However, as this is part of a repetitive process, I would like to have the possibility of storing the StringGazetteer object to reuse it,
and I wonder if such a feature is available?, or if there is any other approach to reach this goal?.
Luis Ramos
The text was updated successfully, but these errors were encountered: