Tabnine Logo
Word.getType
Code IndexAdd Tabnine to your IDE (free)

How to use
getType
method
in
com.chenlb.mmseg4j.Word

Best Java code snippets using com.chenlb.mmseg4j.Word.getType (Showing top 4 results out of 315)

origin: medcl/elasticsearch-analysis-mmseg

  @Override
  public final boolean incrementToken() throws IOException {
    clearAttributes();
    Word word = mmSeg.get().next();
    if(word != null) {
      //lucene 3.0
      //termAtt.setTermBuffer(word.getSen(), word.getWordOffset(), word.getLength());
      //lucene 3.1
      termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
      offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
      typeAtt.setType(word.getType());
      return true;
    } else {
      end();
      return false;
    }
  }
}
origin: chenlb/mmseg4j-solr

  @Override
  public final boolean incrementToken() throws IOException {
    clearAttributes();
    Word word = mmSeg.next();
    if(word != null) {
      termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
      offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
      typeAtt.setType(word.getType());
      return true;
    } else {
      return false;
    }
  }
}
origin: com.chenlb.mmseg4j/mmseg4j-solr

  @Override
  public final boolean incrementToken() throws IOException {
    clearAttributes();
    Word word = mmSeg.next();
    if(word != null) {
      termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
      offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
      typeAtt.setType(word.getType());
      return true;
    } else {
      return false;
    }
  }
}
origin: org.tinygroup/org.tinygroup.mmseg4j

@Override
public final boolean incrementToken() throws IOException {
  clearAttributes();
  Word word = mmSeg.next();
  if (word != null) {
    //lucene 3.0
    //termAtt.setTermBuffer(word.getSen(), word.getWordOffset(), word.getLength());
    //lucene 3.1
    termAtt.copyBuffer(word.getSen(), word.getWordOffset(), word.getLength());
    offsetAtt.setOffset(word.getStartOffset(), word.getEndOffset());
    typeAtt.setType(word.getType());
    return true;
  } else {
    end();
    return false;
  }
}
com.chenlb.mmseg4jWordgetType

Popular methods of Word

  • getStartOffset
    此 word 在整个文本中的偏移位置
  • getString
  • getEndOffset
  • getLength
  • getSen
  • getWordOffset
    词在 char[] sen 的偏移位置
  • <init>
  • getDegree
  • setDegree

Popular in Java

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • requestLocationUpdates (LocationManager)
  • onRequestPermissionsResult (Fragment)
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JTable (javax.swing)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now