Class FormatUtil
java.lang.Object
opennlp.tools.formats.FormatUtil
Utility class for the OpenNLP formats package.
Note: Do not use this class, internal use only!
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheckInputFile(String name, File inFile) Check that the given input file is valid.static opennlp.tools.util.InputStreamFactorycreateInputStreamFactory(File file)
-
Constructor Details
-
FormatUtil
public FormatUtil()
-
-
Method Details
-
createInputStreamFactory
-
checkInputFile
Check that the given input file is valid.To pass the test it must:
- exist
- not be a directory,
- and be accessibly.- Parameters:
name- the name which is used to refer to the file in an error message, it should start with a capital letter.inFile- the particularFileto check to qualify an input file- Throws:
opennlp.tools.cmdline.TerminateToolException- if test does not pass this exception is thrown and an error message is printed to the console.
-