パッケージ 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.
      • クラスから継承されたメソッド java.lang.Object

        finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • フィールドの詳細

      • 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 -
        発話内容に応じたContentBuilder
        ContentBuilder 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, or null 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, or null 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, or null 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, or null 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, or null 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.
        戻り値:
        言及されている発言の日。無効の場合は-1
        The 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。無効の場合は-1
        The 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, or null 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, otherwise false.
      • 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