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

    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

    Modifier and Type
    Method
    Description
    Iterator<org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl>
    buildIterator(org.apache.lucene.analysis.tokenattributes.PackedTokenAttributeImpl token)
     
    void
     
    void
    end()
     
    final boolean
     
    void
     

    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

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • 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 Details

    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class org.apache.lucene.analysis.TokenStream
      Throws:
      IOException
    • reset

      public void reset() throws IOException
      Overrides:
      reset in class org.apache.lucene.analysis.TokenStream
      Throws:
      IOException
    • end

      public void end() throws IOException
      Overrides:
      end in class org.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:
      incrementToken in class org.apache.lucene.analysis.TokenStream
      Throws:
      IOException