public class OpenNLPLangDetectUpdateProcessor extends LanguageIdentifierUpdateProcessor
See "Language Detector" section of https://opennlp.apache.org/docs/1.8.3/manual/opennlp.html
allMapFieldsSet, docIdField, enabled, enableMapping, enforceSchema, fallbackFields, fallbackValue, inputFields, langField, langPattern, langsField, langWhitelist, lcMap, mapFields, mapIndividual, mapIndividualFieldsSet, mapKeepOrig, mapLcMap, mapOverwrite, mapPattern, mapReplaceStr, maxFieldValueChars, maxTotalChars, overwrite, schema, threshold, tikaSimilarityPattern
next
DOCID_FIELD_DEFAULT, DOCID_LANGFIELD_DEFAULT, DOCID_LANGSFIELD_DEFAULT, DOCID_PARAM, DOCID_THRESHOLD_DEFAULT, ENFORCE_SCHEMA, FALLBACK, FALLBACK_FIELDS, FIELDS_PARAM, LANG_FIELD, LANG_WHITELIST, LANGS_FIELD, LANGUAGE_ID, LCMAP, MAP_ENABLE, MAP_FL, MAP_INDIVIDUAL, MAP_INDIVIDUAL_FL, MAP_KEEP_ORIG, MAP_LCMAP, MAP_OVERWRITE, MAP_PATTERN, MAP_PATTERN_DEFAULT, MAP_REPLACE, MAP_REPLACE_DEFAULT, MAX_FIELD_VALUE_CHARS, MAX_FIELD_VALUE_CHARS_DEFAULT, MAX_TOTAL_CHARS, MAX_TOTAL_CHARS_DEFAULT, OVERWRITE, THRESHOLD
Constructor and Description |
---|
OpenNLPLangDetectUpdateProcessor(SolrQueryRequest req,
SolrQueryResponse rsp,
UpdateRequestProcessor next,
opennlp.tools.langdetect.LanguageDetectorModel model) |
Modifier and Type | Method and Description |
---|---|
protected List<DetectedLanguage> |
detectLanguage(Reader solrDocReader)
Detects language(s) from a reader, typically based on some fields in SolrInputDocument
Classes wishing to implement their own language detection module should override this method.
|
concatFields, detectLanguage, getMappedField, isEnabled, normalizeLangCode, process, processAdd, resolveLanguage, resolveLanguage, setEnabled, solrDocReader
close, doClose, finish, processCommit, processDelete, processMergeIndexes, processRollback
public OpenNLPLangDetectUpdateProcessor(SolrQueryRequest req, SolrQueryResponse rsp, UpdateRequestProcessor next, opennlp.tools.langdetect.LanguageDetectorModel model)
protected List<DetectedLanguage> detectLanguage(Reader solrDocReader)
LanguageIdentifierUpdateProcessor
detectLanguage
in class LanguageIdentifierUpdateProcessor
solrDocReader
- A reader serving the text from the document to detectCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.