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