public final class Util extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
close(Closeable aClosable)
Close the given
Closeable. |
static List<String> |
getSearchPaths(List<String> aAdditionalPaths,
String aSubPath)
Get the search paths for a model or executable.
|
static String |
join(Collection<String> aStrings,
String aSeparator)
Join the given strings into a single string separated by the given
separator.
|
static String |
join(String[] aStrings,
String aSeparator)
Join the given strings into a single string separated by the given
separator.
|
static boolean |
matches(String tokenSent,
String tokenReturned)
Checks if a token returned by TreeTagger corresponds to the token sent to TreeTagger.
|
protected static String |
readFile(File aFile,
String aEncoding)
For tests only.
|
protected static String[] |
tokenize(String aText,
Locale aLocale)
For tests only.
|
protected static void |
writeFile(String aText,
File aFile,
String aEncoding)
For tests only.
|
public static List<String> getSearchPaths(List<String> aAdditionalPaths, String aSubPath)
aSubPath
argument, executables and models can be searched for in different
locations, e.g. executables in executable and models in
models.
aAdditionalPaths - additional paths to search in.aSubPath - search in the given sub-directory of the search paths.public static String join(String[] aStrings, String aSeparator)
aStrings - strings to join.aSeparator - a separator.public static String join(Collection<String> aStrings, String aSeparator)
aStrings - strings to join.aSeparator - a separator.public static boolean matches(String tokenSent, String tokenReturned)
tokenSent - token sent to TreeTaggertokenReturned - token returned from TreeTaggerpublic static void close(Closeable aClosable)
Closeable.aClosable - a closable object.protected static String readFile(File aFile, String aEncoding) throws IOException
IOExceptionprotected static void writeFile(String aText, File aFile, String aEncoding) throws IOException
IOExceptionCopyright © 2014. All Rights Reserved.