Package opennlp.tools.formats.irishsentencebank

# Class IrishSentenceBankDocument

java.lang.Object
opennlp.tools.formats.irishsentencebank.IrishSentenceBankDocument

public class IrishSentenceBankDocument extends Object
A structure to hold an Irish Sentence Bank document, which is a collection of tokenized sentences.

The sentence bank can be downloaded from this website.

It was originally published and described http://www.lexiconista.com/datasets/sentencebank-ga/, yet this page was gone when last checked in December 2022.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static class`
  `IrishSentenceBankDocument.IrishSentenceBankFlex`
  `static class`
  `IrishSentenceBankDocument.IrishSentenceBankSentence`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `IrishSentenceBankDocument()`
  Initializes an empty `IrishSentenceBankDocument`.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `add(IrishSentenceBankDocument.IrishSentenceBankSentence sent)`
  `List<IrishSentenceBankDocument.IrishSentenceBankSentence>`
  `getSentences()`
  `static IrishSentenceBankDocument`
  `parse(InputStream is)`
  Parses the data provided via an `InputStream` into a `IrishSentenceBankDocument`.

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### IrishSentenceBankDocument

    public IrishSentenceBankDocument()
    Initializes an empty `IrishSentenceBankDocument`.

- ## Method Details

  - ### add

    public void add(IrishSentenceBankDocument.IrishSentenceBankSentence sent)
    Parameters:
      `sent` - A `IrishSentenceBankDocument.IrishSentenceBankSentence` to be added.

  - ### getSentences

    public List<IrishSentenceBankDocument.IrishSentenceBankSentence> getSentences()
    Returns:
      Retrieves an unmodifiable list of all `sentences`.

  - ### parse

    public static IrishSentenceBankDocument parse(InputStream is) throws IOException
    Parses the data provided via an `InputStream` into a `IrishSentenceBankDocument`.
    Parameters:
      `is` - A valid, open `InputStream` ready for use.
    Returns:
      A valid `IrishSentenceBankDocument`.
    Throws:
      `IOException` - Thrown if IO errors occurred.