Package opennlp.tools.formats.letsmt
Class LetsmtDocument
java.lang.Object
opennlp.tools.formats.letsmt.LetsmtDocument
A structure to hold the letsmt document. The documents contain sentences and depending on the
source it either contains tokenized text (words) or an un-tokenized sentence string.
The format specification can be found here.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAcontent handlerto receive and process SAX events.static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate final List<LetsmtDocument.LetsmtSentence> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateLetsmtDocument(List<LetsmtDocument.LetsmtSentence> sentences) -
Method Summary
Modifier and TypeMethodDescription(package private) static LetsmtDocument(package private) static LetsmtDocumentparse(InputStream letsmtXmlIn)
-
Field Details
-
ORG_XML_FEATURES_DISALLOW_DOCTYPE_DECL
- See Also:
-
sentences
-
-
Constructor Details
-
LetsmtDocument
-
-
Method Details
-
getSentences
- Returns:
- Retrieves the sentences of a
LetsmtDocument.
-
parse
- Parameters:
letsmtXmlIn- TheInputStreamreferencing the document to parse.- Returns:
- A valid
LetsmtDocumentinstance. - Throws:
IOException- Thrown if IO errors occurred during loading or parsing.
-
parse
- Parameters:
file- TheFilereferencing the document to parse.- Returns:
- A valid
LetsmtDocumentinstance. - Throws:
IOException- Thrown if IO errors occurred during loading or parsing.
-