public final class LanguageDetectionUtilities extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addDetectedLanguagesToDocument(LanguageDetectorResult detectorResult,
com.hpe.caf.worker.document.model.Document document) |
static void |
addDetectedLanguagesToDocument(LanguageDetectorResult detectorResult,
com.hpe.caf.worker.document.model.Document document,
String fieldName) |
static void |
addDetectedLanguageToDocument(LanguageDetectorResult detectorResult,
com.hpe.caf.worker.document.model.Document document,
com.hpe.caf.worker.document.model.Field sourceDataField,
LanguageDetectionResultFormat resultFormat,
boolean inMultiFieldMode)
Updates the passed
document with the language detection result passed in detectorResult. |
static SequenceInputStream |
getFieldValuesAsStreams(com.hpe.caf.worker.document.model.Field sourceDataField) |
static void |
outputDocumentFieldValueChanges(com.hpe.caf.worker.document.model.Document document) |
public static SequenceInputStream getFieldValuesAsStreams(com.hpe.caf.worker.document.model.Field sourceDataField) throws RuntimeException
RuntimeExceptionpublic static void addDetectedLanguagesToDocument(LanguageDetectorResult detectorResult, com.hpe.caf.worker.document.model.Document document)
public static void addDetectedLanguagesToDocument(LanguageDetectorResult detectorResult, com.hpe.caf.worker.document.model.Document document, String fieldName)
public static void outputDocumentFieldValueChanges(com.hpe.caf.worker.document.model.Document document)
public static void addDetectedLanguageToDocument(LanguageDetectorResult detectorResult, com.hpe.caf.worker.document.model.Document document, com.hpe.caf.worker.document.model.Field sourceDataField, LanguageDetectionResultFormat resultFormat, boolean inMultiFieldMode) throws RuntimeException
document with the language detection result passed in detectorResult.detectorResult - result of performing language detection. Cannot be null.document - the document to update with result of language detection. Cannot be null.sourceDataField - the field that language detection was ran against. Depending on the values of resultFormat and
inMultiFieldMode this may be used in the output field name. Cannot be null.resultFormat - whether the result fields should be output in simple or complex format. If set to COMPLEX then
inMultiFieldMode has no effect on output fields. Cannot be null.inMultiFieldMode - whether the language detection was ran in multi-field mode. This will effect the fields output but only if
resultFormat is set to LanguageDetectionResultFormat.SIMPLE.RuntimeException - if detectorResult, document or sourceDataField is null.Copyright © 2015–2021 EntIT Software LLC, a Micro Focus company. All rights reserved.