Reputation: 131
I'm using the Apache OpenNLP library for some part of speech tagging. l tried creating a POSModel
using the POSModel(URL)
constructor, but the model is not initialized correctly. Does anyone know if the POSModel(URL)
constructor works at all? Or should I just use the conventional route of creating an InputStream method?
P.S. The reason I'm trying to use the POSModel(URL)
constructor is that I'm creating an Android app that uses part of speech tagging. However, the model that needs to be loaded for the tagging is corrupt or something, because it takes about 20 seconds to load just a 5 mb file as an InputStream. I'm thinking that it might be because of removing the "tags.tagdict" file in the model (other questions suggested this as a way to make the model work on Android), which may have changed something; I'm not super sure.
Upvotes: 0
Views: 88
Reputation: 186
The URL constructors in the models are working well and use the same code path as the InputStream constructor to initialize the model. Removing the tags.dict file will make the model load faster, because there is less to load, but will make using it slower because now more options have to be evaluated. The model accuracy will also be affected by that.
Upvotes: 1