Package org.apache.lucene.analysis.ja

# Class Token

java.lang.Object
org.apache.lucene.analysis.morph.Token
org.apache.lucene.analysis.ja.Token

public class Token extends Token
Analyzed token with morphological data from its dictionary.

## Field Summary

### Fields inherited from class org.apache.lucene.analysis.morph.Token

`endOffset, length, offset, posIncr, posLen, startOffset, surfaceForm, type`

## Constructor Summary

Constructors
Constructor
Description
`Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset, int morphId, TokenType type, JaMorphData morphData)`

## Method Summary

Modifier and Type
Method
Description
`String`
`getBaseForm()`
`String`
`getInflectionForm()`
`String`
`getInflectionType()`
`String`
`getPartOfSpeech()`
`String`
`getPronunciation()`
`String`
`getReading()`
`boolean`
`isKnown()`
Returns true if this token is known word
`boolean`
`isUnknown()`
Returns true if this token is unknown word
`boolean`
`isUser()`
Returns true if this token is defined in user dictionary
`String`
`toString()`

### Methods inherited from class org.apache.lucene.analysis.morph.Token

`getEndOffset, getLength, getOffset, getPositionIncrement, getPositionLength, getStartOffset, getSurfaceForm, getSurfaceFormString, getType, setPositionIncrement, setPositionLength`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Constructor Details

### Token

public Token(char[] surfaceForm, int offset, int length, int startOffset, int endOffset, int morphId, TokenType type, JaMorphData morphData)

## Method Details

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### getReading

public String getReading()

Returns:
  reading. null if token doesn't have reading.

### getPronunciation

public String getPronunciation()

Returns:
  pronunciation. null if token doesn't have pronunciation.

### getPartOfSpeech

public String getPartOfSpeech()

Returns:
  part of speech.

### getInflectionType

public String getInflectionType()

Returns:
  inflection type or null

### getInflectionForm

public String getInflectionForm()

Returns:
  inflection form or null

### getBaseForm

public String getBaseForm()

Returns:
  base form or null if token is not inflected

### isKnown

public boolean isKnown()
Returns true if this token is known word

Returns:
  true if this token is in standard dictionary. false if not.

### isUnknown

public boolean isUnknown()
Returns true if this token is unknown word

Returns:
  true if this token is unknown word. false if not.

### isUser

public boolean isUser()
Returns true if this token is defined in user dictionary

Returns:
  true if this token is in user dictionary. false if not.