opennlp.tools.cmdline
Class ModelLoader<T>
java.lang.Object
opennlp.tools.cmdline.ModelLoader<T>
- Type Parameters:
T
-
- Direct Known Subclasses:
- ChunkerModelLoader, DoccatModelLoader, POSModelLoader
public abstract class ModelLoader<T>
- extends java.lang.Object
Loads a model and does all the error handling for the command line tools.
Note: Do not use this class, internal use only!
Constructor Summary |
protected |
ModelLoader(java.lang.String modelName)
|
Method Summary |
T |
load(java.io.File modelFile)
|
protected abstract T |
loadModel(java.io.InputStream modelIn)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ModelLoader
protected ModelLoader(java.lang.String modelName)
loadModel
protected abstract T loadModel(java.io.InputStream modelIn)
throws java.io.IOException,
InvalidFormatException
- Throws:
java.io.IOException
InvalidFormatException
load
public T load(java.io.File modelFile)
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.