JP2023156489A - Natural language processing system, natural language processing method, and natural language processing program - Google Patents

Natural language processing system, natural language processing method, and natural language processing program Download PDF

Info

Publication number
JP2023156489A
JP2023156489A JP2023134200A JP2023134200A JP2023156489A JP 2023156489 A JP2023156489 A JP 2023156489A JP 2023134200 A JP2023134200 A JP 2023134200A JP 2023134200 A JP2023134200 A JP 2023134200A JP 2023156489 A JP2023156489 A JP 2023156489A
Authority
JP
Japan
Prior art keywords
subject
natural language
emotion
emotions
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2023134200A
Other languages
Japanese (ja)
Inventor
篤志 田方
Atsushi Tagata
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Robomind Inc
Original Assignee
Robomind Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Robomind Inc filed Critical Robomind Inc
Publication of JP2023156489A publication Critical patent/JP2023156489A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition

Abstract

To provide a natural language processing system, a method, and a program that can set positive and negative emotions of a scene, a situation, and a subject model from an input sentence, and infer an optimal emotion according to the situation rather than a simple emotion corresponding to a word, and understand a meaning of the sentence.SOLUTION: A natural language processing system comprises an input device to which sentences are input by characters or voice, and a control device which has a CPU and a main storage memory and resolves the sentences input from the input device into words to analyze a meaning thereof. In the main storage memory, a word object that has a word corresponding to a subject who understands a natural language, has a mental state, and has a positive emotion that is favorable to oneself and a negative emotion that is unfavorable to oneself is generated. The control device generates the word object of the subject from a word of the input sentence, determines the mental state of the subject by determining positive or negative emotions of the subject, and performs semantic analysis by predicting an action of the subject.SELECTED DRAWING: Figure 3

Description

この発明は、自然言語処理システム、自然言語処理方法および自然言語処理プログラムに関する。 The present invention relates to a natural language processing system, a natural language processing method, and a natural language processing program.

本出願は、2019年6月7日出願の国際出願PCT/JP2019/022680に基づく優先権を主張し、前記国際出願に記載された全ての記載内容を援用するものである。 This application claims priority based on the international application PCT/JP2019/022680 filed on June 7, 2019, and incorporates all the contents described in the international application.

近年、人が話す言葉(自然言語)で対話可能なシステムが増えてきている。たとえば、特開2006-178063号公報(特許文献1)には、単語をネガティブ、ポジティブ、ニュートラルの3つの感情に分類した感情語辞書を作成し、ユーザーの発話に含まれる感情語からユーザーの感情を推測し、それに基づいた返答をする対話処理装置が開示されている。 In recent years, the number of systems that allow interaction using human language (natural language) has been increasing. For example, in Japanese Patent Application Laid-Open No. 2006-178063 (Patent Document 1), an emotion word dictionary is created that categorizes words into three emotions: negative, positive, and neutral, and the user's emotions are determined based on the emotion words included in the user's utterances. An interaction processing device is disclosed that estimates the answer and provides a response based on the guess.

特開2006-178063号公報Japanese Patent Application Publication No. 2006-178063

特許文献1の技術によると、感情語が出てくれば、それに対応した返答をするだけである。よって、特許文献1に開示の対話処理装置は、文の意味を理解して出力しているわけではない。そのため、ちぐはぐな返答となり、自然な会話が続かないという問題がある。 According to the technology disclosed in Patent Document 1, when an emotional word appears, a response corresponding to the emotional word is simply made. Therefore, the dialogue processing device disclosed in Patent Document 1 does not understand and output the meaning of a sentence. As a result, there is a problem in that the responses are inconsistent and a natural conversation cannot continue.

そもそも、感情というのは、単語に一対一で対応するものでなく、同じ単語であっても、そのときの状況や、見方によって異なる感情が発生し得る。たとえば、プレゼントをもらった場合、「嬉しい」という感情が発生するとともに、プレゼントをくれた相手に対して「感謝」といった感情も発生する。「プレゼント」という語にポジティブという感情を対応させた感情辞書を作成しておけば、「お父さんからプレゼントをもらったよ」という文からポジティブを読み取り「よかったねぇ」とは言えても、「おとうさんに感謝しないといけないよね」という返答は出てこない。 In the first place, emotions do not have a one-to-one correspondence with words; even the same word can produce different emotions depending on the situation and perspective. For example, when you receive a present, you feel "happy" and you also feel "thankful" to the person who gave you the gift. If you create an emotion dictionary that matches the word ``present'' with positive emotions, you can read the positive in the sentence ``I received a present from my father.'' "I have to do it," is not the answer.

このことの根本的な問題は、自然言語処理の分野では、未だに意味理解ができておらず、意味理解の定義すらできていないということに尽きる。 The fundamental problem with this is that the field of natural language processing has not yet achieved semantic understanding or even a definition of semantic understanding.

本発明の目的は、自然言語処理において、意味理解の方法を提供することである。 An object of the present invention is to provide a method for semantic understanding in natural language processing.

この発明にかかる自然言語処理システムは、入力された自然言語の文を解析し、自然言語を理解する主体を表す主体データ、および主体が行動する世界の一部を表す場面データを生成し、場面データに主体データを設定する場面設定部と、入力された自然言語の文を解析し、場面の状況変化を設定する状況変化設定部と、場面の状況変化に基づいて、主体にとって好ましい感情であるプラス感情、または主体にとって好ましくない感情であるマイナス感情が発生したかを判定するプラスマイナス感情設定部と、発生したプラスマイナス感情に基づいて意味解析する意味解析部とを有する。状況変化設定部は、状況変化の前状態で主体データに作用する価値と状況変化の後状態で主体データに作用する価値とをそれぞれ数値として取得する。プラスマイナス感情設定部は、前状態の数値と後状態の数値との差を計算してプラスマイナス感情を算出する。 The natural language processing system according to the present invention analyzes input natural language sentences, generates subject data representing a subject who understands natural language, and scene data representing a part of the world in which the subject acts, and generates scene data representing a part of the world in which the subject acts. A scene setting section that sets subject data in data, a situation change setting section that analyzes input natural language sentences and sets changes in the situation of the scene, and creates emotions favorable to the subject based on the changes in the situation of the scene. It has a plus/minus emotion setting unit that determines whether a positive emotion or a negative emotion that is an unfavorable emotion for the subject has occurred, and a meaning analysis unit that performs meaning analysis based on the generated positive/minus emotion. The situation change setting unit obtains, as numerical values, the values that act on the subject data in a state before the situation change and the values that act on the subject data in a state after the situation change. The plus/minus emotion setting unit calculates the plus/minus emotion by calculating the difference between the numerical value of the previous state and the numerical value of the subsequent state.

また、この発明にかかる自然言語処理方法は、入力された自然言語の文を解析し、自然言語を理解する主体を表す主体データ、および主体が行動する世界の一部を表す場面データを生成し、場面データに主体データを設定するステップと、入力された自然言語の文を解析し、場面の状況変化を設定する状況変化を設定するステップと、場面の状況変化に基づいて、主体にとって好ましい感情であるプラス感情、または主体にとって好ましくない感情であるマイナス感情が発生したかを判定するステップと、発生したプラスマイナス感情に基づいて意味解析するステップと、を備える。状況変化を設定するステップは、状況変化の前状態で主体データに作用する価値と状況変化の後状態で主体データに作用する価値とをそれぞれ数値として取得する。判定するステップは、前状態の数値と後状態の数値との差を計算してプラスマイナス感情を算出する。 Furthermore, the natural language processing method according to the present invention analyzes input natural language sentences and generates subject data representing a subject who understands the natural language and scene data representing a part of the world in which the subject acts. , a step of setting subject data in the scene data, a step of analyzing the input natural language sentence and setting a situation change of the scene, and a step of setting a situation change that is favorable for the subject based on the situation change of the scene. The present invention includes a step of determining whether a positive emotion, which is a negative emotion, or a negative emotion, which is an unfavorable emotion for the subject, has occurred, and a step of performing semantic analysis based on the generated positive emotion. In the step of setting the situation change, the value acting on the subject data in the state before the situation change and the value acting on the subject data in the state after the situation change are obtained as numerical values. In the determining step, the difference between the numerical value of the previous state and the numerical value of the subsequent state is calculated to calculate the plus/minus emotion.

また、この発明に係る自然言語処理プログラムは、コンピュータを、入力された自然言語の文を解析し、自然言語を理解する主体を表す主体データ、および主体が行動する世界の一部を表す場面データを生成し、場面データに主体データを設定する場面設定部、入力された自然言語の文を解析し、場面の状況変化を設定する状況変化設定部、場面の状況変化に基づいて、主体にとって好ましい感情であるプラス感情、または主体にとって好ましくない感情であるマイナス感情が発生したかを判定するプラスマイナス感情設定部および発生したプラスマイナス感情に基づいて意味解析する意味解析部として機能させるための自然言語処理プログラムである。状況変化設定部は、状況変化の前状態で主体データに作用する価値と状況変化の後状態で主体データに作用する価値とをそれぞれ数値として取得する。プラスマイナス感情設定部は、前状態の数値と後状態の数値との差を計算してプラスマイナス感情を算出する。 Further, the natural language processing program according to the present invention causes a computer to analyze input natural language sentences and generate subject data representing a subject who understands the natural language, and scene data representing a part of the world in which the subject acts. a scene setting section that generates and sets subject data in the scene data; a situation change setting section that analyzes input natural language sentences and sets changes in the situation of the scene; A natural language for functioning as a plus/minus emotion setting unit that determines whether a positive emotion that is an emotion or a negative emotion that is an unfavorable emotion for the subject has occurred, and a semantic analysis unit that performs meaning analysis based on the generated positive or negative emotion. It is a processing program. The situation change setting unit obtains, as numerical values, the values that act on the subject data in a state before the situation change and the values that act on the subject data in a state after the situation change. The plus/minus emotion setting unit calculates the plus/minus emotion by calculating the difference between the numerical value of the previous state and the numerical value of the subsequent state.

この自然言語処理システムは、入力された文から、場面や状況、主体モデルのプラスマイナス感情を設定するので、単語に対応した単純な感情でなく、状況に応じた最適な感情を推測して、文の意味を理解することができる。 This natural language processing system sets the positive and negative emotions of the scene, situation, and subject model from the input sentence, so it estimates the optimal emotion according to the situation, rather than the simple emotion that corresponds to the word. Can understand the meaning of sentences.

図1は、本発明の第一の実施形態であるチャットボットシステムのブロック図である。FIG. 1 is a block diagram of a chatbot system according to the first embodiment of the present invention. 図2は、意味理解プログラムのブロック図である。FIG. 2 is a block diagram of the semantic understanding program. 図3は、意味理解プログラムの処理の流れを示すフローチャートである。FIG. 3 is a flowchart showing the processing flow of the semantic understanding program. 図4は、物語のデータ構造を示す図である。FIG. 4 is a diagram showing the data structure of the story. 図5は、場面のデータ構造を示す図である。FIG. 5 is a diagram showing the data structure of a scene. 図6は、概念ツリーのデータ構造を示す図である。FIG. 6 is a diagram showing the data structure of a concept tree. 図7は、単語オブジェクトのデータ構造を示す図である。FIG. 7 is a diagram showing the data structure of a word object. 図8は、出来事のデータ構造を示す図である。FIG. 8 is a diagram showing the data structure of events. 図9は、行動のデータ構造を示す図である。FIG. 9 is a diagram showing the behavior data structure. 図10は、出来事のデータの中身を示す図である。FIG. 10 is a diagram showing the contents of event data. 図11は、標準応答辞書を示す図である。FIG. 11 is a diagram showing a standard response dictionary. 図12は、心的状態辞書を示す図である。FIG. 12 is a diagram showing a mental state dictionary. 図13は、作用語「当たる」の行動を示す図である。FIG. 13 is a diagram showing the behavior of the action word "aru". 図14は、前後状態を示す図である。FIG. 14 is a diagram showing the front and back states. 図15は、感情語応答辞書を示す図である。FIG. 15 is a diagram showing an emotion word response dictionary. 図16は、本発明の第二の実施形態のロボットのブロック図である。FIG. 16 is a block diagram of a robot according to a second embodiment of the present invention. 図17は、ロボットの外観を示す図である。FIG. 17 is a diagram showing the appearance of the robot. 図18は、出来事のデータ構造である。FIG. 18 shows the event data structure. 図19は、自分感情管理部を示す図である。FIG. 19 is a diagram showing the self-emotion management section. 図20は、仮想的に構築した相手の心のデータ構造を示す図である。FIG. 20 is a diagram showing the data structure of the virtual partner's mind. 図21は、町のHas-aツリーのデータ構造である。FIG. 21 shows the data structure of the town's Has-a tree. 図22は、「走る」という行動から導かれる二つの前後状態を示す図である。FIG. 22 is a diagram showing two before and after states derived from the action of "running".

本発明は、自然言語の意味理解の方法、つまり、人間と同じように文の意味をコンピュータに理解させる方法についての発明である。自然言語処理の分野では、未だに意味理解の定義すら定まっていないので、発明者は、意味理解を二つ定義することから行った。 The present invention relates to a method for understanding the meaning of natural language, that is, a method for making a computer understand the meaning of sentences in the same way as humans do. In the field of natural language processing, even the definition of semantic understanding has not yet been determined, so the inventor started by defining two aspects of semantic understanding.

一つ目の定義は、情報量の削減である。意味を理解するとは、何らかの情報処理を行うということといえる。情報処理の一例として、数値計算を考えてみる。「1+1=2」は、元々あった「1+1」という情報を処理して「2」という情報になったわけである。情報処理した結果、情報量が削減されている。何と何とを足したかという情報が失われた代わりに、足した合計値にまとめられたわけである。不要な情報を削除し、必要な情報にまとめるのが情報処理といえる。発明者は、自然言語の意味理解も同じと考えた。文の意味を理解するとは、意味理解前に比べて情報量が削減されているはずである。文の中の無駄な要素を省き、必要な要素にまとめられれば意味理解できたことになるという考えである。 The first definition is information reduction. Understanding meaning can be said to involve performing some kind of information processing. Consider numerical calculation as an example of information processing. "1+1=2" becomes the information "2" by processing the originally existing information "1+1". As a result of information processing, the amount of information has been reduced. The information about what was added was lost, but instead it was summarized as the total value. Information processing is the process of deleting unnecessary information and organizing it into necessary information. The inventor thought that the same could be said for understanding the meaning of natural language. To understand the meaning of a sentence, the amount of information must be reduced compared to before understanding the meaning. The idea is that if you can eliminate unnecessary elements in a sentence and summarize it into necessary elements, you have understood the meaning.

二つ目の定義は、人の行動予測である。人と同じように言葉の意味を理解できるということは、人と会話したとき、人と同じように回答できるということである。つまり、人ならこう話すだろうという行動予測ができれば、それは、意味を理解しているといえる。 The second definition is the prediction of human behavior. Being able to understand the meaning of words in the same way as other people means that when you converse with people, you can respond in the same way as other people. In other words, if you can predict what a person would say in a certain way, you can say that you understand the meaning.

人が行動または発言するには、何らかの心理的な原動力が存在するはずである。それは、「お腹がすいた」や「眠い」といった本能に根差したものから、「怒り」や「感謝」、「悔しい」といった感情まで、人の様々な心の状態である。この心的状況がわかれば、その人の次の言動を予測することができる。つまり、心的状況を正確に表現できたとすれば、それこそが、意味理解だといえるのである。本発明の中心は、人の心的状況をデータ構造として表現し、自然言語の文を読み取り、どのような心的状況にあるかを推定することにある。これは、言い換えれば、人と同じ「心」をコンピュータプログラムで実現するともいえる。そして、たとえば、その人の心的状況が「感謝」となれば、「ありがとう」と発言するだろうと予測できる。つまり、意味理解の第二の定義である行動予測ができたといえる。これが、コンピュータで自然言語の意味を理解するということである。 There must be some kind of psychological driving force behind a person's actions or words. These are people's various mental states, from those rooted in instincts such as ``I'm hungry'' and ``sleepy,'' to emotions such as ``anger,'' ``gratitude,'' and ``frustration.'' If you understand this mental state, you can predict the person's next words and actions. In other words, if a mental situation can be expressed accurately, that can be said to be an understanding of meaning. The core of the present invention is to represent a person's mental state as a data structure, read sentences in natural language, and estimate what kind of mental state the person is in. In other words, it can be said that the same ``mind'' as a human being is realized by a computer program. For example, if that person's mental state is ``grateful,'' it can be predicted that he or she will say ``thank you.'' In other words, it can be said that behavioral prediction, which is the second definition of semantic understanding, has been achieved. This is what it means to use a computer to understand the meaning of natural language.

以下、本発明の第一の実施形態について説明する。図1は、本発明の第一の実施形態であるチャットボットシステム1のブロック図である。図1に示すチャットボットシステム1は、ユーザーが文字を入力するキーボードなどの入力装置2と、対話内容を表示する表示装置3と、入力文を意味解析し、応答文を生成して表示装置3に表示する制御装置4とを有する。 A first embodiment of the present invention will be described below. FIG. 1 is a block diagram of a chatbot system 1 according to the first embodiment of the present invention. A chatbot system 1 shown in FIG. 1 includes an input device 2 such as a keyboard through which a user inputs characters, a display device 3 that displays dialogue content, and a display device 3 that analyzes the meaning of input sentences and generates response sentences. and a control device 4 for displaying the information.

表示装置3は、LCD(Liquid Crystal Display)などで実現され、ユーザーからの入力文5およびシステムの応答文6を表示する。制御装置4は、CPU(Central Processing Unit)7と、本発明の意味理解プログラムがロードされる主記憶メモリ8を有する。 The display device 3 is realized by an LCD (Liquid Crystal Display) or the like, and displays an input sentence 5 from the user and a response sentence 6 from the system. The control device 4 has a CPU (Central Processing Unit) 7 and a main memory 8 into which the semantic understanding program of the present invention is loaded.

図2は、本発明の意味理解プログラム9の構成を示すブロック図である。意味理解プログラム9は、場面設定部10、状況変化設定部11、プラスマイナス感情設定部12、意味解析部13を有する。 FIG. 2 is a block diagram showing the configuration of the semantic understanding program 9 of the present invention. The meaning understanding program 9 includes a scene setting section 10, a situation change setting section 11, a plus/minus emotion setting section 12, and a meaning analysis section 13.

図3は、意味理解プログラムの処理の流れを示すフローチャートである。図3に従って、チャットボットシステム1の処理の全体の流れを説明する。 FIG. 3 is a flowchart showing the processing flow of the semantic understanding program. The overall flow of processing of the chatbot system 1 will be explained according to FIG. 3.

ユーザーは、入力装置2から入力文を入力し終わると確定キーを押す。制御装置4は、ステップS14で入力文が確定されるのを待っており、確定されると、ステップS15において、ユーザーの入力文を表示装置3に、ユーザー入力文5として表示する。 When the user finishes inputting the input sentence from the input device 2, the user presses the enter key. The control device 4 waits for the input sentence to be finalized in step S14, and when the input sentence is determined, the user's input sentence is displayed on the display device 3 as the user input sentence 5 in step S15.

ステップS16では、入力文の意味解析を行う。意味解析では、最初に、入力文の単語分割処理を行う。たとえば、「太郎が、学校に行った」といった文の場合、「太郎/が/、/学校/に/行った/。」と分割する。これは、入力文が日本語の場合、形態素解析によって行われる。その後の意味解析処理については、後で詳しく解説する。 In step S16, a semantic analysis of the input sentence is performed. In semantic analysis, the input sentence is first divided into words. For example, a sentence such as "Taro went to school" is divided into "Taro/ga/, went to/school/." If the input sentence is Japanese, this is done by morphological analysis. The subsequent semantic analysis process will be explained in detail later.

ステップS17では、意味解析の結果、心的状態の変化を判定し、変化があれば、ステップS18に進み、心的状態に応じた感情語応答を行う。たとえば、ユーザーの心的状態が「喜び」であれば、それに対応した応答として「よかったね」などと返答する。 In step S17, a change in the mental state is determined as a result of the semantic analysis, and if there is a change, the process proceeds to step S18, and an emotional response corresponding to the mental state is performed. For example, if the user's state of mind is "joy," the corresponding response would be, "That's great."

心的状態の変化がなければ、ステップS19に進み、標準応答を行う。たとえば、「それでどうなったの?」などと次の会話を促す。 If there is no change in mental state, the process advances to step S19 and a standard response is made. For example, prompt the next conversation with something like, "So what happened?"

次に、図4~図15を参考に、意味解析プログラムがどのようなデータを持ち、どのように処理するかについて説明する。意味解析プログラムは、会話の内容を物語データ20として管理する。物語データ20は、図4に示すように1または複数の場面データ21から構成される。場面データ21は、図5に示すように、時データ26、場所データ27、出来事データ28、登場物データ29、登場人物データ30を有する。場面データ21に設定されるこれらのデータ26~30は、単語オブジェクトとして設定される。単語オブジェクトとは、言葉を定義するデータであり、概念ツリーによって管理される。 Next, what kind of data the semantic analysis program has and how it is processed will be explained with reference to FIGS. 4 to 15. The semantic analysis program manages the contents of the conversation as story data 20. The story data 20 is composed of one or more scene data 21 as shown in FIG. As shown in FIG. 5, the scene data 21 includes time data 26, place data 27, event data 28, appearing object data 29, and appearing character data 30. These data 26 to 30 set in the scene data 21 are set as word objects. A word object is data that defines a word, and is managed by a concept tree.

図6に、概念ツリーの一例として、「プリン」の概念ツリー40を示す。概念ツリー40は、上位概念と下位概念が連なった形で構成され、ここでの最上位概念は具体物41である。具体物41の下位概念が無生物42で、その下位概念が飲食物43で、その下位概念が料理44で、その下位概念が菓子45で、その下位概念がプリン46となる。この例では、概念ツリーは一列で構成されるが、概念ツリーは分岐してもよい。 FIG. 6 shows a concept tree 40 of "pudding" as an example of a concept tree. The concept tree 40 is composed of a series of higher-level concepts and lower-level concepts, and the highest level concept here is a concrete object 41. A subordinate concept of the concrete object 41 is an inanimate object 42, a subordinate concept thereof is food 43, a subordinate concept thereof is cooking 44, a subordinate concept thereof is confectionery 45, and a subordinate concept thereof is pudding 46. In this example, the concept tree is constructed in a single column, but the concept tree may be branched.

図7に示すように、単語オブジェクトは属性を持っている。属性は、属性名と属性値で管理され、属性名としては、色や形、名前などがある。プリンの場合、名前が「プリン」であり、形は「丸」であり、味は「甘い」などとなる。 As shown in FIG. 7, word objects have attributes. Attributes are managed using attribute names and attribute values, and attribute names include color, shape, name, etc. In the case of pudding, the name is ``pudding,'' the shape is ``round,'' and the taste is ``sweet.''

概念ツリーは、上位概念の属性を下位概念が持つ(継承)ように構成される。たとえば、菓子の味(属性名)が「甘い(属性値)」と設定されていると、その下位のプリンの味も「甘い」となる。なお、例外がある場合は、属性値を上書きすることも可能である。図5に設定される時データ26、場所データ27、登場物データ29、登場人物データ30は、このような単語オブジェクトが設定可能に構成される。 The concept tree is constructed such that lower-level concepts have (inherit) the attributes of higher-level concepts. For example, if the taste (attribute name) of confectionery is set to "sweet (attribute value)," the taste of pudding that is subordinate to it is also set to "sweet." Note that if there are exceptions, it is also possible to overwrite the attribute value. The time data 26, location data 27, appearance data 29, and appearance character data 30 set in FIG. 5 are configured such that such word objects can be set.

人が話をするとき、たとえば、「昨日、こんなことがあったよ」といった風に話す。その中には、一つの物語が含まれる。物語は何かしらの世界で展開される。ここでいう世界とは、3次元空間的な広がりを持ち、人や物を含み、時間が流れているものとする。世界の一例として、会話してる本人が含まれる、今、現在のこの世界であってもいいし、昔話などの現実世界とは異なる別の世界であってもいい。 When people talk, they say things like, ``This happened yesterday.'' It contains one story. The story takes place in some kind of world. The world here has a three-dimensional spatial expanse, includes people and things, and is one in which time is flowing. As an example of the world, it can be the current world that includes the person having the conversation, or it can be another world that is different from the real world, such as an old story.

物語データ20は、図4に示したように複数の場面データ21から構成される。場面データ21とは、世界を時と場所で切り取った断面といえる。場面データ21には、時データ26や場所データ27などが含まれる。時データ26には、時間概念の下位概念となる単語オブジェクトが設定され、場所データ27には、場所概念の下位概念となる単語オブジェクトが設定される。この場面は、場面設定部10によって生成されて設定される。 The story data 20 is composed of a plurality of scene data 21 as shown in FIG. The scene data 21 can be said to be a cross-section of the world cut out by time and place. The scene data 21 includes time data 26, location data 27, and the like. In the time data 26, a word object that is a subordinate concept of the time concept is set, and in the location data 27, a word object that is a subordinate concept of the location concept is set. This scene is generated and set by the scene setting section 10.

たとえば、「昔々、あるところにおじいさんとおばあさんがいました」との入力文があったとする。意味解析プログラムは、新たな物語が開始されたと判断し、最初に、物語データ20を新規生成し、さらに場面データ21を生成し、物語データ20に追加する。つぎに、場面データ21の時データ26に「昔々」を設定し、場所データ27に「あるところ」を設定し、登場人物データ30に「おじいさん」と「おばあさん」を設定する。 For example, suppose there is an input sentence such as "Once upon a time, there was an old man and an old woman." The semantic analysis program determines that a new story has started, and first generates new story data 20, then generates scene data 21, and adds it to the story data 20. Next, "once upon a time" is set in the time data 26 of the scene data 21, "some place" is set in the place data 27, and "grandfather" and "grandmother" are set in the character data 30.

登場物データ29と登場人物データ30の違いは、心を持つか持たないかである。心を持つ者を登場人物データ30とするが、これは、人に限らず、たとえば昔話に登場する動物や空想上の生き物や、さらには物であっても、心をもてば登場人物データ30とする。心を持つとは、嬉しいや悲しいなどの感情や、努力といった心的状態を持ち得るものである。なお、本発明では、実際の世界に存在する心を持つ者のことを主体と呼び、それをプログラム内のデータとして表したものを主体データと呼んでいる。 The difference between the character data 29 and the character data 30 is whether they have a heart or not. Character data 30 refers to people with hearts, but this is not limited to people; for example, animals that appear in folk tales, imaginary creatures, and even objects can be character data if they have a heart. Set it to 30. Having a mind means being able to have emotions such as happiness and sadness, and mental states such as effort. In the present invention, a person with a mind existing in the actual world is called a subject, and the data expressed as data in a program is called subject data.

意味理解プログラムは、文を読み込むと、文を解析し、物語データ20や場面データ21を生成したり、場面データ21の状況を設定する。つまり、意味理解処理とは、自然言語で表現された文を物語データ20に変換する処理といえる。 When the meaning understanding program reads a sentence, it analyzes the sentence, generates story data 20 and scene data 21, and sets the situation of the scene data 21. In other words, the meaning understanding process can be said to be a process of converting a sentence expressed in natural language into story data 20.

文は主語、述語、目的語などからなり、述語によって文の役割がきまる。文の役割は、大きく分けて状況の設定と、状況の変化の二つに分かれる。状況の設定とは、場面データ21に登場物データ29や登場人物データ30を設定したり、登場物データ29や登場人物データ30に名前などの属性を設定することである。つまり、これから始まる物語の前提となる状況を設定することである。 A sentence consists of a subject, predicate, object, etc., and the role of the sentence is determined by the predicate. The role of sentences can be broadly divided into two: setting the situation and changing the situation. Setting the situation means setting the appearing object data 29 and appearing character data 30 in the scene data 21, and setting attributes such as names in the appearing object data 29 and appearing character data 30. In other words, it is to set up the situation that is the premise of the story that is about to begin.

たとえば、「おじいさんがいました」という文の場合、「いる」という述語によって文の役割が決まる。「いる」という述語は、状況設定の役割があり、具体的には、主語を場面に存在させるという機能を持つ。この場合、主語は「おじいさん」であり、「おじいさん」は人物の下位概念となるので、「おじいさん」という主体データである登場人物を生成し、場面データ21の登場人物データ30に設定する。 For example, in the case of the sentence ``There was an old man,'' the role of the sentence is determined by the predicate ``There is.'' The predicate ``are'' has the role of setting the situation, specifically, it has the function of making the subject exist in the scene. In this case, the subject is "grandfather" and "grandfather" is a subordinate concept of person, so a character "grandfather" as subject data is generated and set in character data 30 of scene data 21.

また、形容詞なども状況設定の役割がある。たとえば、「花は白い」という文の場合、「白い」という述語は、主語である「花」の色属性に「白」という属性値を設定することである。 Adjectives also play a role in setting the situation. For example, in the case of the sentence "flowers are white," the predicate "white" means setting the attribute value "white" to the color attribute of the subject "flower."

「おじいさんは山に行きました」という文の場合、「行く」という述語によって文の役割がきまり、「行く」という述語は、状況の変化の役割となる。「行く」は「主語」を「目的地」に移動させる機能がある。場所が変わるということは場面が変わることになるので、この文を読み込むと、新規に場面データ21を生成し、場所データ27に目的地である「山」を設定し、登場人物データ30に「おじいさん」を設定する。これが、状況の変化の文である。 In the case of the sentence ``My grandfather went to the mountains,'' the role of the sentence is determined by the predicate ``go,'' and the predicate ``go'' plays a role in changing the situation. ``Go'' has the function of moving the ``subject'' to the ``destination.'' Changing the location means changing the scene, so when this sentence is read, new scene data 21 is generated, the destination "Mountain" is set in the location data 27, and "Mountain" is set in the character data 30. Set "Grandfather". This is a change of situation sentence.

また、状況の変化は、出来事でもあるので、場面データ21の出来事データ28にも設定される。図8は、出来事データ28のデータ構造を示す図である。出来事データ28は、登場人物または登場物が設定される出来事主体50と、出来事主体50の前後の状態を管理する前後状態51と、出来事主体50の行動60とを有する。 Furthermore, since a change in situation is also an event, it is also set in the event data 28 of the scene data 21. FIG. 8 is a diagram showing the data structure of the event data 28. The event data 28 includes an event entity 50 in which characters or objects appearing in the event are set, a before/after state 51 for managing the before and after states of the event entity 50, and actions 60 of the event entity 50.

図9は、行動60のデータ構造を示す図である。行動60は、文の作用を示す作用語61を中心にまとめられる。作用語とは、通常、文の述語となる。「おじいさんが山に行きました」の場合、述語は「行く」なので、作用語61は「行く」となる。行動60のデータ構造は、作用語ごとに異なり、作用語「行く」のデータ構造が、図9に示す内容となる。作用語「行く」は主語62、目的地63、出発地64、意味65を有する。 FIG. 9 is a diagram showing the data structure of the action 60. The actions 60 are grouped around action words 61 that indicate the action of the sentence. An agent is usually a predicate of a sentence. In the case of ``My grandfather went to the mountains,'' the predicate is ``go,'' so the operator 61 is ``go.'' The data structure of the action 60 differs depending on the action word, and the data structure of the action word "go" has the contents shown in FIG. The action word "go" has a subject 62, a destination 63, a starting point 64, and a meaning 65.

全ての作用語のデータ構造は、作用語辞書に格納されており、「行く」などの作用語で作用語辞書を検索することで、「行く」のデータ構造を取得することができる。 The data structure of all the action words is stored in the action word dictionary, and by searching the action word dictionary with an action word such as "go", the data structure of "go" can be obtained.

意味理解プログラムは、作用語「行く」のデータ構造を取得すると、文「おじいさんが山へ行きました」と照らし合わせて、主語62に「おじいさん」、目的地63に「山」を設定する。この文からは出発地64を読み取れないので、出発地64は空欄とするが、デフォルト値として「家」を設定するようにしてもよい。こうやって行動60が完成する。 When the meaning understanding program obtains the data structure of the action word "go", it compares it with the sentence "My grandfather went to the mountain" and sets "Grandpa" as the subject 62 and "Mountain" as the destination 63. Since the starting point 64 cannot be read from this sentence, the starting point 64 is left blank, but "home" may be set as the default value. This is how action 60 is completed.

行動60の意味65の内容は、行動60の内容を出来事データ28の出来事主体50および前後状態51に設定するプログラムであり、たとえばスクリプト言語で記述されている。意味理解プログラムは、このスクリプト言語を解釈、実行することができる。意味65については、このようなスクリプト言語をテキスト形式で記述してもよく、または、実行プログラムを設定してもよい。 The content of the meaning 65 of the action 60 is a program that sets the content of the action 60 to the event subject 50 and the preceding and following states 51 of the event data 28, and is written, for example, in a script language. A semantic understanding program can interpret and execute this scripting language. Regarding the meaning 65, such a script language may be written in a text format, or an execution program may be set.

「行く」の場合だと、意味65は、出来事データ28の出来事主体50に主語62を、前属性52、後属性54に「場所」を、前属性値53に出発地64の中身を、後属性値55に、目的地63の中身を設定せよとの内容が記述されている。意味理解プログラム9の状況変化設定部11は、この意味を読み込み、その内容に従って設定する。つまり、前後状態51の出来事主体50を「おじいさん」とし、後属性値55を「山」と設定する。なお、出発地64が「家」となっていれば、前属性値53に「家」を設定する。このようにして、出来事データ28が完成する。 In the case of "go", the meaning 65 includes the subject 62 in the event subject 50 of the event data 28, the "place" in the preceding attribute 52 and the posterior attribute 54, the content of the place of departure 64 in the preceding attribute value 53, and the content of the starting place 64 in the preceding attribute value 53. Attribute value 55 describes the content to set the contents of destination 63. The situation change setting unit 11 of the meaning understanding program 9 reads this meaning and sets it according to the content. That is, the event subject 50 of the before and after state 51 is set as "old man", and the after attribute value 55 is set as "mountain". Note that if the starting place 64 is "home", "home" is set as the previous attribute value 53. In this way, event data 28 is completed.

登場人物データ30は、心的状態が設定される心的状態部31を有する。心的状態部31は、自分のプラスマイナスの感情が設定されるプラスマイナス感情部を有する。プラスの感情とは、自分にとって好ましい感情であり、マイナスの感情とは、自分にとって好ましくない感情である。たとえば、「お腹がすいた」とか「危険」といった、不快となるものがマイナス感情で、「お腹がいっぱい」とか、「安心」といった快となるものがプラス感情となる。 The character data 30 includes a mental state section 31 in which a mental state is set. The mental state section 31 has a plus/minus emotion section where one's own plus/minus emotions are set. Positive emotions are emotions that are favorable to oneself, and negative emotions are emotions that are unfavorable to oneself. For example, negative emotions are things that are unpleasant, such as ``I'm hungry'' or ``danger,'' and positive emotions are things that are pleasant, such as ``I'm full,'' or ``I feel safe.''

不快(マイナス感情)を避け快(プラス感情)を求めるというのが、生物の行動の基本原則である。これは、人間に限らず、あらゆる生物が持つ基本原則である。なお、プラスマイナス感情は主体単独で発生するもので、「痛い」や「気持ちいい」といった身体的なものと、「嬉しい」や「悲しい」といった精神的なものとがある。 The basic principle of biological behavior is to avoid discomfort (negative emotions) and seek pleasure (positive emotions). This is a basic principle held by all living things, not just humans. Note that positive and negative emotions are generated by the subject alone, and include physical ones such as ``it hurts'' and ``feels good,'' and mental ones such as ``happy'' and ``sad.''

それでは、再び図3のフローチャートを参考に、意味解析を示すステップS16以降の動作について説明する。 Now, with reference to the flowchart of FIG. 3 again, the operations from step S16 onwards showing semantic analysis will be explained.

最初に「はじめまして、太郎です」と文が入力されたとする。すると、まず、初期設定として、場面設定部10が、物語データ20および場面データ21を生成し、物語データ20に場面データ21を追加する。そして、入力文を解析し、主語である「太郎」を取り出す。「太郎」を概念ツリーで検索すると、「人物名」概念以下とわかるので、「太郎」とは人間の名前と判断し、登場人物データ30を生成し、その名前属性に「太郎」と設定する。また、述語は「です」なので、「太郎」が存在すると判断でき、生成した「太郎」を場面データ21の登場人物データ30に設定する。 Assume that the sentence "Nice to meet you, I'm Taro" is first input. Then, first, as an initial setting, the scene setting unit 10 generates the story data 20 and the scene data 21, and adds the scene data 21 to the story data 20. Then, it analyzes the input sentence and extracts the subject "Taro." When searching for "Taro" in the concept tree, it is found that it is less than the "person name" concept, so it is determined that "Taro" is a human name, generates character data 30, and sets "Taro" in the name attribute. . Furthermore, since the predicate is "desu", it can be determined that "Taro" exists, and the generated "Taro" is set in the character data 30 of the scene data 21.

図10は、この場面データ21の出来事データ28のデータの中身を示す図である。 FIG. 10 is a diagram showing the contents of the event data 28 of the scene data 21.

まず、「はじめまして」を概念ツリーで検索すると挨拶概念以下とわかるので、「挨拶」で作用語辞書を検索して「挨拶」のデータ構造を取得する。そして、「挨拶」のデータ構造の主語71に「太郎」、挨拶内容72に「はじめまして、太郎です」と設定して挨拶の行動70を完成させる。また、作用語「挨拶」は、出来事主体の前後状況に変化を及ぼさないから、意味は空欄となっている。意味が空欄なので、状況変化設定部11は、前後状態51には何も設定しない。 First, when we search for ``Nice to meet you'' in the concept tree, we find that it is less than the greeting concept, so we search the operative word dictionary for ``greeting'' and obtain the data structure of ``greeting.'' Then, the subject 71 of the "greeting" data structure is set as "Taro" and the greeting content 72 is set as "nice to meet you, Taro" to complete the greeting action 70. Furthermore, the operative word ``greeting'' does not change the context of the subject of the event, so its meaning is left blank. Since the meaning is blank, the situation change setting unit 11 does not set anything in the previous and subsequent states 51.

ここで、次のステップS17に進み、プラスマイナス感情設定部12は、登場人物データ30の心的状態に変化があったかどうかを判定する。今の場合、出来事データ28の前属性値、後属性値で変化がないので、意味解析部13は、心的状態に変化がないと判断して、次の標準応答を示すステップS19に進む。 Here, the process proceeds to the next step S17, and the plus/minus emotion setting unit 12 determines whether or not there has been a change in the mental state of the character data 30. In this case, since there is no change in the preceding attribute value and subsequent attribute value of the event data 28, the semantic analysis unit 13 determines that there is no change in the mental state and proceeds to step S19, which indicates the next standard response.

標準応答を示すステップS19は、図11に示す標準応答辞書を使って応答する。標準応答辞書は、相手の発話と、その返答がペアとなった辞書であり、今回の場合、「太郎」の発話が「はじめまして」なので、それに対応した「初めまして、太郎君」を返答として返す。また、挨拶の後は、会話が続くように、「最近、何かあった?」と続けて尋ねる。これらが、応答文6として表示装置3に表示される。 In step S19, which indicates a standard response, a standard response dictionary shown in FIG. 11 is used to respond. The standard response dictionary is a dictionary that pairs the other party's utterance and its response. In this case, the utterance of "Taro" is "Nice to meet you," so the corresponding response is "Nice to meet you, Taro-kun." . Also, after greeting someone, follow up by asking, ``Has anything happened recently?'' to keep the conversation going. These are displayed on the display device 3 as a response sentence 6.

これを受けて、太郎君は、たとえば「今日、コンビニに行ってくじ引きをしたよ」と回答したとする。意味解析を示すステップS16において、「コンビニに行く」から場所が変わったと判断して、場面設定部10は、新たな場面データ21を生成し、場所を「コンビニ」と設定し、出来事データ28に、「太郎がコンビニに行く」を設定する。続けて、さらに出来事データ28を生成し、「太郎がくじを引く」と設定する。このように、一つの場面データ21で複数の出来事データ28が設定されることもある。 In response to this, Taro might reply, ``Today, I went to the convenience store and drew a lottery.'' In step S16 showing semantic analysis, it is determined that the location has changed from "going to the convenience store", and the scene setting unit 10 generates new scene data 21, sets the location as "convenience store", and changes the location to the event data 28. , "Taro goes to the convenience store" is set. Subsequently, event data 28 is further generated, and "Taro draws a lottery" is set. In this way, a plurality of event data 28 may be set in one scene data 21.

今回の場合、状況変化設定部11によって、出来事の前後状態は、最終的に、後属性54が「場所」で、後属性値55が「コンビニ(コンビニエンスストア)」となる。 In this case, the situation change setting unit 11 determines that the following attribute 54 is "place" and the subsequent attribute value 55 is "convenience store" as the state before and after the event.

出来事データ28が設定されると、ステップS18にてプラスマイナス感情設定部12は、心的状態の変化を判断する。心的状態は、図12示す心的状態辞書で判断する。心的状態辞書は、登場人物の属性に応じた値が数値で設定されており、数値がプラスであればプラス感情、マイナスであればマイナス感情で、感情の大きさは値の大きさで示される。 Once the event data 28 is set, the plus/minus emotion setting unit 12 determines a change in the mental state in step S18. The mental state is determined using the mental state dictionary shown in FIG. The mental state dictionary has numerical values set according to the character's attributes, and if the numerical value is positive, it is a positive emotion, and if the numerical value is negative, it is a negative emotion, and the magnitude of the emotion is indicated by the magnitude of the value. It will be done.

図12の心的状態辞書には、登場人物がその属性になった時に予想されるプラスマイナス感情の値が設定されている。たとえば、たとえばディズニーランドなどの遊園地は楽しい場所なので、その場所にいるときの登場人物のプラスマイナス感情は+7などと高い値となる。今回の場合、場所のコンビニの値は+1となっている。元の場所の値が0だとすると差は+1となる。 In the mental state dictionary shown in FIG. 12, the expected positive and negative emotional values are set when the character assumes the attribute. For example, an amusement park such as Disneyland is a fun place, so the characters' positive and negative emotions when they are at that place have a high value, such as +7. In this case, the value of the convenience store at the location is +1. If the value at the original location is 0, the difference is +1.

ここで、予め感情発生の基準値の大きさとして「+3」と設定してあったとして、大きさが+3に満たないので感情が発生しないと判断される。次の「くじを引く」も、心的状態辞書には「くじを引く」という行動がないので、これも感情が発生せず、心的状態に変化がないと判断され、標準応答を示すステップS19に進む。 Here, even if "+3" is set in advance as the magnitude of the reference value for emotion generation, since the magnitude is less than +3, it is determined that no emotion occurs. The next step, ``drawing a lottery,'' does not include the action ``drawing a lottery'' in the mental state dictionary, so this is also a step in which no emotion occurs and there is no change in mental state, indicating a standard response. Proceed to S19.

標準応答辞書には、「くじを引く」に対応する応答がないので、どこにも該当しない場合の「それでどうなったの?」を応答文6として表示装置3に表示する。 Since there is no response corresponding to "draw a lottery" in the standard response dictionary, "So what happened?" is displayed on the display device 3 as the response sentence 6 when the response is not applicable anywhere.

これを受けて太郎君は、「プリンが当たったよ」と答えたとする。意味解析を示すステップS16では、まず、図13示すように、「プリンが当たる」という行動90を作成する。行動90では、作用語61が「当たる」で、主語62が「太郎」で、対象66が「プリン」となる。そして、意味には、主語の所有物が対象となるように前後状態51を設定することが記述されている。この意味に従って、状況変化設定部11が、行動90を前後状態51に変換すると、図14示すように、後属性値で、「太郎」の所有物が「プリン」となる。 In response to this, Taro replies, ``I won the pudding.'' In step S16 showing semantic analysis, first, as shown in FIG. 13, an action 90 of "winning pudding" is created. In action 90, the operative word 61 is "Ataru", the subject 62 is "Taro", and the object 66 is "pudding". In the meaning, it is described that the context 51 is set so that the property of the subject becomes the object. According to this meaning, when the situation change setting unit 11 converts the action 90 into the before and after state 51, as shown in FIG. 14, the property of "Taro" becomes "pudding" in the rear attribute value.

図6に示すように、プリンは菓子の下位概念である。図12の心的状態辞書を見ると、所有物の菓子の値は+5である。ということは、太郎のプラスマイナス感情が、前状態の0から後状態の+5に5増加したことになる。これは、基準値の+3より大きい値なので、プラスマイナス感情設定部12は、プラスの感情を発生して設定する。そこでステップS17に進み、意味解析部13による感情語応答が行われる。 As shown in FIG. 6, pudding is a subordinate concept of confectionery. Looking at the mental state dictionary in FIG. 12, the value of sweets as a possession is +5. This means that Taro's positive and negative emotions increased by 5 from 0 in the previous state to +5 in the latter state. Since this value is larger than the reference value of +3, the plus/minus emotion setting unit 12 generates and sets a positive emotion. The process then proceeds to step S17, where the semantic analysis unit 13 makes an emotional word response.

感情語応答は、図15に示す感情語応答辞書に基づいて行われる。感情語応答辞書は、プラスの場合、応答語は、「よかったね」であり、マイナスの場合「残念だったね」である。今回は、プラス感情が発生したので、「よかったね」との応答文6を表示装置3に表示する。 The emotional word response is performed based on the emotional word response dictionary shown in FIG. In the emotional word response dictionary, if the response word is positive, the response word is "It was good," and if it is negative, the response word is "It was disappointing." This time, since a positive emotion has occurred, a response sentence 6 saying "That's good" is displayed on the display device 3.

人が会話する目的は、何か言いたいことがあるからである。言いたいこととは、昨日こんなことがあったといったことである。それは、一言でいえば、こんな楽しいことがあったとか、こんな悲しいことがあったといった感情となる。感情を分解し、最も基本的な感情がプラスマイナス感情というわけである。つまり、その人にとって好ましいことか、好ましくないことかである。また、感情が発生することが、言いたいことの最小単位ともいえるし、本発明の「物語」の最小単位ともいえる。したがって、相手の発話から感情をよみとれなかったら、まだ、その「物語」が完結していないと判断でき、その続きを促すために、「それでどうなったの?」などと返答することができる。このようにして、自然な会話が可能となる。 The purpose of people having a conversation is because they have something to say. What I want to say is that something like this happened yesterday. In a nutshell, it is the feeling of having experienced something fun or something sad. When emotions are broken down, the most basic emotions are positive and negative emotions. In other words, it is something that is good or bad for that person. Furthermore, the generation of emotions can be said to be the smallest unit of what one wants to say, and can also be said to be the smallest unit of the "story" of the present invention. Therefore, if you cannot understand the emotion from the other person's utterances, you can judge that the "story" is not complete yet, and you can respond with "So what happened?" to encourage them to continue. . In this way, natural conversation becomes possible.

本発明の意味理解方法を一言でいえば、文の内容を、主体のプラスマイナス感情に落とし込むように処理することである。たとえば、「太郎は、コンビニでくじを引いて、プリンが当たった」といった文から読み取れることは、概念ツリーや単語オブジェクトの属性といったデータから、「プリンというものは甘くて丸いものだ」とか、「コンビニの店員は、冷蔵庫からプリンを取り出しただろう」とか、この文から考えられる意味は無限に考えられる。 To put it simply, the meaning understanding method of the present invention is to process the content of a sentence so as to reflect the positive and negative emotions of the subject. For example, what can be gleaned from a sentence such as ``Taro drew a lottery at a convenience store and won a pudding'' is derived from data such as the concept tree and the attributes of word objects, such as ``pudding is sweet and round.'' The convenience store clerk would have taken the pudding out of the refrigerator.'' There are an infinite number of possible meanings for this sentence.

そこを、太郎のプラスマイナス感情に落とし込むように処理するのである。つまり、太郎にとって、それは良かったのか、悪かったのかを導くように情報を整理する。そのための工夫として、「当たる」という動詞の意味を、登場人物の所有物の変化となるように定義した。なぜなら、人は価値のあるものを得ることで嬉しくなり、価値のあるものを失うことで悲しくなるという、プラスマイナス感情が発生するからである。 This is processed in a way that reflects Taro's positive and negative emotions. In other words, the information is organized in a way that leads to whether it was good or bad for Taro. To this end, I defined the meaning of the verb ``ataru'' to mean a change in the characters' possessions. This is because people experience positive and negative emotions: they become happy when they gain something of value, and they become sad when they lose something of value.

作用語の意味は、様々な方法で定義することができるが、本発明では、登場人物のプラスマイナス感情の変化に寄与する意味を選択するといえる。このように、作用語の意味をプラスマイナス感情に関するものに整理することで、文の意味を絞ることができる。結果として、自然言語の意味理解の第一の定義である情報量の削減を行っているといえる。 The meaning of the action word can be defined in various ways, but in the present invention, it can be said that a meaning that contributes to a change in the characters' positive and negative emotions is selected. In this way, by organizing the meanings of action words into those related to positive and negative emotions, the meaning of the sentence can be narrowed down. As a result, it can be said that the amount of information, which is the first definition of understanding the meaning of natural language, is being reduced.

次に、自然言語の意味理解の第二の定義である行動予測について、第二の実施の形態を使って説明する。 Next, behavior prediction, which is the second definition of understanding the meaning of natural language, will be explained using the second embodiment.

図16は、本発明をロボット100に組み込んだ第二の実施の形態を示すブロック図であり、図17はその外観である。ロボット100は、人間とほぼ同じ大きさの人型ロボットであり、人間とほぼ同じ機能を有する。つまり、目107に備えられるカメラ101で外界を撮影し、マイク102で音声を聞き、口108に備えられるスピーカ103から音声を発する。また、手足109はモータ104で駆動され、そのほか接触センサ105なども備え、これらは制御装置106で制御される。 FIG. 16 is a block diagram showing a second embodiment in which the present invention is incorporated into a robot 100, and FIG. 17 is an external appearance thereof. The robot 100 is a humanoid robot that is approximately the same size as a human and has approximately the same functions as a human. That is, the camera 101 provided in the eye 107 photographs the outside world, the microphone 102 listens to sound, and the speaker 103 provided in the mouth 108 emits sound. Further, the limbs 109 are driven by a motor 104, and are also provided with a contact sensor 105, etc., which are controlled by a control device 106.

制御装置106において、第一の実施形態と同様の意味理解プログラムが実行される。ただし、本実施形態では、入力はマイク102からの音声入力であり、出力はスピーカ103からの音声出力である。そのため、入力文は音声が文字変換され、応答文も音声変換されて出力され、より人間に近い形で会話ができるようになっている。また、カメラ101やセンサ105によって音声以外の外界の状況も取得できる。そして、さらに異なるのは、意味理解プログラムの内容である。 In the control device 106, a semantic understanding program similar to that of the first embodiment is executed. However, in this embodiment, the input is audio input from the microphone 102, and the output is audio output from the speaker 103. Therefore, the input sentences are converted into text, and the response sentences are also converted into speech and output, allowing the user to converse in a manner closer to that of humans. Furthermore, the camera 101 and the sensor 105 can also acquire external conditions other than audio. What is further different is the content of the semantic understanding program.

本実施形態の意味理解プログラムは、ロボット100の「心」として機能する心理プログラムの一部として組み込まれる。心理プログラムは、人間の様々な心理を理解できるプログラムであり、社会的な感情も理解することが可能となっている。社会的な感情とは、相手と自分がいて成立する感情であり、「感謝」や「怒り」、「恥」といったものがある。 The meaning understanding program of this embodiment is incorporated as part of a psychological program that functions as the "mind" of the robot 100. A psychological program is a program that can understand various human psychology, and it is also possible to understand social emotions. Social emotions are emotions that occur when you and the other person are involved, and include ``gratitude,'' ``anger,'' and ``shame.''

一例として「感謝」の感情を理解する方法について説明する。ここで、ロボット100の名前を「ロボ太」とし、太郎がロボ太にプレゼントを贈ったとする。たとえば、太郎が「ロボ太、プレゼントをあげるよ」とプレゼントを渡したとする。 As an example, we will explain how to understand the emotion of "gratitude." Here, it is assumed that the name of the robot 100 is "Robota" and that Taro has given a present to Robota. For example, let's say that Taro hands over a present, saying, ``Robota, I'll give you a present.''

図18は、本実施形態の意味理解プログラムの出来事110のデータ構造である。出来事110には、登場人物として自分111と相手112を持つ。自分とは、心理プログラムが実行される自分のことであり、相手とは、自分と会話している相手のことである。 FIG. 18 shows the data structure of the event 110 of the semantic understanding program of this embodiment. The event 110 has a self 111 and an opponent 112 as characters. The self is the person on whom the psychological program is executed, and the other is the person with whom one is having a conversation.

「ロボ太、プレゼントをあげるよ」との入力文を得ると、「あげる」という述語を概念ツリーで検索し、「ゆずる」の下位概念であると判断し、出来事110の行動を生成する。行動の作用語120は、「ゆずる」となるので、作用語辞書から「ゆずる」のデータ構造を取得する。取得したデータ構造に対し、作用語120に「ゆずる」、主語121に「太郎」、「ゆずる相手」に「ロボ太」、「ゆずる物」に「プレゼント」を設定する。これで行動が完成する。 When the input sentence ``Robota, I'll give you a present'' is obtained, the predicate ``give'' is searched in the concept tree, determined to be a subordinate concept of ``yield'', and the action of event 110 is generated. Since the action word 120 is "Yuzuru", the data structure of "Yuzuru" is obtained from the action word dictionary. For the obtained data structure, the operator 120 is set to "Yuzuru", the subject 121 is set to "Taro", the "Yuzuru party" is set to "Robota", and the "Yuzuru item" is set to "Present". The action is now complete.

そして、行動の意味124にしたがって、出来事110の自分前後状態を設定する。自分前後状態とは、行動の前後の自分の状態を示すデータ構造であり、今回の場合、前属性名130、後属性名132は「所有物」であり、前属性値131は空であり、後属性値133は「プレゼント」となる。 Then, according to the meaning 124 of the action, the state before and after the event 110 is set. The own before and after state is a data structure that shows one's own state before and after an action, and in this case, the front attribute name 130 and the rear attribute name 132 are "possessions", and the front attribute value 131 is empty, The rear attribute value 133 is "present".

心的状態辞書で「プレゼント」を検索すると、たとえば+8といった値であり、ロボ太のプラスマイナス感情は+8となって、基準値より大きくなるので、ロボ太はプラス感情、たとえば「嬉しい」といった感情を発生することになる。 If you search for "present" in the mental state dictionary, the value will be +8, for example, and Robota's plus/minus emotion will be +8, which is greater than the standard value, so Robota will have a positive emotion, such as "happy". will occur.

ここで発生したのは、「自分」の感情である。つぎに、行動を確認すると、主語121が「太郎」となっている。つまり、行動したのは、現在、会話している相手である。相手の行動の結果、自分がプラス感情となったということは、自分がプラス感情となった原因は相手ということになる。 What occurred here were ``my'' feelings. Next, when checking the action, the subject 121 is "Taro." In other words, the person who took the action was the person with whom he was currently conversing. If you feel positive emotions as a result of the other person's actions, it means that the other person is the cause of your positive emotions.

ここで、社会的感情辞書というものを作成しておく。これは、「感謝」や「怒り」など、自分と相手がいて成り立つ社会的感情が発生するパターンを登録したものである。「感謝」の場合、自分にプラス感情が発生し、その原因が相手だった場合、相手に対して「感謝」の感情が発生するとする。今の場合、プレゼントをくれたのが太郎なので、ロボ太は太郎に対して「感謝」の感情が発生することになる。また、「感謝」の感情が発生したとき、相手にいう言葉として「ありがとう」と登録しておくことで、ロボ太は、プレゼントをもらって、太郎に「ありがとう」と言うことができる。 Here, we will create what is called a social emotion dictionary. This is a registration of patterns in which social emotions, such as "gratitude" and "anger," occur depending on the person and the other person. In the case of "gratitude," if a positive emotion occurs in oneself, and the cause of the positive emotion is the other person, the emotion of "gratitude" will occur toward the other person. In this case, since Taro is the one who gave him the present, Robota will feel a feeling of "gratitude" towards Taro. Also, by registering ``Thank you'' as the word to say to the other person when the emotion of ``gratitude'' occurs, Robota can receive a present and say ``Thank you'' to Taro.

このようにして、本実施形態の意味理解プログラムでは、「感謝」の感情を理解することができる。また、プレゼントをもらって「ありがとう」と言うこともできる。これは、人間がとる行動と同じである。つまり、人の行動予測ができているといえ、冒頭に定義した意味理解の第二の定義ができているといえる。 In this way, the meaning understanding program of this embodiment can understand the emotion of "gratitude." You can also say "thank you" when you receive a gift. This is the same behavior that humans take. In other words, it can be said that human behavior can be predicted, and the second definition of semantic understanding defined at the beginning has been achieved.

ここでプレゼントが、ロボ太の欲しいものでなかった場合を考えてみる。たとえば、太郎はロボ太は、きっと、乾電池が好きだろうと思って乾電池をプレゼントしたとする。ロボ太は、乾電池で動いているわけでないので、乾電池をもらっても嬉しく思わない。こんな場合でも、人間なら、相手の好意を汲み取って「ありがとう」というはずである。 Now let's consider a case where the present is not what Robota wants. For example, let's say that Taro thought that Robota would probably like dry cell batteries, so he gave him a dry cell battery. Robota doesn't run on batteries, so he won't be happy if he receives one. Even in such a situation, if you were a human, you would understand the other person's goodwill and say "thank you."

そこで、次は、このような複雑な感情も理解できるようにする。そのために、図19に示すように、自分のプラスマイナス感情を管理する自分感情管理部150を有する。自分感情管理部150は、実際に自分に発生した感情151と、相手が意図した自分の感情152を有する。今の場合、実際の自分の感情とは、乾電池をもらったロボ太のプラスマイナス感情なので、マイナスとなる。相手の意図とは、乾電池を受け取るとロボ太(自分)は喜ぶ(プラス感情)と思った太郎(相手)の意図のことであるので、相手(太郎)が意図した感情152はプラスとなる。 Therefore, the next step is to help students understand such complex emotions. To this end, as shown in FIG. 19, the user has a self-emotion management section 150 that manages his or her own positive and negative emotions. The own emotion management unit 150 has emotions 151 that actually occurred in oneself and emotions 152 that the other party intended. In this case, my actual emotions are the positive and negative emotions of Robota who received the battery, so they are negative. The other party's intention is the intention of Taro (the other party) who thought that Robota (himself) would be happy (positive emotion) if he received the battery, so the emotion 152 that the other party (Taro) intended is positive.

意味理解プログラムは、自分前後状態を設定した後、この自分感情管理部150を設定する。そして、社会的感情辞書に、相手が意図した自分の感情152がプラスであれば「感謝」の感情が発生すると登録しておく。このようにして、相手の気持ちを汲み取って、自分の気持ちより相手の気持ちを優先して「ありがとう」と言う、より複雑な感情が理解できるようになる。 The meaning understanding program sets the self-emotion management section 150 after setting the self-previous and post-self states. Then, it is registered in the social emotion dictionary that if the emotion 152 intended by the other person is positive, the emotion of "gratitude" will occur. In this way, you will be able to understand more complex emotions, such as understanding the other person's feelings and prioritizing their feelings over your own when saying "thank you."

なお、自分の感情を優先させるか、相手の意図を優先させるかは、パラメータを心理プログラムに設定して決定してもよい。このパラメータによって、相手を優先しがちな場合は、「優しい」となり、自分を優先しがちなら「自分勝手」となる。このようにして、ロボットの「性格」も設定することができる。 Note that whether to give priority to one's own feelings or to the other party's intentions may be determined by setting parameters in a psychological program. Depending on this parameter, if you tend to prioritize others, you will be considered "kind," and if you tend to prioritize yourself, you will be considered "selfish." In this way, the robot's "personality" can also be set.

このような機能は、相手の心を推し量る、または、相手が考える出来事を想像する機能といえる。相手の考える出来事を想像するとは、相手の考える出来事をシミュレートしているともいえる。この機能を実現するために、相手の心を仮想的に構築する。これを図20に示す。仮想的な相手の心160では、相手の考える出来事161が計算される。相手の考える出来事161は、相手の前後状態162を持っている。相手が考える相手とは、相手からみた相手なので、自分となる。したがって、相手の前後状態162に設定される属性値とは、相手が考える自分の属性値となる。 This kind of function can be said to be the function of guessing the other person's mind or imagining the events that the other person is thinking about. When you imagine an event that the other person thinks about, it can be said that you are simulating the event that the other person thinks about. In order to realize this function, the other person's mind is constructed virtually. This is shown in FIG. In the virtual opponent's mind 160, an event 161 that the other party thinks is calculated. An event 161 considered by the other party has a context 162 of the other party. The person that the other person thinks of is the person that the other person sees, so it becomes oneself. Therefore, the attribute value set in the opponent's front and back state 162 is the attribute value that the opponent considers to be his or her own.

先の例で説明すると、自分はロボ太で、相手が太郎となり、ロボ太(自分)が太郎(相手)の仮想的な心160を想像することとなる。仮想的な太郎の心160には、太郎の考える出来事161が設定される。太郎がロボ太に乾電池をプレゼントすると、ロボ太の後属性値が、ロボ太がもらった乾電池の価値だけ上がることとなる。ロボ太がもらった乾電池の価値は、実際にロボ太が感じる価値でなく、太郎が想像するロボ太の乾電池の価値となる。太郎は、太郎の経験や知識からロボ太が感じる乾電池の価値を想像する。たとえば、「ロボットだから乾電池をもらうと喜ぶだろう」といったことである。これは、太郎の知識として、主体別に心的状態辞書を作成しておき、「ロボット(主体)にとっての乾電池の価値は+5」といったように記録することで実現できる。そうすると、相手(太郎)が想定する自分(ロボ太)の感情は、乾電池をもらうと+5となる。これは、相手(太郎)の行動の結果、自分(ロボ太)のプラスマイナス感情がプラスとなることであり、これが相手の意図といえる。そして、相手が意図した自分の感情がプラスなら、相手は、自分を喜ばせようと思って行動したのであるから、相手に対して「感謝」の感情が発生する。逆に、相手が意図した自分の感情がマイナスなら、相手は、自分を不快にさせようと思って行動したのであるから、「怒り」の感情が発生する。 To explain using the previous example, you are Robota, your opponent is Taro, and Robota (yourself) imagines the virtual mind 160 of Taro (your opponent). Events 161 that Taro thinks about are set in the virtual mind 160 of Taro. When Taro presents Robota with a battery, Robota's posterior attribute value increases by the value of the battery that Robota received. The value of the battery that Robota received is not the value that Robota actually feels, but the value of Robota's battery that Taro imagines. Taro imagines the value of batteries that Robota feels from Taro's experience and knowledge. For example, ``Since he is a robot, he would be happy if he received a battery.'' This can be achieved by creating a mental state dictionary for each subject based on Taro's knowledge, and recording things like ``The value of a dry cell battery to the robot (subject) is +5.'' Then, the emotion that the other person (Taro) assumes for himself (Robota) will be +5 when he receives the battery. This means that as a result of the other person's (Taro) actions, one's (Robota)'s positive and negative emotions become positive, and this can be said to be the other person's intention. If the emotions intended by the other person are positive, the other person acted with the intention of making the other person happy, and the emotion of ``gratitude'' toward the other person occurs. On the other hand, if the feelings intended by the other person are negative, the other person acted with the intention of making you uncomfortable, and the emotion of anger will occur.

相手の心を推し量るとは、相手が行動するときに限らず、相手から見た自分の評価、価値を推測する場合も含まれる。つまり、相手が自分のことをどう思っているかも推測することができる。これができるようになると、他人の視線といったものも生成でき、「恥」という感情も生成できる。どんな集団や社会にも、その社会に属すなら、最低限満たしていて当然な基準というものが存在する。たとえば、「中学生なら、この程度の漢字は知っているはず」とか、「陸上部なら、50mを6秒台で走れるはず」といったことである。このような、「何々なら、少なくともこれはできるはず」といった、特定の社会で、最低限満たすべき基準が設定されたとする。この基準は、経験などから導かれるものである。そして、その社会に属している自分が、その基準を満たしておらず、それを他人が見てどう思うかとシミュレートしたとき、「恥」という感情が発生するようにする。そうすると、「何々なのに、これもできない」という他人から見た自分の価値を推測して、「恥ずかしい」という感情を生成することができる。 Guessing the other person's mind is not limited to when the other person acts, but also includes guessing one's own evaluation and value from the other person's perspective. In other words, you can guess what the other person thinks about you. Once we can do this, we can generate things like the gaze of others, and we can also generate the feeling of ``shame.'' In any group or society, there are minimum standards that must be met if you belong to that society. For example, ``Junior high school students should know this level of kanji,'' or ``If you're on the track and field team, you should be able to run 50 meters in less than 6 seconds.'' Suppose that a certain society sets a minimum standard that must be met, such as, ``If so-and-so should at least be able to do this.'' This standard is derived from experience. Then, when you, as a member of that society, do not meet the standards, and you simulate how others would feel if you did not meet the standards, the feeling of ``shame'' will occur. If you do this, you will be able to estimate your worth in the eyes of others, such as ``I can't do this,'' and you will feel embarrassed.

人は、この「恥」という感情を持ち得ることで、まとまりのある社会を形成する。なぜなら、その社会に属すには、最低限、その基準を満たすべきという心理的欲求が発生し、これが原動力となってその基準を満たすように行動するからである。この「恥」という感情を持つことで、人間社会に溶け込める心を持った人工知能が実現できる。 People form a cohesive society by having this emotion of shame. This is because, in order to belong to that society, there is a psychological need to at least meet the standards, and this becomes the driving force for behavior to meet those standards. By possessing this emotion of "shame," we can create artificial intelligence with a mind that can integrate into human society.

次は、「怒り」について説明する。たとえば、誰かがロボ太に「ポンコツ」と言ったとする。ロボ太は、聞いた音声を音声認識により文字列に変換して意味解析をする。「ポンコツ」という言葉の意味は、対象の性能が悪いことを示す。対象とは、ロボ太のことであるので、ロボ太は、自分に対して悪口を言われたと判断し、マイナス感情が発生する。ロボ太が見てみると、画像認識から次郎君が発言したことが確認できた。 Next, let's talk about "anger." For example, let's say someone says to Robota, "Ponkotsu." Robota uses speech recognition to convert the sounds it hears into character strings and then analyzes the meaning. The meaning of the word ``crank'' is that the performance of the target is poor. Since the target is Robo-ta, Robo-ta judges that he has been spoken ill of and feels negative emotions. When Robota took a look, image recognition confirmed that Jiro had spoken.

この状況を自分感情管理部150に設定すると、自分の感情はマイナスとなる。また、相手が言ったので、相手が意図をもって発言したと判断して、相手の意図した自分の感情152もマイナスとなる。社会的感情辞書には、相手が意図した自分の感情152がマイナスの場合、その行動をした相手に対して、「怒り」の感情が発生すると登録しておく。これによって、今の場合、「怒り」の感情が発生し、たとえば「何だとー!」などと怒りの感情に応じた応答をする。 If this situation is set in the personal emotion management section 150, the personal emotion becomes negative. Further, since the other party said it, it is determined that the other party said the statement with intention, and the own emotion 152 that the other party intended becomes negative. In the social emotion dictionary, if the emotion 152 intended by the other person is negative, it is registered that the emotion of "anger" will occur toward the other person who has performed the action. As a result, in this case, the emotion of ``anger'' is generated, and a response corresponding to the emotion of anger is generated, such as ``What?!''.

ここで、悪口を言った相手が「ごめんなさい」と言ってきたとする。「ごめんなさい」を概念ツリーで検索すると「謝罪」概念以下とわかるので、「謝罪」の行動を作成する。作用語を「謝罪」と設定し、「謝罪」の意味から出来事を設定すると、相手の意図した自分の感情152が±0となる。また、謝罪した人は、謝罪する相手に対して相対的に下の立場となる。つまり、「謝罪」とは、自ら自分の立場を下げることで、悪意がないことを示す機能があるといえる。ここで、意味理解プログラムが解析し直すと、相手の意図した自分の感情152が0となるので、怒りが発生しない、つまり、怒りが収まる。このようにして、「謝罪」といった心理も理解できるようになる。 Now, suppose that the person who has spoken ill of you says, "I'm sorry." When we search for "I'm sorry" in the concept tree, we find that it is below the "apology" concept, so we create an "apology" action. When the action word is set as "apology" and the event is set based on the meaning of "apology", the feelings 152 of one's self intended by the other party become ±0. Furthermore, the person who apologizes is in a lower position relative to the person to whom he or she apologizes. In other words, ``apology'' has the function of showing that there is no malicious intent by lowering one's own position. Here, when the meaning understanding program reanalyzes, the emotion 152 intended by the other person becomes 0, so anger does not occur, that is, the anger subsides. In this way, you will be able to understand the psychology of ``apology.''

つぎは、社会的感情に基づく行動予測について説明する。人は、相手との間で心理的なバランスを取ろうとする。たとえば、「怒り」の感情の場合、相手によって、自分はマイナス感情となっている。バランスを取るとは、相手によって自分がマイナス感情となっているなら、相手もマイナス感情とすることで、お互いがマイナスとなってバランスが取れるということである。そこで、心理プログラムは、「怒り」の感情が発生したとき、次の応答として、相手がマイナス感情を発生するような発言を探索する。 Next, we will explain behavior prediction based on social emotions. People try to maintain a psychological balance with their partner. For example, in the case of the emotion ``anger'', depending on the other person, one's own negative emotion may be felt. Achieving balance means that if you have negative emotions due to the other person, by making the other person have negative emotions as well, you will both be negative and a balance will be achieved. Therefore, when the emotion of "anger" occurs, the psychological program searches for a statement that will cause the other party to generate negative emotions as the next response.

これは、今までの逆の過程を行うことで実現可能である。つまり、出来事110において、自分前後状態を自分でなく相手の前後状態を想定し、相手がマイナス感情を発生するような後属性値を探し、その後属性値が設定されるような行動を探し出すわけである。これは、別の言い方をすれば、相手の立場に立って考えるともいえる。 This can be achieved by performing the reverse process. In other words, in event 110, assume that the other person's before and after situation is not your own, look for a subsequent attribute value that will cause the other party to feel negative, and then search for an action that will set the attribute value. be. In other words, this can be said to be about thinking from the other person's perspective.

一例として、相手に「バカ」と言われて、自分がマイナス感情となったとする。相手が、自分と同じマイナス感情となるような行動を探索して、たとえば、相手に「アホ」と言い返すことが考えられる。これは、「仕返し」や「報復」といった意味を理解してるといえる。これも、行動予測としての意味理解の一例である。 As an example, let's say someone calls you an idiot, and you feel negative emotions. It is conceivable to search for behaviors that will cause the other person to experience the same negative feelings as you, and for example, to respond by calling the other person "stupid." This can be said to be an understanding of the meaning of ``retaliation'' and ``retaliation.'' This is also an example of semantic understanding as action prediction.

「感謝」の気持ちが発生したときも、バランスを取ろうとして、相手がプラス感情となるように行動を取る。たとえば、誕生日プレゼントをもらったら、自分がプラス感情となったので、相手もプラス感情となるように、相手の誕生日にプレゼントをするといった行動を取る。これは、「お返し」といった意味を理解して行動しているといえる。このようにして、相手から受けたプラスマイナスの感情のバランスを取るように行動を取ることで、より人間の心に近い心理プログラムとなる。 Even when feelings of gratitude arise, we try to maintain a balance and act in a way that makes the other person feel positive emotions. For example, when you receive a birthday present, you feel positive, so you take action to make the other person feel positive, such as giving them a present on their birthday. This can be said to be an act that understands the meaning of "giving something back." In this way, by taking actions to balance the positive and negative emotions received from the other person, the psychological program becomes closer to the human heart.

つぎは、社会的感情として最も重要な「善」と「悪」について説明する。「善」とは、「相手のプラスマイナス感情がプラスとなるように行動すべき」と定義できる。つまり、相手が喜ぶことをすることが「善」というわけである。複数の行動を取り得る場合、相手がプラス感情となる行動を選択するように心理プログラムを構成することで、「善」の意味を理解できるというわけである。なぜなら、人間と同じ行動を取る(行動予測)ことができるということが、意味を理解しているといえるからである。同様に、「悪」は、複数の行動を取り得る場合、相手がマイナス感情となる行動を選択することと定義できる。 Next, we will explain the most important social emotions, ``good'' and ``bad.'' ``Goodness'' can be defined as ``one should act in such a way that the other person's positive and negative emotions become positive.'' In other words, doing something that makes others happy is ``good.'' When multiple actions are possible, the meaning of "good" can be understood by configuring a psychological program to select the action that will give the other person positive feelings. This is because being able to take the same actions as humans (behavior prediction) can be said to understand meaning. Similarly, "evil" can be defined as choosing an action that causes negative feelings in the other person, when multiple actions are possible.

ここで、相手が存在しない場合の善悪の判断を考えてみる。たとえば、道にゴミを捨てるといった行為の場合である。これは、明らかに「悪い」行動であるが、明確な相手が存在しない。このような場合は、関係する第三者を相手として設定する。関係する第三者とは、その行為によって影響を受ける主体のことであり、「道にゴミを捨てる」場合、その道を使う人などである。 Let's now consider the judgment of right and wrong when the other person does not exist. For example, this is the case with the act of throwing garbage on the street. This is clearly "bad" behavior, but there is no clear opponent. In such cases, the relevant third party is set as the other party. The relevant third party is the entity affected by the act, such as the person using the road in the case of ``throwing garbage on the road''.

ここで、関係する第三者の抽出方法について説明する。単語は、前記概念ツリーだけでなく、Has-aツリーでも管理される。Has-aツリーとは、全体と部分の関係で言葉を管理するデータ構造である。 Here, a method for extracting related third parties will be explained. Words are managed not only in the concept tree but also in the Has-a tree. The Has-a tree is a data structure that manages words in terms of whole and part relationships.

図21は、町140のHas-aツリー141のデータ構造である。道142が含まれるHas-aツリーを検索すると、町140が見つかったとする。町140は、住人143、道142、学校144、病院145などを持っているとする。町140に含まれる主体を探しだすと住人143が得られるので、この住人143を道に関係する第三者として設定する。つぎに、「ごみを捨てる」という行動を実行する。すると、出来事の登場物を町140として、町140の後状態で、後属性「環境」の後属性値が「汚損」となる。つぎに、この場合の町140の住人143の前後状態を設定する。町140の環境が「汚損」となってマイナス状態なので、町140に含まれる住人143の感情もマイナス感情となることが算出される。以上のことから、「道にゴミを捨てる」という行為は、その道に関係する町140の住人143がマイナス感情となるので、「悪い」行為だといえる。 FIG. 21 shows the data structure of the Has-a tree 141 of the town 140. Assume that a town 140 is found when searching the Has-a tree that includes the road 142. It is assumed that the town 140 has residents 143, roads 142, schools 144, hospitals 145, etc. When a subject included in the town 140 is searched, a resident 143 is obtained, and this resident 143 is set as a third party related to the road. Next, perform the action of ``throwing away garbage''. Then, with the town 140 as the object appearing in the event, the post-attribute value of the post-attribute "environment" becomes "defacement" in the post-state of the town 140. Next, the forward and backward states of the residents 143 of the town 140 in this case are set. Since the environment of the town 140 is "contaminated" and in a negative state, it is calculated that the emotions of the residents 143 included in the town 140 are also negative emotions. From the above, the act of ``throwing garbage on the road'' can be said to be a ``bad'' act because the residents 143 of the town 140 related to the road experience negative feelings.

同様に、道に落ちてるゴミを拾う行為は、町140が美しくなり、町140の住人143がプラス感情となる行為なので「善い」行いと判断できる。このようにして、ある行為の善悪の判断は、その行為を行ったとき、その行為に関する第三者のプラスマイナス感情を計算することで判断できるようになる。このようにして、心理プログラムは、人間社会の善悪の判断ができることで、心理プログラムを持つロボット100は、人間社会で人間と共存することができるといえる。 Similarly, the act of picking up trash on the road can be judged as a "good" act because it makes the town 140 beautiful and the residents 143 of the town 140 feel positive emotions. In this way, it becomes possible to judge whether an action is right or wrong by calculating the positive and negative feelings of a third party regarding the action when the action is performed. In this way, it can be said that the robot 100 with the psychological program can coexist with humans in human society because the psychological program can judge the good and bad of human society.

次は、心理的状況である「努力」という言葉の意味の理解について説明する。たとえば、太郎君がかけっこの練習をしていたとする。図22は、「走る」という行動から導かれる二つの前後状態である。前後状態Aは、走ることで、身体状態が疲労することを示している。前後状態Bでは、走ることで足の速さが速くなることを示している。前後状態Aからは疲労というマイナス感情が発生し、前後状態Bからは、足が速くなるというプラス感情が発生している。「努力」という心理状態は、プラス感情になるために、マイナス感情が発生しても、あえて、その行動を選択する心理状態と定義することができる。 Next, I will explain the understanding of the meaning of the word ``effort'', which is a psychological situation. For example, suppose Taro is practicing running. FIG. 22 shows two before and after states derived from the action of "running". Anteroposterior state A indicates that running causes fatigue in the physical state. Front-back state B shows that running increases the speed of the legs. The negative emotion of fatigue arises from the front/back state A, and the positive emotion of becoming faster at the front/back state B. The psychological state of ``effort'' can be defined as a psychological state in which a person intentionally chooses to take action even if negative emotions occur in order to achieve positive emotions.

さらに、この行動を繰り返すことで、より足が速くなると算出できる。行動を繰り返すとは、時間をかけることである。つまり、ここで「時間」という概念が生まれてくる。また、50mを7秒以下で走るという条件を設定したとする。この条件を満たすように、走るという行動を繰り返す行動パターンを設定したとすれば、これは、「目標に向けて努力する」という心理状態を定義したことになり、この行動パターンで設定した条件が「目標」という言葉の意味となる。 Furthermore, by repeating this action, it can be calculated that your feet will become faster. Repeating an action means taking time. In other words, this is where the concept of "time" comes into being. Also, assume that the condition is set to run 50 meters in 7 seconds or less. If we set a behavioral pattern that repeats the action of running to satisfy this condition, this means that we have defined the psychological state of "making efforts toward a goal," and the conditions set in this behavioral pattern are This is the meaning of the word "goal".

このようにして、「努力」や「目標」といった心理状態を理解することができる。また、そのような行動をしている人に対して、その行動を後押しする言動を「応援」と定義することができる。「応援」の一例として、「がんばれ」という言動があげられる。たとえば目標に向けて努力している人を認識すると、「がんばれ」と声をかけることができるのである。 In this way, we can understand psychological states such as ``effort'' and ``goals.'' In addition, "support" can be defined as words and actions that support a person's behavior. An example of "support" is the words and actions of "do your best." For example, if you recognize someone who is working towards a goal, you can tell them to do their best.

つぎは、「後悔」という言葉を定義してみる。たとえば、大学合格といった目標を設定し、それに向けて勉強という努力をしたとする。しかし、その結果大学に合格しなかったとする。この場合、勉強という行動が足りなかったと推測できる。つまり、大学受験までの期間の中で、勉強という行動の数(量)が足りなかったと算出できる。仮に、勉強の量を増やしたとすれば、合格したという仮定の出来事を生成して、実際に起こった出来事と比較する。その二つを比較すると、違いが、勉強という行動の数と算出できる。つまり、過去の行動を変更することで、現実に起こったマイナス感情がプラス感情となるわけである。このパターンを「後悔」とすれば、「後悔」の意味が理解できたといえる。つまり、もっと勉強していれば、大学に合格したのになぁといった「後悔」という感情を理解できるわけである。 Next, let's define the word "regret." For example, let's say you set a goal of passing a university entrance exam and put effort into studying toward that goal. However, as a result, he did not get into university. In this case, it can be assumed that the student did not study enough. In other words, it can be calculated that the number (amount) of studying was insufficient during the period leading up to university entrance exams. If you increase the amount of studying, you can generate a hypothetical event in which you passed the exam and compare it with the event that actually occurred. When comparing the two, the difference can be calculated as the number of studying behaviors. In other words, by changing past actions, negative emotions that actually occurred can become positive emotions. If we call this pattern ``regret,'' we can say that we understand the meaning of ``regret.'' In other words, we can understand the feeling of ``regret,'' such as the feeling that if we had studied harder, we would have been able to get into university.

このようにして、本発明の意味理解プログラムは、様々な心理的状況を理解することができる。 In this way, the semantic understanding program of the present invention can understand various psychological situations.

本発明の各実施形態では、意味理解は、チャットボットシステム1またはロボット100と一体となった制御装置で実行しているが、本発明はこれに限定されるものではなく、たとえばインターネットで接続されたサーバーまたはクラウドで意味理解を行って、その結果をチャットボットシステム1またはロボット100に返すように構成してもよい。 In each embodiment of the present invention, semantic understanding is executed by a control device integrated with the chatbot system 1 or the robot 100, but the present invention is not limited to this. The configuration may be such that the semantic understanding is performed on a server or cloud, and the results are returned to the chatbot system 1 or the robot 100.

また、本発明の各実施形態では会話するシステムとして記載したが、会話や対話に限定されるものではなく、本発明の意味理解プログラムを文書の自動要約や機械翻訳に適用してもよい。 Furthermore, although each embodiment of the present invention has been described as a conversational system, the present invention is not limited to conversation or dialogue, and the meaning understanding program of the present invention may be applied to automatic document summarization or machine translation.

今回開示された実施の形態はすべての点で例示であって、どのような面からも制限的なものではないと理解されるべきである。本発明の範囲は上記した説明ではなく、請求の範囲によって規定され、請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 It should be understood that the embodiments disclosed herein are illustrative in all respects and are not restrictive in any respect. The scope of the present invention is defined not by the above description but by the claims, and is intended to include meanings equivalent to the claims and all changes within the scope.

1 チャットボットシステム、9 意味理解プログラム、10 場面設定部、11 状況変化設定部、12 プラスマイナス感情設定部 13 意味解析部、100 ロボット 1 Chatbot system, 9 Meaning understanding program, 10 Scene setting section, 11 Situation change setting section, 12 Plus/minus emotion setting section 13 Semantic analysis section, 100 Robot

Claims (3)

文字または音声による文が入力される入力装置と、CPUおよび主記憶メモリを有し、前記入力装置からの入力文を、単語に分解して、意味を解析する制御装置と、を有する自然言語処理システムであって、
前記主記憶メモリには、自然言語を理解し、心的状態を有し、自分に好ましい感情であるプラス感情、および自分に好ましくない感情であるマイナス感情を持つ主体に対応する単語を有する単語オブジェクトが生成され、
前記制御装置は、前記入力文の単語から前記主体の単語オブジェクトを生成し、前記主体のプラス感情またはマイナス感情を求めることで、前記主体の心的状態を判定し、前記主体の行動を予測することによって意味解析を行うことを特徴とする自然言語処理システム。
Natural language processing comprising: an input device into which written or spoken sentences are input; and a control device having a CPU and main memory, and which breaks down the input sentences from the input device into words and analyzes their meanings. A system,
In the main memory, there is a word object that has a word corresponding to a subject who understands natural language, has a mental state, and has positive emotions that are favorable emotions for oneself, and negative emotions that are unfavorable emotions for oneself. is generated,
The control device generates a word object of the subject from the words of the input sentence, determines the subject's positive emotion or negative emotion, thereby determining the subject's mental state and predicting the subject's behavior. A natural language processing system that performs semantic analysis by
文字または音声による文が入力される入力装置と、CPUおよび主記憶メモリを有し、前記入力装置からの入力文を、単語に分解して、意味を解析する制御装置と、を有する自然言語処理システムに用いられる自然言語処理方法であって、
前記主記憶メモリには、自然言語を理解し、心的状態を有し、自分に好ましい感情であるプラス感情、および自分に好ましくない感情であるマイナス感情を持つ主体に対応する単語を有する単語オブジェクトが生成され、
前記制御装置は、前記入力文の単語から前記主体の単語オブジェクトを生成し、前記主体のプラス感情またはマイナス感情を求めることで、前記主体の心的状態を判定し、前記主体の行動を予測することによって意味解析を行うステップを備えることを特徴とする自然言語処理方法。
Natural language processing comprising: an input device into which written or spoken sentences are input; and a control device having a CPU and main memory, and which breaks down the input sentences from the input device into words and analyzes their meanings. A natural language processing method used in a system,
In the main memory, there is a word object that has a word corresponding to a subject who understands natural language, has a mental state, and has positive emotions that are favorable emotions for oneself, and negative emotions that are unfavorable emotions for oneself. is generated,
The control device generates a word object of the subject from the words of the input sentence, determines the subject's positive emotion or negative emotion, thereby determining the subject's mental state and predicting the subject's behavior. A natural language processing method characterized by comprising a step of performing semantic analysis by performing semantic analysis.
文字または音声による文が入力される入力装置と、CPUおよび主記憶メモリを有し、前記入力装置からの入力文を、単語に分解して、意味を解析する制御装置と、を有する自然言語処理システムに用いられる自然言語処理プログラムであって、
前記主記憶メモリには、自然言語を理解し、心的状態を有し、自分に好ましい感情であるプラス感情、および自分に好ましくない感情であるマイナス感情を持つ主体に対応する単語を有する単語オブジェクトが生成され、
コンピュータを、
前記制御装置が、前記入力文の単語から前記主体の単語オブジェクトを生成し、前記主体のプラス感情またはマイナス感情を求めることで、前記主体の心的状態を判定し、前記主体の行動を予測することによって意味解析を行うよう機能させるための自然言語処理プログラム。
Natural language processing comprising: an input device into which written or spoken sentences are input; and a control device having a CPU and main memory, and which breaks down the input sentences from the input device into words and analyzes their meanings. A natural language processing program used in the system,
In the main memory, there is a word object that has a word corresponding to a subject who understands natural language, has a mental state, and has positive emotions that are favorable emotions for oneself, and negative emotions that are unfavorable emotions for oneself. is generated,
computer,
The control device generates a word object of the subject from the words of the input sentence, determines the subject's positive emotion or negative emotion, thereby determining the subject's mental state and predicting the subject's behavior. A natural language processing program that functions to perform semantic analysis by
JP2023134200A 2019-06-07 2023-08-21 Natural language processing system, natural language processing method, and natural language processing program Pending JP2023156489A (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
JPPCT/JP2019/022680 2019-06-07
PCT/JP2019/022680 WO2020246017A1 (en) 2019-06-07 2019-06-07 Natural language processing system, natural language processing method, and natural language processing program
JP2020514761A JPWO2020246056A1 (en) 2019-06-07 2019-11-08 Natural language processing system, natural language processing method and natural language processing program
JP2021147102A JP2021192299A (en) 2019-06-07 2021-09-09 Natural language processing system, natural language processing method, and natural language processing program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2021147102A Division JP2021192299A (en) 2019-06-07 2021-09-09 Natural language processing system, natural language processing method, and natural language processing program

Publications (1)

Publication Number Publication Date
JP2023156489A true JP2023156489A (en) 2023-10-24

Family

ID=73652188

Family Applications (3)

Application Number Title Priority Date Filing Date
JP2020514761A Pending JPWO2020246056A1 (en) 2019-06-07 2019-11-08 Natural language processing system, natural language processing method and natural language processing program
JP2021147102A Pending JP2021192299A (en) 2019-06-07 2021-09-09 Natural language processing system, natural language processing method, and natural language processing program
JP2023134200A Pending JP2023156489A (en) 2019-06-07 2023-08-21 Natural language processing system, natural language processing method, and natural language processing program

Family Applications Before (2)

Application Number Title Priority Date Filing Date
JP2020514761A Pending JPWO2020246056A1 (en) 2019-06-07 2019-11-08 Natural language processing system, natural language processing method and natural language processing program
JP2021147102A Pending JP2021192299A (en) 2019-06-07 2021-09-09 Natural language processing system, natural language processing method, and natural language processing program

Country Status (3)

Country Link
JP (3) JPWO2020246056A1 (en)
CN (1) CN113994339A (en)
WO (2) WO2020246017A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6978624B1 (en) * 2021-03-30 2021-12-08 ミッドナイトブレックファスト株式会社 Sentence writing device, writing method and information processing system
CN114239591B (en) * 2021-12-01 2023-08-18 马上消费金融股份有限公司 Sensitive word recognition method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6366749B2 (en) * 2017-01-19 2018-08-01 ソフトバンク株式会社 Interactive interface

Also Published As

Publication number Publication date
JPWO2020246056A1 (en) 2021-09-13
WO2020246017A1 (en) 2020-12-10
JP2021192299A (en) 2021-12-16
WO2020246056A1 (en) 2020-12-10
CN113994339A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
Carter et al. Language, discourse and literature: An introductory reader in discourse stylistics
KR101006191B1 (en) Emotion and Motion Extracting Method of Virtual Human
CN110998725B (en) Generating a response in a dialog
JP2023156489A (en) Natural language processing system, natural language processing method, and natural language processing program
US11222633B2 (en) Dialogue method, dialogue system, dialogue apparatus and program
KR20020067590A (en) Environment-responsive user interface/entertainment device that simulates personal interaction
KR20020067592A (en) User interface/entertainment device that simulates personal interaction and responds to user's mental state and/or personality
KR20020071917A (en) User interface/entertainment device that simulates personal interaction and charges external database with relevant data
CN107480766B (en) Method and system for content generation for multi-modal virtual robots
JP2006178063A (en) Interactive processing device
Hubal et al. Lessons learned in modeling schizophrenic and depressed responsive virtual humans for training
Rehm et al. From observation to simulation: generating culture-specific behavior for interactive systems
Bronzo Context, Compositionality, and Nonsense in Wittgenstein'Stractatus
CN116188642A (en) Interaction method, device, robot and storage medium
Brusk Steps Towards Creating Socially Competent Game Characters
Ishizuka et al. Describing and generating multimodal contents featuring affective lifelike agents with MPML
Bernsen et al. First prototype of conversational HC Andersen
CN109087644A (en) Electronic equipment and its exchange method of voice assistant, the device with store function
Cerezo et al. Interactive agents for multimodal emotional user interaction
Bédi Learning Icelandic in Virtual Reykjavik: Simulating real-life conversations with embodied conversational agents using multimodal clarification requests
Edlund In search for the conversational homunculus: serving to understand spoken human face-to-face interaction
JP7425945B1 (en) Computer conversation device, computer conversation method and program for computer conversation device
Anand Exploring the Applications and Limitations of Large Language Models: A Focus on ChatGPT in Virtual NPC Interactions
CN117560340B (en) Information interaction method, device and storage medium based on simulated roles
JP4347618B2 (en) Conversation device, conversation program, and recording medium recording conversation program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230822