Class MLTokenDuplicator
java.lang.Object
org.apache.lucene.util.AttributeSource
org.apache.lucene.analysis.TokenStream
org.alfresco.repo.search.impl.lucene.analysis.MLTokenDuplicator
- All Implemented Interfaces:
Closeable,AutoCloseable
public class MLTokenDuplicator
extends org.apache.lucene.analysis.TokenStream
Create duplicate tokens for multilingual varients The forms are Tokens: Token - all languages {fr}Token - if a
language is specified {fr_CA}Token - if a language and country is specified {fr_CA_Varient}Token - for all three
{fr__Varient}Token - for a language varient with no country
- Author:
- andyh
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.lucene.util.AttributeSource
org.apache.lucene.util.AttributeSource.State -
Field Summary
Fields inherited from class org.apache.lucene.analysis.TokenStream
DEFAULT_TOKEN_ATTRIBUTE_FACTORY -
Constructor Summary
ConstructorsConstructorDescriptionMLTokenDuplicator(Locale locale, org.alfresco.repo.search.MLAnalysisMode mlAnalysisMode) MLTokenDuplicator(org.apache.lucene.analysis.TokenStream source, Locale locale, Reader reader, org.alfresco.repo.search.MLAnalysisMode mlAnalysisMode) -
Method Summary
Modifier and TypeMethodDescriptionIterator<org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl>buildIterator(org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl token) voidclose()voidend()final booleanvoidreset()Methods inherited from class org.apache.lucene.util.AttributeSource
addAttribute, addAttributeImpl, captureState, clearAttributes, cloneAttributes, copyTo, endAttributes, equals, getAttribute, getAttributeClassesIterator, getAttributeFactory, getAttributeImplsIterator, hasAttribute, hasAttributes, hashCode, reflectAsString, reflectWith, removeAllAttributes, restoreState, toString
-
Constructor Details
-
MLTokenDuplicator
-
MLTokenDuplicator
- Parameters:
locale-mlAnalysisMode-
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
reset
- Overrides:
resetin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
end
- Overrides:
endin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
buildIterator
public Iterator<org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl> buildIterator(org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl token) -
incrementToken
- Specified by:
incrementTokenin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-