opennlp.perceptron
Class SuffixSensitivePerceptronModelWriter
java.lang.Object
opennlp.model.AbstractModelWriter
opennlp.perceptron.PerceptronModelWriter
opennlp.perceptron.SuffixSensitivePerceptronModelWriter
public class SuffixSensitivePerceptronModelWriter
- extends PerceptronModelWriter
A writer for GIS models which inspects the filename and invokes the
appropriate GISModelWriter depending on the filename's suffixes.
The following assumption are made about suffixes:
.gz --> the file is gzipped (must be the last suffix)
.txt --> the file is plain text
.bin --> the file is binary
SuffixSensitivePerceptronModelWriter
public SuffixSensitivePerceptronModelWriter(AbstractModel model,
File f)
throws IOException
- Constructor which takes a GISModel and a File and invokes the
GISModelWriter appropriate for the suffix.
- Parameters:
model
- The GISModel which is to be persisted.f
- The File in which the model is to be stored.
- Throws:
IOException
writeUTF
public void writeUTF(String s)
throws IOException
- Specified by:
writeUTF
in class AbstractModelWriter
- Throws:
IOException
writeInt
public void writeInt(int i)
throws IOException
- Specified by:
writeInt
in class AbstractModelWriter
- Throws:
IOException
writeDouble
public void writeDouble(double d)
throws IOException
- Specified by:
writeDouble
in class AbstractModelWriter
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in class AbstractModelWriter
- Throws:
IOException
Copyright © 2013 The Apache Software Foundation. All Rights Reserved.