net.trialpc.sticktools.model
クラス LocalContextDocument<T extends SentenceModel>
java.lang.Object
net.trialpc.sticktools.model.AbstractLangModel
net.trialpc.sticktools.model.WrapModel<T>
net.trialpc.sticktools.model.WrapDocument<T>
net.trialpc.sticktools.model.SentenceWrappedDocument<T>
net.trialpc.sticktools.model.LocalContextDocument<T>
- 型パラメータ:
T
-
- すべての実装されたインタフェース:
- java.io.Serializable, java.lang.Comparable<DocumentModel>, java.lang.Iterable<T>, java.util.EventListener, DocumentModel, LangModel, StateChangeListener, StateChangeObservable
public class LocalContextDocument<T extends SentenceModel>
- extends SentenceWrappedDocument<T>
局所的文脈を提供することができる文書モデルです。
局所的文脈とは、いくつかの文モデルを結合した混合モデルのことを指します。
この実装では、getLocalContextModel(String)
で局所的文脈を取得することができます。
デフォルトでは、指定した文IDを持つ文モデルのみを含むモデルを返します。
その設定を変更したい場合は、setDefinitionOfLocalContext(int, int)
メソッドを呼び出してください。
- 作成者:
- tetsu
- 関連項目:
- 直列化された形式
コンストラクタの概要 |
LocalContextDocument(java.lang.String id)
文書 ID を指定して、LocalContextDocument クラスのインスタンスを生成します。 |
クラス net.trialpc.sticktools.model.WrapModel から継承されたメソッド |
addChildModel, addChildModelAll, addListener, castCollection, equals, getVocabulary, hashCode, isModifiable, numOfTerms, stateChanged, termCount |
クラス java.lang.Object から継承されたメソッド |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
LocalContextDocument
public LocalContextDocument(java.lang.String id)
- 文書 ID を指定して、
LocalContextDocument
クラスのインスタンスを生成します。
- パラメータ:
id
- 文書 ID
setDefinitionOfLocalContext
public void setDefinitionOfLocalContext(int before,
int after)
- 局所的文脈モデルの範囲を設定します。
- パラメータ:
before
- (範囲内)after
- (範囲内)
getLocalContextModel
public WrapModel<T> getLocalContextModel(java.lang.String sid)
- 局所的文脈モデルを返します。
sid
が null
の場合は、空の言語モデルを返します。
- パラメータ:
sid
- 局所的文脈モデルに対応する文 ID
- 戻り値:
- 局所的文脈を示す言語モデル