Package org.tribuo.data.text.impl
Class CasingPreprocessor
java.lang.Object
org.tribuo.data.text.impl.CasingPreprocessor
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.config.Configurable
,com.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
,DocumentPreprocessor
A document preprocessor which uppercases or lowercases the input.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The possible casing operations. -
Constructor Summary
ConstructorDescriptionConstruct a casing preprocessor. -
Method Summary
Modifier and TypeMethodDescriptioncom.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance
processDoc
(String doc) Processes the content of part of a document stored as a string, returning a new string.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.oracle.labs.mlrg.olcut.config.Configurable
postConfig
-
Constructor Details
-
CasingPreprocessor
Construct a casing preprocessor.- Parameters:
op
- The operation to apply.
-
-
Method Details
-
processDoc
Description copied from interface:DocumentPreprocessor
Processes the content of part of a document stored as a string, returning a new string.- Specified by:
processDoc
in interfaceDocumentPreprocessor
- Parameters:
doc
- the document to process- Returns:
- the processed string. Note that the return value may be
null
, in which case the resulting string will be ignored.
-
getProvenance
public com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance getProvenance()- Specified by:
getProvenance
in interfacecom.oracle.labs.mlrg.olcut.provenance.Provenancable<com.oracle.labs.mlrg.olcut.provenance.ConfiguredObjectProvenance>
-