パッケージ nlp4j.impl

クラス DefaultKeywordWithDependency

    • コンストラクタの詳細

      • DefaultKeywordWithDependency

        public DefaultKeywordWithDependency()
        導入されたバージョン:
        1.3.1
      • DefaultKeywordWithDependency

        public DefaultKeywordWithDependency​(int begin,
                                            int end,
                                            String facet,
                                            String lex,
                                            String str)
        パラメータ:
        begin - 開始位置
        end - 終了位置
        facet - ファセット
        lex - 正規形
        str - 表出文字
      • DefaultKeywordWithDependency

        public DefaultKeywordWithDependency​(String namespace,
                                            int begin,
                                            int end,
                                            String facet,
                                            String lex,
                                            String str)
        パラメータ:
        namespace - 名前空間
        begin - 開始位置
        end - 終了位置
        facet - ファセット
        lex - 正規形
        str - 表出文字
        導入されたバージョン:
        1.3.1
      • DefaultKeywordWithDependency

        public DefaultKeywordWithDependency​(String namespace,
                                            int begin,
                                            int end,
                                            String facet,
                                            String lex,
                                            String str,
                                            String relation)
        パラメータ:
        namespace - 名前空間
        begin - 開始位置
        end - 終了位置
        facet - ファセット
        lex - 正規形
        str - 表出文字
        relation - 係り受けの関係
        導入されたバージョン:
        1.3.1
    • メソッドの詳細

      • addChild

        public void addChild​(KeywordWithDependency keyword)
        インタフェースからコピーされた説明: KeywordWithDependency
        依存関係の子ノードを追加します。子ノードには親ノードへの依存関係がセットされます。
        Add a child keyword. A parent keyword is set to child keyword.
        定義:
        addChild インタフェース内 KeywordWithDependency
        パラメータ:
        keyword - キーワード
      • addChildOnly

        public void addChildOnly​(KeywordWithDependency keyword)
        インタフェースからコピーされた説明: KeywordWithDependency
        依存関係の子ノードを追加します。子ノードには親ノードへの依存関係はセットされません。
        Add a child keywod without set a parent to child keyword.
        定義:
        addChildOnly インタフェース内 KeywordWithDependency
        パラメータ:
        keyword - キーワード
      • asList

        public List<KeywordWithDependency> asList()
        インタフェースからコピーされた説明: KeywordWithDependency
        依存関係のあるキーワードをリストとして返します。
        Return keywords as a list from dependency keywords.
        定義:
        asList インタフェース内 KeywordWithDependency
        戻り値:
        依存関係のあるキーワード
      • equals

        public boolean equals​(Object obj)
        オーバーライド:
        equals クラス内 DefaultKeyword
        戻り値:
        true (Check for lex, facet)
      • getDependencyKey

        public String getDependencyKey()
        戻り値:
        この依存関係をあらわす文字列キー
      • getDepth

        public int getDepth()
        インタフェースからコピーされた説明: KeywordWithDependency
        もっとも親の位置にあるキーワード(ルートキーワード)からの深さの位置を返します。
        定義:
        getDepth インタフェース内 KeywordWithDependency
        戻り値:
        キーワードの深さ
      • getParent

        public KeywordWithDependency getParent​(int depth)
        インタフェースからコピーされた説明: KeywordWithDependency
        階層の数を指定して親の依存関係のあるキーワードを返します。例えば2の場合、2段階親のキーワードを返します。
        定義:
        getParent インタフェース内 KeywordWithDependency
        パラメータ:
        depth - 深さ
        戻り値:
        キーワード
      • getRoot

        public KeywordWithDependency getRoot()
        インタフェースからコピーされた説明: KeywordWithDependency
        親の依存関係にあるキーワードで最も親(ルート)に位置するキーワードを返します。このキーワードが最も親のキーワードである場合 null を返します。
        定義:
        getRoot インタフェース内 KeywordWithDependency
        戻り値:
        キーワード
      • hasChild

        public boolean hasChild()
        インタフェースからコピーされた説明: KeywordWithDependency
        子の依存関係にあるキーワードがあるかどうかを返します。
        定義:
        hasChild インタフェース内 KeywordWithDependency
        戻り値:
        子の依存関係にあるキーワードがあるかどうか
      • hasParent

        public boolean hasParent()
        インタフェースからコピーされた説明: KeywordWithDependency
        親の依存関係にあるキーワードがあるかどうかを返します。
        定義:
        hasParent インタフェース内 KeywordWithDependency
        戻り値:
        親の依存関係にあるキーワードがあるかどうか
      • isRoot

        public boolean isRoot()
        インタフェースからコピーされた説明: KeywordWithDependency
        最も親の依存関係にあるキーワードを返します。このキーワードが最も親の場合 null を返します。
        定義:
        isRoot インタフェース内 KeywordWithDependency
        戻り値:
        最も親の依存関係にあるキーワード
      • setDependencyKey

        public void setDependencyKey​(String dependencyKey)
        パラメータ:
        dependencyKey - この依存関係をあらわす文字列キー
      • setParent

        public void setParent​(KeywordWithDependency parent)
        インタフェースからコピーされた説明: KeywordWithDependency
        親の依存関係にあるキーワードをセットします。親のキーワードにはこのキーワードが子キーワードとしてセットされます。
        定義:
        setParent インタフェース内 KeywordWithDependency
        パラメータ:
        parent - 親の依存関係にあるキーワード
      • setParentOnly

        public void setParentOnly​(KeywordWithDependency parent)
        インタフェースからコピーされた説明: KeywordWithDependency
        親の依存関係にあるキーワードをセットします。親のキーワードにはこのキーワードが子キーワードとしてセットされません。
        定義:
        setParentOnly インタフェース内 KeywordWithDependency
        パラメータ:
        parent - 親の依存関係にあるキーワード
      • toStringAsXml

        public String toStringAsXml()
        インタフェースからコピーされた説明: KeywordWithDependency
        キーワードの依存関係をXML形式の文字列で表現します。
        定義:
        toStringAsXml インタフェース内 KeywordWithDependency
        戻り値:
        キーワードの依存関係
      • toStringAsXml

        public String toStringAsXml​(int depth)
        インタフェースからコピーされた説明: KeywordWithDependency
        階層を指定してキーワードの依存関係をXML形式の文字列で表現します。
        定義:
        toStringAsXml インタフェース内 KeywordWithDependency
        パラメータ:
        depth - このオブジェクトの階層の深さ
        戻り値:
        文字列