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 emptyIrishSentenceBankDocument
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(IrishSentenceBankDocument.IrishSentenceBankSentence sent)
List<IrishSentenceBankDocument.IrishSentenceBankSentence>
getSentences()
static IrishSentenceBankDocument
parse(InputStream is)
Parses the data provided via anInputStream
into aIrishSentenceBankDocument
.
-
-
-
Constructor Detail
-
IrishSentenceBankDocument
public IrishSentenceBankDocument()
Initializes an emptyIrishSentenceBankDocument
.
-
-
Method Detail
-
add
public void add(IrishSentenceBankDocument.IrishSentenceBankSentence sent)
- Parameters:
sent
- AIrishSentenceBankDocument.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 anInputStream
into aIrishSentenceBankDocument
.- Parameters:
is
- A valid, openInputStream
ready for use.- Returns:
- A valid
IrishSentenceBankDocument
. - Throws:
IOException
- Thrown if IO errors occurred.
-
-