org.apache.solr.update.processor
Class LangDetectLanguageIdentifierUpdateProcessor
java.lang.Object
org.apache.solr.update.processor.UpdateRequestProcessor
org.apache.solr.update.processor.LanguageIdentifierUpdateProcessor
org.apache.solr.update.processor.LangDetectLanguageIdentifierUpdateProcessor
- All Implemented Interfaces:
- LangIdParams
public class LangDetectLanguageIdentifierUpdateProcessor
- extends LanguageIdentifierUpdateProcessor
Identifies the language of a set of input fields using http://code.google.com/p/language-detection
See http://wiki.apache.org/solr/LanguageDetection
- Since:
- 3.5
Fields inherited from class org.apache.solr.update.processor.LanguageIdentifierUpdateProcessor |
allMapFieldsSet, docIdField, enabled, enableMapping, enforceSchema, fallbackFields, fallbackValue, inputFields, langField, langPattern, langsField, langWhitelist, lcMap, log, mapFields, mapIndividual, mapIndividualFieldsSet, mapKeepOrig, mapOverwrite, mapPattern, mapReplaceStr, overwrite, schema, threshold, tikaSimilarityPattern |
Fields inherited from interface org.apache.solr.update.processor.LangIdParams |
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, 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, OVERWRITE, THRESHOLD |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LangDetectLanguageIdentifierUpdateProcessor
public LangDetectLanguageIdentifierUpdateProcessor(SolrQueryRequest req,
SolrQueryResponse rsp,
UpdateRequestProcessor next)
detectLanguage
protected List<DetectedLanguage> detectLanguage(String content)
- Description copied from class:
LanguageIdentifierUpdateProcessor
- Detects language(s) from a string.
Classes wishing to implement their own language detection module should override this method.
- Specified by:
detectLanguage
in class LanguageIdentifierUpdateProcessor
- Parameters:
content
- The content to identify
- Returns:
- List of detected language(s) according to RFC-3066
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.