|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectnet.moraleboost.junsai.tagger.Tagger
public class Tagger
形態素解析器クラス Dictionary, CharProperty, Connectorは、複数のスレッドから 安全に共有できる。Taggerは、スレッドごとに別のインスタンスを 構築する必要がある。
コンストラクタの概要 | |
---|---|
Tagger(Tagger tagger)
他のインスタンスの辞書を流用して形態素解析器を構築する。 |
|
Tagger(TaggerConfig config)
configを参照して、形態素解析器を構築する。 |
|
Tagger(TaggerConfig config,
Dictionary[] dictionaries,
Dictionary unknownDictionary,
Connector connector,
CharProperty charProperty)
既存の辞書インスタンスを流用して形態素解析器を構築する。 |
メソッドの概要 | |
---|---|
protected CharProperty |
getCharProperty()
|
protected TaggerConfig |
getConfig()
|
protected Connector |
getConnector()
|
protected Dictionary[] |
getDictionaries()
|
protected Dictionary |
getUnknownDictionary()
|
Node |
nextNBestNode()
次のNBest解ノードを取得する。 |
static CharProperty |
openCharProperty(TaggerConfig config)
configを参照し、文字カテゴリ定義を開いて返す。 |
static Connector |
openConnector(TaggerConfig config)
configを参照し、接続コスト行列を開いて返す。 |
static Dictionary[] |
openDictionaries(TaggerConfig config)
configを参照し、Dictionaryを新しく開いて返す。 |
static Dictionary |
openUnknownDictionary(TaggerConfig config)
configを参照し、未知語辞書を開いて返す。 |
java.lang.String |
parse(java.lang.CharSequence str,
int offset,
int len)
strを解析して、その結果を文字列として返す。 |
void |
parse(java.lang.CharSequence str,
int offset,
int len,
java.lang.Appendable out)
strを解析して、その結果をoutに書き込む |
java.lang.String |
parseNBest(int N,
java.lang.CharSequence str,
int offset,
int len)
strを解析し、N-best解を文字列として返す。 |
void |
parseNBest(int N,
java.lang.CharSequence str,
int offset,
int len,
java.lang.Appendable out)
strを解析し、N-best解をoutに書き込む。 |
void |
parseNBestInit(java.lang.CharSequence str,
int offset,
int len)
strを解析し、N-best解を得る準備をする。 |
Node |
parseToNode(java.lang.CharSequence str,
int offset,
int len)
strを解析して、解析結果のノードを返す。 |
void |
reset(TaggerConfig config,
Dictionary[] dictionaries,
Dictionary unknownDictionary,
Connector connector,
CharProperty charProperty)
|
クラス java.lang.Object から継承されたメソッド |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
---|
public Tagger(TaggerConfig config) throws TaggerException, DictionaryException, java.io.IOException
config
-
TaggerException
DictionaryException
java.io.IOException
public Tagger(TaggerConfig config, Dictionary[] dictionaries, Dictionary unknownDictionary, Connector connector, CharProperty charProperty) throws TaggerException, DictionaryException
config
- dictionaries
- unknownDictionary
- connector
- charProperty
-
TaggerException
DictionaryException
public Tagger(Tagger tagger) throws TaggerException, DictionaryException
tagger
-
TaggerException
DictionaryException
メソッドの詳細 |
---|
protected TaggerConfig getConfig()
protected Dictionary[] getDictionaries()
protected Dictionary getUnknownDictionary()
protected Connector getConnector()
protected CharProperty getCharProperty()
public void reset(TaggerConfig config, Dictionary[] dictionaries, Dictionary unknownDictionary, Connector connector, CharProperty charProperty) throws TaggerException, DictionaryException
TaggerException
DictionaryException
public java.lang.String parse(java.lang.CharSequence str, int offset, int len) throws TaggerException
str
- 解析対象テキストoffset
- str内での解析開始位置len
- offsetからの長さ
TaggerException
public void parse(java.lang.CharSequence str, int offset, int len, java.lang.Appendable out) throws TaggerException
str
- 解析対象テキストoffset
- str内での解析開始位置len
- offsetからの長さout
- 解析結果を書きこむオブジェクト
TaggerException
public Node parseToNode(java.lang.CharSequence str, int offset, int len) throws TaggerException
str
- 解析対象テキストoffset
- str内での解析開始位置len
- offsetからの長さ
TaggerException
public void parseNBestInit(java.lang.CharSequence str, int offset, int len) throws TaggerException
nextNBestNode()
を呼び出すことにより、
順次取得できる。
str
- 解析対象テキストoffset
- str内での解析開始位置len
- offsetからの長さ
TaggerException
public java.lang.String parseNBest(int N, java.lang.CharSequence str, int offset, int len) throws TaggerException
N
- str
- offset
- len
-
TaggerException
public void parseNBest(int N, java.lang.CharSequence str, int offset, int len, java.lang.Appendable out) throws TaggerException
N
- str
- offset
- len
- out
-
TaggerException
public Node nextNBestNode()
public static Dictionary[] openDictionaries(TaggerConfig config) throws DictionaryException, java.io.IOException
config
-
DictionaryException
java.io.IOException
public static Dictionary openUnknownDictionary(TaggerConfig config) throws DictionaryException, java.io.IOException
config
-
DictionaryException
java.io.IOException
public static Connector openConnector(TaggerConfig config) throws DictionaryException, java.io.IOException
config
-
DictionaryException
java.io.IOException
public static CharProperty openCharProperty(TaggerConfig config) throws DictionaryException, java.io.IOException
config
-
DictionaryException
java.io.IOException
|
|||||||||
前のクラス 次のクラス | フレームあり フレームなし | ||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |