パッケージ nlp4j.impl
クラス DefaultKeywordWithDependency
- java.lang.Object
-
- nlp4j.impl.DefaultKeyword
-
- nlp4j.impl.DefaultKeywordWithDependency
-
- すべての実装されたインタフェース:
Serializable
,Cloneable
,Keyword
,KeywordWithDependency
- 直系の既知のサブクラス:
KeywordRule
public class DefaultKeywordWithDependency extends DefaultKeyword implements KeywordWithDependency
係り受けの関係を持つキーワードのクラスです。
Keyword with Dependency.- バージョン:
- 1.0
- 作成者:
- Hiroki Oya
- 関連項目:
- 直列化された形式
-
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 protected ArrayList<KeywordWithDependency>
children
protected String
dependencyKey
protected KeywordWithDependency
parent
protected String
relation
-
クラスから継承されたフィールド nlp4j.impl.DefaultKeyword
begin, correlation, count, end, facet, hitKeyword, lex, namespace, reading, sequence, str, upos
-
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 DefaultKeywordWithDependency()
DefaultKeywordWithDependency(int begin, int end, String facet, String lex, String str)
DefaultKeywordWithDependency(String namespace, int begin, int end, String facet, String lex, String str)
DefaultKeywordWithDependency(String namespace, int begin, int end, String facet, String lex, String str, String relation)
-
メソッドの概要
すべてのメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 void
addBeginEnd(int n)
Shift begin, endvoid
addChild(KeywordWithDependency keyword)
依存関係の子ノードを追加します。void
addChildOnly(KeywordWithDependency keyword)
依存関係の子ノードを追加します。List<KeywordWithDependency>
asList()
依存関係のあるキーワードをリストとして返します。protected DefaultKeywordWithDependency
clone()
boolean
equals(Object obj)
ArrayList<KeywordWithDependency>
getChildren()
依存関係のある子ノードのキーワードを返します。String
getDependencyKey()
int
getDepth()
もっとも親の位置にあるキーワード(ルートキーワード)からの深さの位置を返します。KeywordWithDependency
getParent()
親の依存関係のあるキーワードを返します。KeywordWithDependency
getParent(int depth)
階層の数を指定して親の依存関係のあるキーワードを返します。String
getRelation()
係り受けのラベルKeywordWithDependency
getRoot()
親の依存関係にあるキーワードで最も親(ルート)に位置するキーワードを返します。int
getSequence()
文の中での出現順(連番)を返します。boolean
hasChild()
子の依存関係にあるキーワードがあるかどうかを返します。boolean
hasParent()
親の依存関係にあるキーワードがあるかどうかを返します。boolean
isRoot()
最も親の依存関係にあるキーワードを返します。void
setDependencyKey(String dependencyKey)
void
setParent(KeywordWithDependency parent)
親の依存関係にあるキーワードをセットします。void
setParentOnly(KeywordWithDependency parent)
親の依存関係にあるキーワードをセットします。void
setRelation(String relation)
係り受けのラベルvoid
setSequence(int sequence)
連番を返します。String
toString()
String
toStringAsDependencyList()
キーワードの依存関係を文字列で表現します。String
toStringAsDependencyTree()
キーワードの依存関係を文字列で表現します。String
toStringAsXml()
キーワードの依存関係をXML形式の文字列で表現します。String
toStringAsXml(int depth)
階層を指定してキーワードの依存関係をXML形式の文字列で表現します。-
クラスから継承されたメソッド nlp4j.impl.DefaultKeyword
get, getBegin, getCorrelation, getCount, getEnd, getFacet, getFlag, getLex, getNamespance, getReading, getStr, getUPos, hashCode, match, setBegin, setCorrelation, setCount, setEnd, setFacet, setFlag, setLex, setNamespace, setReading, setStr, setUPos, toStringDetail
-
インタフェースから継承されたメソッド nlp4j.Keyword
get, getBegin, getCorrelation, getCount, getEnd, getFacet, getFlag, getLex, getNamespance, getReading, getStr, getUPos, match, setBegin, setCorrelation, setCount, setEnd, setFacet, setFlag, setLex, setNamespace, setReading, setStr, setUPos
-
-
-
-
フィールドの詳細
-
children
protected ArrayList<KeywordWithDependency> children
-
dependencyKey
protected String dependencyKey
-
parent
protected KeywordWithDependency parent
-
relation
protected String relation
-
-
コンストラクタの詳細
-
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
-
-
メソッドの詳細
-
addBeginEnd
public void addBeginEnd(int n)
インタフェースからコピーされた説明:Keyword
Shift begin, end- 定義:
addBeginEnd
インタフェース内Keyword
- オーバーライド:
addBeginEnd
クラス内DefaultKeyword
-
clone
protected DefaultKeywordWithDependency clone()
- オーバーライド:
clone
クラス内DefaultKeyword
-
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)
-
getChildren
public ArrayList<KeywordWithDependency> getChildren()
インタフェースからコピーされた説明:KeywordWithDependency
依存関係のある子ノードのキーワードを返します。- 定義:
getChildren
インタフェース内KeywordWithDependency
- 戻り値:
- 子ノード
-
getDependencyKey
public String getDependencyKey()
- 戻り値:
- この依存関係をあらわす文字列キー
-
getDepth
public int getDepth()
インタフェースからコピーされた説明:KeywordWithDependency
もっとも親の位置にあるキーワード(ルートキーワード)からの深さの位置を返します。- 定義:
getDepth
インタフェース内KeywordWithDependency
- 戻り値:
- キーワードの深さ
-
getParent
public KeywordWithDependency getParent()
インタフェースからコピーされた説明:KeywordWithDependency
親の依存関係のあるキーワードを返します。- 定義:
getParent
インタフェース内KeywordWithDependency
- 戻り値:
- キーワード
-
getParent
public KeywordWithDependency getParent(int depth)
インタフェースからコピーされた説明:KeywordWithDependency
階層の数を指定して親の依存関係のあるキーワードを返します。例えば2の場合、2段階親のキーワードを返します。- 定義:
getParent
インタフェース内KeywordWithDependency
- パラメータ:
depth
- 深さ- 戻り値:
- キーワード
-
getRelation
public String getRelation()
インタフェースからコピーされた説明:KeywordWithDependency
係り受けのラベル- 定義:
getRelation
インタフェース内KeywordWithDependency
- 戻り値:
- dependency label
-
getRoot
public KeywordWithDependency getRoot()
インタフェースからコピーされた説明:KeywordWithDependency
親の依存関係にあるキーワードで最も親(ルート)に位置するキーワードを返します。このキーワードが最も親のキーワードである場合 null を返します。- 定義:
getRoot
インタフェース内KeywordWithDependency
- 戻り値:
- キーワード
-
getSequence
public int getSequence()
インタフェースからコピーされた説明:KeywordWithDependency
文の中での出現順(連番)を返します。- 定義:
getSequence
インタフェース内KeywordWithDependency
- オーバーライド:
getSequence
クラス内DefaultKeyword
- 戻り値:
- 連番
-
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
- 親の依存関係にあるキーワード
-
setRelation
public void setRelation(String relation)
インタフェースからコピーされた説明:KeywordWithDependency
係り受けのラベル- 定義:
setRelation
インタフェース内KeywordWithDependency
- パラメータ:
relation
- 係り受けのラベル
-
setSequence
public void setSequence(int sequence)
クラスからコピーされた説明:DefaultKeyword
連番を返します。- 定義:
setSequence
インタフェース内KeywordWithDependency
- オーバーライド:
setSequence
クラス内DefaultKeyword
- パラメータ:
sequence
- 連番
-
toString
public String toString()
- オーバーライド:
toString
クラス内DefaultKeyword
-
toStringAsDependencyList
public String toStringAsDependencyList()
インタフェースからコピーされた説明:KeywordWithDependency
キーワードの依存関係を文字列で表現します。- 定義:
toStringAsDependencyList
インタフェース内KeywordWithDependency
- 戻り値:
- キーワードの依存関係
-
toStringAsDependencyTree
public String toStringAsDependencyTree()
インタフェースからコピーされた説明:KeywordWithDependency
キーワードの依存関係を文字列で表現します。- 定義:
toStringAsDependencyTree
インタフェース内KeywordWithDependency
- 戻り値:
- キーワードの依存関係
-
toStringAsXml
public String toStringAsXml()
インタフェースからコピーされた説明:KeywordWithDependency
キーワードの依存関係をXML形式の文字列で表現します。- 定義:
toStringAsXml
インタフェース内KeywordWithDependency
- 戻り値:
- キーワードの依存関係
-
toStringAsXml
public String toStringAsXml(int depth)
インタフェースからコピーされた説明:KeywordWithDependency
階層を指定してキーワードの依存関係をXML形式の文字列で表現します。- 定義:
toStringAsXml
インタフェース内KeywordWithDependency
- パラメータ:
depth
- このオブジェクトの階層の深さ- 戻り値:
- 文字列
-
-