Class FormatUtil

java.lang.Object
opennlp.tools.formats.FormatUtil

@Internal public class FormatUtil extends Object
Utility class for the OpenNLP formats package.

Note: Do not use this class, internal use only!

  • Constructor Details

    • FormatUtil

      public FormatUtil()
  • Method Details

    • createInputStreamFactory

      public static opennlp.tools.util.InputStreamFactory createInputStreamFactory(File file)
    • checkInputFile

      public static void checkInputFile(String name, File inFile)
      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 particular File to 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.