opennlp.perceptron
Class PlainTextPerceptronModelReader

java.lang.Object
  extended by opennlp.model.AbstractModelReader
      extended by opennlp.perceptron.PerceptronModelReader
          extended by opennlp.perceptron.PlainTextPerceptronModelReader

public class PlainTextPerceptronModelReader
extends PerceptronModelReader


Constructor Summary
PlainTextPerceptronModelReader(java.io.BufferedReader br)
          Constructor which directly instantiates the BufferedReader containing the model contents.
PlainTextPerceptronModelReader(java.io.File f)
          Constructor which takes a File and creates a reader for it.
 
Method Summary
 
Methods inherited from class opennlp.perceptron.PerceptronModelReader
checkModelType, constructModel
 
Methods inherited from class opennlp.model.AbstractModelReader
getModel, readDouble, readInt, readUTF
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlainTextPerceptronModelReader

public PlainTextPerceptronModelReader(java.io.BufferedReader br)
Constructor which directly instantiates the BufferedReader containing the model contents.

Parameters:
br - The BufferedReader containing the model information.

PlainTextPerceptronModelReader

public PlainTextPerceptronModelReader(java.io.File f)
                               throws java.io.IOException
Constructor which takes a File and creates a reader for it. Detects whether the file is gzipped or not based on whether the suffix contains ".gz".

Parameters:
f - The File in which the model is stored.
Throws:
java.io.IOException


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.