Package com.gengoai.hermes.format
Class POSFormat
- java.lang.Object
-
- com.gengoai.hermes.format.WholeFileTextFormat
-
- com.gengoai.hermes.format.POSFormat
-
- All Implemented Interfaces:
DocFormat
,OneDocPerFileFormat
,Serializable
public class POSFormat extends WholeFileTextFormat implements OneDocPerFileFormat, Serializable
Format Name: pos
Format with words separated by whitespace and POS tags appended with an underscore, e.g. The_DT brown_JJ.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
POSFormat.Provider
The type Provider.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DocFormatParameters
getParameters()
protected Stream<Document>
readSingleFile(String content)
Converts the content of an entire file into one ore more documents.void
write(Document document, Resource outputResource)
Writes the given document in this format to the given output resource.-
Methods inherited from class com.gengoai.hermes.format.WholeFileTextFormat
read
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.gengoai.hermes.format.OneDocPerFileFormat
write
-
-
-
-
Method Detail
-
getParameters
public DocFormatParameters getParameters()
- Specified by:
getParameters
in interfaceDocFormat
- Returns:
- the
DocFormatParameters
set for the instance of this foramt
-
readSingleFile
protected Stream<Document> readSingleFile(String content)
Description copied from class:WholeFileTextFormat
Converts the content of an entire file into one ore more documents.- Specified by:
readSingleFile
in classWholeFileTextFormat
- Parameters:
content
- the content- Returns:
- the stream of documents.
-
write
public void write(Document document, Resource outputResource) throws IOException
Description copied from interface:DocFormat
Writes the given document in this format to the given output resource.- Specified by:
write
in interfaceDocFormat
- Parameters:
document
- the documentoutputResource
- the output resource- Throws:
IOException
- Something went wrong writing the document
-
-