パッケージ nlp4j.impl

クラス DefaultDocument

  • すべての実装されたインタフェース:
    Document

    public class DefaultDocument
    extends Object
    implements Document
    自然言語処理対象のドキュメントクラスです。
    Document class for NLP
    バージョン:
    1.0
    作成者:
    Hiroki Oya
    • コンストラクタの詳細

      • DefaultDocument

        public DefaultDocument()
        Default Constructor
        導入されたバージョン:
        1.1
      • DefaultDocument

        public DefaultDocument​(String text)
        パラメータ:
        text - Text of this document
        導入されたバージョン:
        1.3.3.0
    • メソッドの詳細

      • addKeyword

        public void addKeyword​(Keyword keyword)
        インタフェースからコピーされた説明: Document
        キーワードを追加します。
        Add Keyword.
        定義:
        addKeyword インタフェース内 Document
        パラメータ:
        keyword - キーワード
      • addKeywords

        public void addKeywords​(List<Keyword> kwds)
        インタフェースからコピーされた説明: Document
        複数キーワードを追加します。
        Add multiple Keywords.
        定義:
        addKeywords インタフェース内 Document
        パラメータ:
        kwds - keyword キーワード
      • getAttribute

        public Object getAttribute​(String key)
        インタフェースからコピーされた説明: Document
        属性を返します。
        Return Attribute value.
        定義:
        getAttribute インタフェース内 Document
        パラメータ:
        key - 属性のキー
        戻り値:
        属性の値
      • getAttributeAsString

        public String getAttributeAsString​(String key)
        インタフェースからコピーされた説明: Document
        属性を返します。
        Return Attribute value.
        定義:
        getAttributeAsString インタフェース内 Document
        パラメータ:
        key - of attribute
        戻り値:
        value
      • getAttributeAsDate

        public Date getAttributeAsDate​(String key)
        インタフェースからコピーされた説明: Document
        属性を返します。
        Return Attribute value.
        定義:
        getAttributeAsDate インタフェース内 Document
        パラメータ:
        key - 属性のキー
        戻り値:
        属性の値
      • getAttributeAsNumber

        public Number getAttributeAsNumber​(String key)
        インタフェースからコピーされた説明: Document
        属性を返します。
        Return Attribute value.
        定義:
        getAttributeAsNumber インタフェース内 Document
        パラメータ:
        key - 属性のキー
        戻り値:
        属性の値
      • getAttributeKeys

        public List<String> getAttributeKeys()
        インタフェースからコピーされた説明: Document
        属性のキーを返します。
        定義:
        getAttributeKeys インタフェース内 Document
        戻り値:
        Attribute Keys
      • getId

        public String getId()
        インタフェースからコピーされた説明: Document
        文書IDを返します。この値を用いてドキュメントを区別します。
        Return Document ID.
        定義:
        getId インタフェース内 Document
        戻り値:
        文書ID
      • getKeywords

        public List<Keyword> getKeywords()
        インタフェースからコピーされた説明: Document
        この文書のキーワードを返します。
        Return Keywords.
        定義:
        getKeywords インタフェース内 Document
        戻り値:
        キーワード
      • getKeywords

        public List<Keyword> getKeywords​(String facet)
        インタフェースからコピーされた説明: Document
        この文書のキーワードをファセットで指定して返します。
        Return keywords for a facet.
        定義:
        getKeywords インタフェース内 Document
        パラメータ:
        facet - ファセット
        戻り値:
        キーワード
      • getText

        public String getText()
        インタフェースからコピーされた説明: Document
        この文書のテキストを返します。
        Return Text.
        定義:
        getText インタフェース内 Document
        戻り値:
        テキスト
      • putAttribute

        public void putAttribute​(String key,
                                 Date value)
        インタフェースからコピーされた説明: Document
        この文書の属性をセットします。
        Set Attribute of this document.
        定義:
        putAttribute インタフェース内 Document
        パラメータ:
        key - 属性名
        value - 属性の値
      • putAttribute

        public void putAttribute​(String key,
                                 Number value)
        インタフェースからコピーされた説明: Document
        この文書の属性をセットします。
        Set Attribute of this document.
        定義:
        putAttribute インタフェース内 Document
        パラメータ:
        key - 属性名
        value - 属性の値
      • putAttribute

        public void putAttribute​(String key,
                                 Object object)
        インタフェースからコピーされた説明: Document
        この文書の属性をセットします。
        Set Attribute of this document.
        定義:
        putAttribute インタフェース内 Document
        パラメータ:
        key - 属性名
        object - 属性の値
      • putAttribute

        public void putAttribute​(String key,
                                 String value)
        インタフェースからコピーされた説明: Document
        この文書の属性をセットします。
        Set Attribute of this document.
        定義:
        putAttribute インタフェース内 Document
        パラメータ:
        key - 属性名
        value - 属性の値
      • remove

        public void remove​(String key)
        インタフェースからコピーされた説明: Document
        この文書の属性を削除します。
        Remove attribute of this document.
        定義:
        remove インタフェース内 Document
        パラメータ:
        key - キー
      • setId

        public void setId​(String id)
        インタフェースからコピーされた説明: Document
        この文書のIDをセットします。
        Set ID of this document.
        定義:
        setId インタフェース内 Document
        パラメータ:
        id - 文書のID
      • setKeywords

        public void setKeywords​(List<Keyword> keywords)
        インタフェースからコピーされた説明: Document
        この文書のキーワードをセットします。
        Set Keywords of this document.
        定義:
        setKeywords インタフェース内 Document
        パラメータ:
        keywords - キーワード
      • setText

        public void setText​(String text)
        インタフェースからコピーされた説明: Document
        この文書のテキストをセットします。
        Set text of this document.
        定義:
        setText インタフェース内 Document
        パラメータ:
        text - テキスト
      • removeKeyword

        public boolean removeKeyword​(Keyword kwd)
        インタフェースからコピーされた説明: Document
        キーワードを除去します。
        Remove keyword
        定義:
        removeKeyword インタフェース内 Document
        パラメータ:
        kwd - 除去するキーワード
      • removeFlaggedKeyword

        public boolean removeFlaggedKeyword()
        インタフェースからコピーされた説明: Document
        フラグが設定されたキーワードを削除する
        定義:
        removeFlaggedKeyword インタフェース内 Document
        戻り値:
        削除されたキーワードが存在するか