Class MascDocumentStream

java.lang.Object
opennlp.tools.formats.masc.MascDocumentStream
All Implemented Interfaces:
AutoCloseable, ObjectStream<MascDocument>

public class MascDocumentStream extends Object implements ObjectStream<MascDocument>
  • Constructor Details

    • MascDocumentStream

      public MascDocumentStream(File mascCorpusDirectory) throws IOException
      Throws:
      IOException
    • MascDocumentStream

      public MascDocumentStream(File mascCorpusDirectory, boolean searchRecursive, FileFilter fileFilter) throws IOException
      Creates a MascDocumentStream to read the documents from a given directory. Works iff all annotation files mentioned in the headers are present.
      Parameters:
      mascCorpusDirectory - the directory containing all the MASC files
      searchRecursive - whether the search should go through subdirectories
      fileFilter - a custom file filter to filter out some files or null to accept anything
      Throws:
      IOException - if any stage of the stream creation fails
  • Method Details