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
関連項目:
直列化された形式

フィールドの概要
 
クラス net.trialpc.sticktools.model.WrapModel から継承されたフィールド
listeners
 
コンストラクタの概要
LocalContextDocument(java.lang.String id)
          文書 ID を指定して、LocalContextDocument クラスのインスタンスを生成します。
 
メソッドの概要
 WrapModel<T> getLocalContextModel(java.lang.String sid)
          局所的文脈モデルを返します。
 void setDefinitionOfLocalContext(int before, int after)
          局所的文脈モデルの範囲を設定します。
 
クラス net.trialpc.sticktools.model.SentenceWrappedDocument から継承されたメソッド
addSentence, addSentenceAll, containsSentence, getSentence
 
クラス net.trialpc.sticktools.model.WrapDocument から継承されたメソッド
compareTo, getChildrenModels, getDocumentId, iterator
 
クラス net.trialpc.sticktools.model.WrapModel から継承されたメソッド
addChildModel, addChildModelAll, addListener, castCollection, equals, getVocabulary, hashCode, isModifiable, numOfTerms, stateChanged, termCount
 
クラス net.trialpc.sticktools.model.AbstractLangModel から継承されたメソッド
containsTerm, containsTerms, contaisQueries, numOfVocabulary, termFrequency, toString
 
クラス java.lang.Object から継承されたメソッド
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
インタフェース net.trialpc.sticktools.model.LangModel から継承されたメソッド
containsTerm, containsTerms, getVocabulary, isModifiable, numOfTerms, numOfVocabulary, termCount, termFrequency
 
インタフェース net.trialpc.sticktools.model.StateChangeObservable から継承されたメソッド
addListener
 

コンストラクタの詳細

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)
局所的文脈モデルを返します。 sidnull の場合は、空の言語モデルを返します。

パラメータ:
sid - 局所的文脈モデルに対応する文 ID
戻り値:
局所的文脈を示す言語モデル