-
Notifications
You must be signed in to change notification settings - Fork 1
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 Loaded Models #4
Comments
I've started running this on https://github.com/jtauber/apostolic-fathers ;) |
perfect, that's one of the first things I wanted to see it run on :-) |
|
I'll probably make the change you're suggesting. Technically, it's an easy fix: just detect input type and process accordingly (which in this case would be combining all sentences into a single string before giving the whole thing to the NN). The NN's were made to consider inter-sentence context. So feeding it sentence-by-sentence the way you are not only makes it extremely slow but also less accurate. This is mentioned in the readme, but I should probably clarify when I say "Give it the whole document" I mean to give it the while document as a single string rather than a list of sentences. The only reservation about doing this would be if a person is feeding it a list of sentences which are not consecutive sentences of the same work. The NN's would give especially bad tags in that case. But that should be a rare occurrence, right? I don't expect many would do that. In the next update, I'll add that input detection; and I'll close this when I do that. |
Ahh, I assumed line by line would be reasonable and would avoid out-of-memory issues. I'll try running over the whole documents... |
I was running it over a work at a time (e.g. book in the NT case) which seems a good compromise. |
Yes, just to confirm, work-at-a-time works well (although loading models between works still does seem redundant). |
Calling
tag()
on multiple strings reloads the models each time. It would be great to load them up on the first call and then reuse them.The text was updated successfully, but these errors were encountered: