パッケージ org.aiwolf.client.lib
クラス Content
- java.lang.Object
-
- org.aiwolf.client.lib.Content
-
- すべての実装されたインタフェース:
java.lang.Cloneable
public class Content extends java.lang.Object implements java.lang.Cloneable
発話内容クラス。ContentBuilderあるいは発話テキストから生成Class for the content of a utterance. Constructed by giving a ContentBuilder or the uttered text.
-
-
フィールドの概要
フィールド 修飾子とタイプ フィールド 説明 static Agent
ANY
不特定のエージェントを表す定数 Constant representing an arbitrary agent.static Content
OVER
OVERを表す定数 Constant representing OVER.static Content
SKIP
SKIPを表す定数 Constant representing SKIP.static Agent
UNSPEC
エージェント未特定であることを表す定数 Constant representing an unspecified agent.
-
コンストラクタの概要
コンストラクタ コンストラクタ 説明 Content(java.lang.String input)
発話テキストによりContentを構築する Constructs a Content from the uttered text.Content(ContentBuilder builder)
指定したContentBuilderによりContentを構築する Constructs a Content by the given ContentBuilder.
-
メソッドの概要
すべてのメソッド staticメソッド インスタンス・メソッド concreteメソッド 修飾子とタイプ メソッド 説明 Content
clone()
boolean
equals(java.lang.Object content)
java.util.List<Content>
getContentList()
発話内容が複文・重文の場合,節のリストを返す Returns the list of clauses in case of complex or compound sentence.int
getDay()
発話の日付を返す Returns the date of content.Operator
getOperator()
発話内容の演算子を返す Returns the operator of this content.Species
getResult()
発話内容中で言及されている判定結果を返す。Role
getRole()
発話内容中で言及されている役職を返す。Agent
getSubject()
発話内容の主語を返す Returns the subject of this content.int
getTalkDay()
発話内容中で言及されている発言の日を返す。int
getTalkID()
発話内容中で言及されている発言のIDを返す。TalkType
getTalkType()
発話内容中で言及されている発言のタイプを返す。Agent
getTarget()
発話内容中の目的エージェントを返す。java.lang.String
getText()
発話テキストを返す Returns the uttered text.Topic
getTopic()
発話内容のトピックを返す Returns the topic of this content.static java.lang.String
stripSubject(java.lang.String input)
発話文字列からsubjectの部分を除いた文字列を返す Strips subject off the given string and returns it.java.lang.String
toString()
static boolean
validate(java.lang.String input)
発話テキストが有効かどうかを返す. Returns whether or not the uttered text is valid.
-
-
-
フィールドの詳細
-
SKIP
public static final Content SKIP
SKIPを表す定数Constant representing SKIP.
-
OVER
public static final Content OVER
OVERを表す定数Constant representing OVER.
-
ANY
public static final Agent ANY
不特定のエージェントを表す定数Constant representing an arbitrary agent.
-
UNSPEC
public static final Agent UNSPEC
エージェント未特定であることを表す定数Constant representing an unspecified agent.
-
-
コンストラクタの詳細
-
Content
public Content(ContentBuilder builder)
指定したContentBuilderによりContentを構築するConstructs a Content by the given ContentBuilder.- パラメータ:
builder
-発話内容に応じたContentBuilderContentBuilder for the content.
-
Content
public Content(java.lang.String input)
発話テキストによりContentを構築するConstructs a Content from the uttered text.- パラメータ:
input
-発話テキストThe uttered text.
-
-
メソッドの詳細
-
getText
public java.lang.String getText()
発話テキストを返すReturns the uttered text.- 戻り値:
- 発話テキストThe uttered text.
-
getOperator
public Operator getOperator()
発話内容の演算子を返すReturns the operator of this content.- 戻り値:
- 演算子。単文の場合は
null
The operator, ornull
when it is a simple sentence.
-
getSubject
public Agent getSubject()
発話内容の主語を返すReturns the subject of this content.- 戻り値:
- 主語The subject.
-
getTopic
public Topic getTopic()
発話内容のトピックを返すReturns the topic of this content.- 戻り値:
- トピックThe topic.
-
getTarget
public Agent getTarget()
発話内容中の目的エージェントを返す。発話が単文で,かつTopicが(DIS)AGREE以外で有効Returns the objective agent of this content. Valid when it is a simple sentence and the topic is other than (DIS)AGREE.- 戻り値:
- 目的エージェント。無効の場合は
null
The objective agent, ornull
when it is invalid.
-
getRole
public Role getRole()
発話内容中で言及されている役職を返す。発話が単文で,かつTopicがCOMINGOUTとESTIMATEのとき有効Returns the role referred in this content. Valid when it is a simple sentence and the topic is COMINGOUT or ESTIMATE.- 戻り値:
- 言及されている役職。無効の場合は
null
The referred role, ornull
when it is invalid.
-
getResult
public Species getResult()
発話内容中で言及されている判定結果を返す。発話が単文で,かつTopicがDIVINEDとINQUESTEDのとき有効Returns the result of the judgment referred in this content. Valid when it is a simple sentence and the topic is DIVINED or INQUESTED.- 戻り値:
- 言及されている判定結果。無効の場合は
null
The referred result, ornull
when it is invalid.
-
getTalkType
public TalkType getTalkType()
発話内容中で言及されている発言のタイプを返す。発話が単文で,かつTopicが(DIS)AGREEのとき有効Returns the type of the utterance referred in this content. Valid when it is a simple sentence and the topic is (DIS)AGREE.- 戻り値:
- 言及されている発言のタイプ。無効の場合は
null
The type of utterance, ornull
when it is invalid.
-
getTalkDay
public int getTalkDay()
発話内容中で言及されている発言の日を返す。発話が単文で,かつTopicが(DIS)AGREEのとき有効Returns the day of the utterance referred in this content. Valid when it is a simple sentence and the topic is (DIS)AGREE.- 戻り値:
- 言及されている発言の日。無効の場合は-1The day of the referred utterance, or -1 when it is invalid.
-
getTalkID
public int getTalkID()
発話内容中で言及されている発言のIDを返す。発話が単文で,かつTopicが(DIS)AGREEのとき有効Returns the ID of the utterance referred in this content. Valid when it is a simple sentence and the topic is (DIS)AGREE.- 戻り値:
- 言及されている発言のID。無効の場合は-1The ID of the referred utterance, or -1 when it is invalid.
-
getContentList
public java.util.List<Content> getContentList()
発話内容が複文・重文の場合,節のリストを返すReturns the list of clauses in case of complex or compound sentence.- 戻り値:
- 節のリスト。単文の場合は
null
The list of clauses, ornull
in case of simple sentence.
-
getDay
public int getDay()
発話の日付を返すReturns the date of content.- 戻り値:
- 日付Date.
-
validate
public static boolean validate(java.lang.String input)
発話テキストが有効かどうかを返す.Returns whether or not the uttered text is valid.- パラメータ:
input
-被チェックテキストThe text to be checked.- 戻り値:
- 有効である場合
true
,そうでなければfalse
true
if the text is valid, otherwisefalse
.
-
clone
public Content clone()
- オーバーライド:
clone
クラス内java.lang.Object
-
equals
public boolean equals(java.lang.Object content)
- オーバーライド:
equals
クラス内java.lang.Object
-
stripSubject
public static java.lang.String stripSubject(java.lang.String input)
発話文字列からsubjectの部分を除いた文字列を返すStrips subject off the given string and returns it.- パラメータ:
input
-入力文字列Input string.- 戻り値:
- 発話文字列からsubjectの部分を除いた文字列String with no subject prefix.
-
toString
public java.lang.String toString()
- オーバーライド:
toString
クラス内java.lang.Object
-
-