public class TreeTaggerModelUtil
extends java.lang.Object
| Constructor and Description |
|---|
TreeTaggerModelUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.lang.String> |
getTagset(java.io.File aModelFile,
java.lang.String aCharsetName)
Read the tagset from a model.
|
static java.util.List<java.lang.String> |
getTagset(java.io.InputStream aInputStream,
java.lang.String aCharsetName)
Read the tagset from a model.
|
static TreeTaggerModel |
readModel(java.io.File aFile,
java.lang.String aCharsetName)
Read a model from a file.
|
static TreeTaggerModel |
readModel(java.io.InputStream aInputStream,
java.lang.String aCharsetName)
Read a model.
|
static TreeTaggerModel |
readModel(java.net.URL aUrl,
java.lang.String aCharsetName)
Read a model from an URL.
|
public static java.util.List<java.lang.String> getTagset(java.io.File aModelFile,
java.lang.String aCharsetName)
throws java.io.IOException
aModelFile - the model file.aCharsetName - the model encoding (optional).java.io.IOException - if an I/O error occurs.public static java.util.List<java.lang.String> getTagset(java.io.InputStream aInputStream,
java.lang.String aCharsetName)
throws java.io.IOException
aInputStream - the model file.aCharsetName - the model encoding (optional).java.io.IOException - if an I/O error occurs.public static TreeTaggerModel readModel(java.io.File aFile, java.lang.String aCharsetName) throws java.io.IOException
aFile - the file to load the model from. Supports gzipped models when the file name ends
in ".gz".aCharsetName - the model encoding (optional).java.io.IOException - if an I/O error occurs.public static TreeTaggerModel readModel(java.net.URL aUrl, java.lang.String aCharsetName) throws java.io.IOException
aUrl - the URL to load the model from. Supports gzipped models when the URL ends in
".gz".aCharsetName - the model encoding (optional).java.io.IOException - if an I/O error occurs.public static TreeTaggerModel readModel(java.io.InputStream aInputStream, java.lang.String aCharsetName) throws java.io.IOException
aInputStream - the stream to read the model from. The stream is not closed after
reading.aCharsetName - the model encoding (optional).java.io.IOException - if an I/O error occurs.Copyright © 2014. All Rights Reserved.