Class Token
Analyzed token with morphological data from its dictionary.
Inheritance
Inherited Members
Namespace: Lucene.Net.Analysis.Ja
Assembly: Lucene.Net.Analysis.Kuromoji.dll
Syntax
public class Token
Constructors
| Improve this Doc View SourceToken(Int32, Char[], Int32, Int32, JapaneseTokenizerType, Int32, IDictionary)
Declaration
public Token(int wordId, char[] surfaceForm, int offset, int length, JapaneseTokenizerType type, int position, IDictionary dictionary)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | wordId | |
System.Char[] | surfaceForm | |
System.Int32 | offset | |
System.Int32 | length | |
JapaneseTokenizerType | type | |
System.Int32 | position | |
IDictionary | dictionary |
Properties
| Improve this Doc View SourceLength
length of surfaceForm
Declaration
public virtual int Length { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Offset
offset into surfaceForm
Declaration
public virtual int Offset { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Position
Get index of this token in input text. Returns position of token.
Declaration
public virtual int Position { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
PositionLength
Gets or Sets the length (in tokens) of this token. For normal tokens this is 1; for compound tokens it's > 1.
Declaration
public virtual int PositionLength { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SurfaceForm
surfaceForm
Declaration
public virtual char[] SurfaceForm { get; }
Property Value
Type | Description |
---|---|
System.Char[] |
Methods
| Improve this Doc View SourceGetBaseForm()
base form or null
if token is not inflected
Declaration
public virtual string GetBaseForm()
Returns
Type | Description |
---|---|
System.String | base form or |
GetInflectionForm()
inflection form or null
Declaration
public virtual string GetInflectionForm()
Returns
Type | Description |
---|---|
System.String | inflection form or |
GetInflectionType()
inflection type or null
Declaration
public virtual string GetInflectionType()
Returns
Type | Description |
---|---|
System.String | inflection type or |
GetPartOfSpeech()
part of speech.
Declaration
public virtual string GetPartOfSpeech()
Returns
Type | Description |
---|---|
System.String | part of speech. |
GetPronunciation()
pronunciation. null
if token doesn't have pronunciation.
Declaration
public virtual string GetPronunciation()
Returns
Type | Description |
---|---|
System.String | pronunciation. |
GetReading()
reading. null
if token doesn't have reading.
Declaration
public virtual string GetReading()
Returns
Type | Description |
---|---|
System.String | reading. |
GetSurfaceFormString()
surfaceForm as a String
Declaration
public virtual string GetSurfaceFormString()
Returns
Type | Description |
---|---|
System.String | surfaceForm as a String |
IsKnown()
Returns true
if this token is known word.
Declaration
public virtual bool IsKnown()
Returns
Type | Description |
---|---|
System.Boolean |
|
IsUnknown()
Returns true
if this token is unknown word.
Declaration
public virtual bool IsUnknown()
Returns
Type | Description |
---|---|
System.Boolean |
|
IsUser()
Returns true
if this token is defined in user dictionary.
Declaration
public virtual bool IsUser()
Returns
Type | Description |
---|---|
System.Boolean |
|
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String |