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.TokenStreamCreate 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
-
-
Constructor Summary
Constructors Constructor Description MLTokenDuplicator(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl>buildIterator(org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl token)voidclose()voidend()booleanincrementToken()voidreset()-
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 Detail
-
MLTokenDuplicator
public MLTokenDuplicator(org.apache.lucene.analysis.TokenStream source, Locale locale, Reader reader, org.alfresco.repo.search.MLAnalysisMode mlAnalysisMode)
-
MLTokenDuplicator
public MLTokenDuplicator(Locale locale, org.alfresco.repo.search.MLAnalysisMode mlAnalysisMode)
- Parameters:
locale-mlAnalysisMode-
-
-
Method Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
reset
public void reset() throws IOException- Overrides:
resetin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
end
public void end() throws IOException- 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
public final boolean incrementToken() throws IOException- Specified by:
incrementTokenin classorg.apache.lucene.analysis.TokenStream- Throws:
IOException
-
-