JP6300596B2 - Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program - Google Patents

Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program Download PDF

Info

Publication number
JP6300596B2
JP6300596B2 JP2014066673A JP2014066673A JP6300596B2 JP 6300596 B2 JP6300596 B2 JP 6300596B2 JP 2014066673 A JP2014066673 A JP 2014066673A JP 2014066673 A JP2014066673 A JP 2014066673A JP 6300596 B2 JP6300596 B2 JP 6300596B2
Authority
JP
Japan
Prior art keywords
reading
information
morpheme
character string
node
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.)
Active
Application number
JP2014066673A
Other languages
Japanese (ja)
Other versions
JP2015191317A (en
Inventor
信行 西澤
信行 西澤
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.)
KDDI Corp
Original Assignee
KDDI Corp
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 KDDI Corp filed Critical KDDI Corp
Priority to JP2014066673A priority Critical patent/JP6300596B2/en
Publication of JP2015191317A publication Critical patent/JP2015191317A/en
Application granted granted Critical
Publication of JP6300596B2 publication Critical patent/JP6300596B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、トライに基づく構造で文字列のデータを格納する形態素解析用の辞書装置、形態素解析装置、データ構造ならびに形態素解析の方法およびプログラムに関する。   The present invention relates to a dictionary device for morphological analysis, a morphological analysis device, a data structure, a morphological analysis method, and a program for storing character string data in a structure based on a trie.

音声合成技術の代表的な利用形態にテキスト音声変換(Text−To−Speech、TTS)がある。テキスト音声変換は、入力されたテキストに対応する音声波形を合成する処理である。以下では、この一連の処理は、入力されたテキストを解析してテキストの読み方に関する情報を生成する処理と、読み方に関する情報から音声波形を合成する処理の、大きく2つに分ける。また、入力は日本語の漢字仮名交じり文であるとする。   Text-to-speech conversion (Text-To-Speech, TTS) is a typical usage form of speech synthesis technology. Text-to-speech conversion is a process of synthesizing a speech waveform corresponding to input text. In the following, this series of processes is roughly divided into two processes: a process of analyzing input text to generate information on how to read the text, and a process of synthesizing a speech waveform from the information on how to read. Also, it is assumed that the input is a Japanese kanji kana mixed sentence.

以下では、読み方に関する情報を表現するために用いる記号を、音声合成用記号と呼ぶ。音声合成用記号には様々な形式があり得るが、ここでは、一連の音声を構成する音韻的情報と、主としてポーズや声の高さとして表現される韻律的情報を同時に表記したものを想定する。そのような音声合成用記号の例として、JEITA(電子情報技術産業協会)規格IT−4006「日本語テキスト音声合成用記号」がある(非特許文献1参照)。この記号だけで音声の感情表現等まで表現することは困難だが、少なくとも通常の読み上げ音声の言語的特徴を記述するために必要な情報は含まれている。   Hereinafter, a symbol used for expressing information on how to read is referred to as a speech synthesis symbol. There are various forms of symbols for speech synthesis. Here, we assume that the phonetic information that composes a series of speech and the prosodic information that is mainly expressed as a pose or voice pitch. . An example of such a symbol for speech synthesis is JEITA (Electronic Information Technology Industry Association) standard IT-4006 “Symbol for Japanese Text Speech Synthesis” (see Non-Patent Document 1). Although it is difficult to express even emotional expressions of speech with these symbols alone, it contains at least the information necessary to describe the linguistic features of normal speech.

一方、音声波形を合成する処理は、音声合成用記号の通りの波形が合成されるように行われる。したがって、日本語テキストの正確な読み上げを実現するためには、日本語の漢字仮名交じり文に対応した、正確な音声合成用記号を作成すればよい。   On the other hand, the process of synthesizing the speech waveform is performed so that the waveform according to the speech synthesis symbol is synthesized. Therefore, in order to realize accurate reading of the Japanese text, it is only necessary to create an accurate speech synthesis symbol corresponding to the Japanese kanji kana mixed text.

任意の日本語テキストから音声合成用記号を生成する処理は、日本語漢字仮名交じり文を形態素と呼ばれる言語表現上意味を持つ最小の単位に区切り、形態素ごとの読みを付与し、形態素列等を参照し形態素の情報を適切に変形し、必要に応じ、ポーズ等の韻律的境界を挿入し、それらを接続することで実現できる。この際、各形態素の読みは、形態素辞書情報として予め作成し格納しておく。   The process of generating symbols for speech synthesis from arbitrary Japanese text is to divide Japanese Kanji kana mixed sentences into the smallest units that have meaning in linguistic expressions called morphemes, add readings for each morpheme, It can be realized by referring to the morpheme information appropriately, inserting prosodic boundaries such as poses as necessary, and connecting them. At this time, the reading of each morpheme is created and stored in advance as morpheme dictionary information.

ただし、形態素は、言語学的な定義の通りである必要はなく、一連の処理を行う上で適当に区切られた単位でもよい。例えば、形態素の並びをより適切に処理するために、複数の形態素で構成される句(複合名詞句等)を便宜的に1つの形態素と見なして処理することがある。よって以下においては、形態素とは、その用途の観点から処理上の最小単位となるべく適当に設定された文字の並び(文字列)をいい、また、全ての文は、この文字列を連結することで構成できるものとする。また、ある文に対して、それを形態素に分割する処理は、一般に形態素解析処理と呼ばれ、音声合成処理に限らず、文の構成要素の抽出等で用いられている。   However, the morpheme does not have to be as defined in linguistic terms, and may be a unit appropriately divided for performing a series of processing. For example, in order to more appropriately process the arrangement of morphemes, a phrase composed of a plurality of morphemes (such as a compound noun phrase) may be regarded as one morpheme for convenience. Therefore, in the following, a morpheme refers to a sequence of characters (character string) that is appropriately set as a minimum unit for processing from the viewpoint of its use, and all sentences are concatenated with this character string. It can be configured with. A process of dividing a sentence into morphemes is generally called a morpheme analysis process, and is used not only for speech synthesis processing but also for extraction of sentence components.

形態素解析の方法として、以下では、最小コスト法に基づく方法を説明する。最小コスト法による形態素解析では、まず、各形態素の出現頻度を反映させた生起コスト関数と、連続する形態素の繋がりやすさを表す連接コスト関数を予め定義しておく。そして、形態素辞書に登録された形態素から、入力テキストに一致し、かつ文全体のコストが最小となるような形態素列を探すことで、適切な形態素列を得る。通常、生起コスト関数は出現頻度が高い形態素ほど、連接コスト関数は繋がりやすい形態素列ほど、その値が小さくなるよう定義される。   As a morphological analysis method, a method based on the minimum cost method will be described below. In the morpheme analysis by the minimum cost method, first, an occurrence cost function reflecting the appearance frequency of each morpheme and a concatenated cost function representing ease of connection of consecutive morpheme are defined in advance. Then, an appropriate morpheme sequence is obtained by searching the morpheme registered in the morpheme dictionary for a morpheme sequence that matches the input text and minimizes the cost of the entire sentence. Usually, the occurrence cost function is defined so that the morpheme having the higher appearance frequency and the concatenated cost function have the smaller value as the morpheme sequence that is more easily connected.

すなわち形態素列をM=(m1,…,mn)、生成コスト関数をCt(m)、連接コスト関数をCc(m(i−k+1),…,mi)とするとき、コストの総和Σ Ct +Σ Ccが最小となる形態素列M、すなわちargmin (Σ Ct +Σ Cc)を求めることで形態素解析処理が行われる。ただし、ここで連接コスト関数はk個の形態素の並びで決定されるものとする。   That is, when the morpheme sequence is M = (m1,..., Mn), the generation cost function is Ct (m), and the concatenation cost function is Cc (m (i−k + 1),..., Mi), the total cost Σ Ct + Σ A morpheme analysis process is performed by obtaining a morpheme string M that minimizes Cc, that is, argmin (Σ Ct + Σ Cc). Here, it is assumed that the concatenated cost function is determined by an array of k morphemes.

このようにコスト関数を定義すると、コスト的な最適な全体系列を構成する部分系列は、その部分系列だけを見てもコスト的には最適となる。したがって、コスト的に最適でない部分系列は、最適な全体系列の構成要素にはならないので、探索において考慮する必要がなくなる。このように、最適系列を構成する可能性がない部分系列を考慮しないように進める最適系列の探索法は一般に動的計画法と呼ばれ、効率よく最適系列の探索を行うことができる。   When the cost function is defined in this way, the partial series constituting the optimal whole series in terms of cost are optimal in terms of cost even when only the partial series is viewed. Therefore, the subsequence that is not optimal in terms of cost does not need to be considered in the search because it is not a component of the optimal overall sequence. As described above, the optimum sequence search method that does not consider a partial sequence that does not have the possibility of forming an optimum sequence is generally called dynamic programming, and the optimum sequence can be searched efficiently.

コスト関数の構成要素のうち、生起コストに関する情報は形態素辞書の内容として保持することができる。一方、連接コストについては連接表と呼ばれるテーブルを予め作成しておき、その表の値を使うことで求めることができる。ただし、全ての形態素列の組み合わせの表を作ることは難しいので、例えば形態素の品詞型だけに注目した表を用いることも行われる。なお、これらの関数は値が大きいほど好ましいものとして定義される場合もある。その場合は、文全体の値が最も大きくなる形態素系列を探すことになる。   Among the components of the cost function, information on the occurrence cost can be held as the contents of the morpheme dictionary. On the other hand, the connection cost can be obtained by creating a table called a connection table in advance and using the values in the table. However, since it is difficult to create a table of all morpheme sequence combinations, for example, a table that focuses only on the morpheme part-of-speech type is also used. In some cases, these functions are defined as having larger values. In that case, a morpheme sequence having the largest value of the entire sentence is searched.

形態素解析における形態素列の探索処理では可能な形態素の並び全てを調べることが好ましい。そのため、通常の形態素解析では、形態素の候補を得るために、文中の任意の位置から始まる部分文字列を検索のキーとして、形態素辞書に登録された形態素のうち、キーの先頭部分文字列に等しい形態素全てを取り出す、という処理が繰り返し行われる。このような探索は、一般にCommon prefix search(共通接頭辞探索)と呼ばれる。これを比較的効率よく表現するデータ構造として、trie(トライ)やPatricia tree(パトリシア木)が知られている。   In the morpheme string search process in morpheme analysis, it is preferable to examine all possible morpheme sequences. Therefore, in normal morpheme analysis, in order to obtain a morpheme candidate, a partial character string starting from an arbitrary position in a sentence is used as a search key, and the morpheme registered in the morpheme dictionary is equal to the first partial character string of the key. The process of extracting all morphemes is repeated. Such a search is generally referred to as a common prefix search. As a data structure that expresses this relatively efficiently, trie and Patricia tree are known.

ここで、トライは複数の文字列を格納するための多分木構造で、ここでは、各文字列の先頭文字から順に各文字を木の枝として格納していくことで構築されものとする。トライでは、文字列間の共通な接頭辞が木構造上で共有されるので、検索対処の文字列の接頭辞となる全ての登録語は、木構造の1つのパス上に配置される。つまり、トライのルート(根)から検索キーに沿って木をリーフ(葉)方向にたどって行くことで、common prefix searchを実現できる。   Here, a trie is a multi-tree structure for storing a plurality of character strings, and here, it is assumed that each character is stored as a tree branch in order from the first character of each character string. In the trie, a common prefix between character strings is shared on the tree structure, and therefore, all registered words that are prefixes of the character strings to be searched are arranged on one path of the tree structure. That is, the common prefix search can be realized by tracing the tree in the leaf direction along the search key from the root of the trie.

またパトリシア木とは、先述のトライにおいて、子が1つしかないノードを、その子ノードと結合させたものをいう。この結合によって、1つの枝には1文字だけでなく、連続する複数の文字が格納されることもある。以下ではパトリシア木の様なものも含めて、共通接頭辞がデータ構造上で共有され、全体として木構造となっているものをまとめてトライと呼ぶ。   In addition, the Patricia tree means a node obtained by combining a node having only one child with the child node in the above-described trie. By this combination, not only one character but also a plurality of consecutive characters may be stored in one branch. In the following, a common prefix including a Patricia tree is shared on the data structure, and a tree structure as a whole is collectively called a trie.

「日本語テキスト音声合成用記号」JEITA規格 IT−4006、2010年3月"Symbol for Japanese text-to-speech synthesis" JEITA standard IT-4006, March 2010

日本語に限らず、多くの言語では、文字表記からその読み方が規則的に決まらないことがある。あるいは規則があっても複雑なため、規則的に決めることが現実的でない場合がある。例えば「行った」という文字列に対して、それを「いった」と読むべきなのか「おこなった」と読むべきなのかは、その前後の文脈で決まるが、一般にその文脈までを考慮した自動処理は困難である。そこで、例えば日本語テキストにおいては、例えばルビのように読みに関する付加的な情報を付与し、その読み方・意味を示すことがある。   In many languages, not limited to Japanese, how to read them may not be determined regularly based on character notation. Or, even if there is a rule, it is complicated and it may not be practical to decide regularly. For example, whether or not to read a character string “I went” should be read as “I did” or “I did” is determined by the context before and after it, but in general it is automatic considering the context Processing is difficult. Therefore, for example, in Japanese text, additional information related to reading is given, for example, as ruby, and the reading / meaning of the information may be indicated.

しかし、多くのケースでそのような情報は部分的にのみ与えられる。さらに、ルビのような情報が付与されている場合であっても、アクセント等に関する情報は通常付与されてないため、音声合成処理を行うためには何らかの形でアクセント型等を決定する必要がある。   However, in many cases such information is only given in part. Furthermore, even when information such as ruby is given, information about accents is not usually given, so it is necessary to determine the accent type in some form in order to perform speech synthesis processing. .

このことを踏まえ、音声合成処理で高い読み・アクセント精度を実現するためには、例えば、ルビのような情報が与えられた場合でも、それを直接読み情報として使うのではなく、通常の音声合成処理と同様の形態素解析処理を行い、形態素情報に予め結び付けておいた読み情報に基づき、そのアクセント型等を決定する方法が考えられる。この場合のルビ情報は、形態素に付与された複数の読み情報から正解を選択するための情報として使われる。   Based on this, in order to achieve high reading and accent accuracy in speech synthesis processing, for example, even if information such as ruby is given, it is not used directly as reading information, but instead of normal speech synthesis A method of performing the same morpheme analysis process as the process and determining the accent type or the like based on the reading information previously linked to the morpheme information is conceivable. The ruby information in this case is used as information for selecting a correct answer from a plurality of reading information given to the morphemes.

しかし、形態素解析の段階から読みを考慮することで、より正確な形態素解析を実現できる。具体的には表記文字列が同じでも読みが異なる形態素は異なる形態素として扱い、それぞれの形態素の生成コストや連結コストにそれぞれ適切な値を設定することで、最小コスト法に基づく形態素解析をより高精度に行うことができる。この場合、ルビのような情報がある場合は、形態素候補としてルビに合致する形態素のみを候補として列挙し、一方、ルビがなければ、表記文字列が一致する全ての形態素を候補として列挙し、それらの最適な系列を探索することになる。   However, more accurate morphological analysis can be realized by considering reading from the morphological analysis stage. Specifically, morphemes with the same written character string but different readings are treated as different morphemes, and by setting appropriate values for the generation cost and concatenation cost of each morpheme, morpheme analysis based on the minimum cost method is further improved. Can be done with precision. In this case, if there is information such as ruby, only morphemes that match ruby are listed as candidates as morpheme candidates, while if there is no ruby, all morphemes that match the written character string are listed as candidates, Those optimum sequences will be searched.

このような処理を効率的に実施するためには、形態素解析における形態素辞書参照段階で、形態素に関する読み情報を効率的に取得できる必要がある。このような処理においては、ルビ等を通じて与えられる、形態素の読みに関する制約条件にはマッチしない形態素候補を、形態素候補列挙のできるだけ処理の早い段階で捨てることができれば、その処理を効率化できる。   In order to efficiently perform such processing, it is necessary to be able to efficiently acquire reading information about morphemes at the morpheme dictionary reference stage in morpheme analysis. In such a process, if a morpheme candidate that does not match the constraint on reading of a morpheme given through ruby or the like can be discarded as early as possible in the morpheme candidate enumeration process, the process can be made more efficient.

しかし、例えば木構造に基づく形態素辞書を用いた場合、読み情報は木のリーフにのみ結び付けられていたため、木をルートから辿って行きリーフノードに達するまで、辿った部分までの部分的な読み情報も得ることができない。つまり、読みに関する制約条件にマッチしない形態素候補についても、木構造辞書のリーフノードまで辿る必要がある。   However, for example, when a morpheme dictionary based on a tree structure is used, the reading information is linked only to the leaf of the tree, so the partial reading information up to the traced part is traced from the root to the leaf node. I can't even get. In other words, morpheme candidates that do not match the restrictions on reading must be traced to the leaf nodes of the tree structure dictionary.

共通接頭辞探索を行うための従来のトライに基づく形態素辞書構造では、形態素終端の位置にあるノード、すなわちルートノードからリーフノード方向に木を辿った場合に、表記の最後の文字に対応する枝の直後のノードに、読みに関する情報も含め、形態素に関する情報を全て結び付けていた。あるいは、形態素辞書上で文字列終端を示す符号を定義した場合は、対応する形態素に関する全ての情報を終端文字の枝の直下のリーフノードに結び付けていた。   In the conventional trie based morpheme dictionary structure for common prefix search, when the tree is traced from the root node to the leaf node, the branch corresponding to the last character of the notation All the information about the morpheme, including the information about reading, was linked to the node immediately after. Alternatively, when a code indicating the end of a character string is defined on the morpheme dictionary, all information regarding the corresponding morpheme is linked to the leaf node immediately below the branch of the end character.

つまり、形態素終端に対応するノードまで木を辿って初めてその形態素の情報を得られていた。このため、読みに関する制約の付きの形態素解析処理を行う場合、共通接頭辞探索により辞書登録された形態素を表記文字列情報だけを使ってまず取り出してから、読み制約に合わない形態素候補を仮説から捨てる操作を行う必要がある。   In other words, the morpheme information was obtained only after tracing the tree to the node corresponding to the morpheme terminal. For this reason, when performing morpheme analysis processing with restrictions on reading, first extract morphemes registered in the dictionary by common prefix search using only the written character string information, and then select morpheme candidates that do not meet the reading restrictions from the hypothesis. It is necessary to perform the discarding operation.

本発明は、このような事情に鑑みてなされたものであり、形態素解析の際に各ノードで条件を満たさない候補を破棄することができ、処理を効率化することができる辞書装置、形態素解析装置、データ構造ならびに形態素解析の方法およびプログラムを提供することを目的とする。   The present invention has been made in view of such circumstances, and a dictionary device and a morphological analysis that can discard candidates that do not satisfy the condition at each node during morphological analysis and can improve the processing efficiency. An object is to provide a device, a data structure, and a method and program for morphological analysis.

(1)上記の目的を達成するため、本発明の辞書装置は、ルートからリーフへ枝分かれするトライに基づく構造で文字列のデータを格納する形態素解析用の辞書装置であって、形態素を構成する文字または部分文字列は、枝に対応付けられて格納され、少なくとも前記枝を接続するノードのルート側最近接の枝に対応付けられた文字または部分文字列に関する情報が、すべてのノードに対応付けられて格納されていることを特徴としている。   (1) In order to achieve the above object, the dictionary device of the present invention is a morpheme analysis dictionary device that stores character string data in a structure based on a trie that branches from a root to a leaf, and constitutes a morpheme. A character or partial character string is stored in association with a branch, and at least information about the character or partial character string associated with the closest branch on the root side of the node connecting the branches is associated with all nodes. It is characterized by being stored.

これにより、形態素解析装置は、共通接頭辞探索の途中で、登録形態素の先頭から途中までの読みに関する情報を参照できる。例えば、先頭一文字に読みが読み制約を満たさない場合には、その時点で、その文字と読みから始まる登録形態素全てが、形態素解析の正解にならないことが確定する。そして、それ以上トライ構造の辞書を辿る必要がなくなり、処理を効率化できる。これにより、形態素解析の際に各ノードで条件を満たさない候補を破棄することができ、処理を効率化することができる。   Thereby, the morpheme analyzer can refer to information related to reading from the beginning to the middle of the registered morpheme during the common prefix search. For example, if the reading of the first character does not satisfy the reading constraint, it is determined at that time that all of the registered morphemes starting from the character and the reading are not correct in the morphological analysis. Further, it is not necessary to follow the dictionary of the trie structure any more, and the processing can be made efficient. As a result, candidates that do not satisfy the condition at each node can be discarded at the time of morphological analysis, and the processing can be made more efficient.

(2)また、本発明の辞書装置は、前記ノードに、ルート側最近接の枝に対応付けられた文字または部分文字列の読みに関する情報および前記読みに関する情報の識別情報と、前記読みに関する情報に対してルート側際近接のノードに対応付けられて読み情報の識別情報が格納されていることを特徴としている。これにより、ルートから続く読みのうち複数の読みが生じるノードで条件を満たさない候補を破棄できる。   (2) Further, the dictionary device of the present invention provides the node with information relating to reading of a character or partial character string associated with the closest branch on the route side, identification information of the information relating to the reading, and information relating to the reading. On the other hand, the identification information of the reading information is stored in association with the node near the route. As a result, candidates that do not satisfy the condition can be discarded at a node where a plurality of readings among the readings continuing from the root occur.

(3)また、本発明の辞書装置は、前記ノードに、ルートから前記ノードに至る経路の枝に対応付けられた文字または部分文字列を順に連結して構成した文字列の読みに関する情報が対応付けられて格納されていることを特徴としている。これにより、ルートから続く読みのうち複数の読みが生じるノードで条件を満たさない候補を破棄できる。   (3) Further, in the dictionary device of the present invention, the node is associated with information related to reading of a character string formed by sequentially connecting characters or partial character strings associated with a branch of a route from a route to the node. It is characterized by being attached and stored. As a result, candidates that do not satisfy the condition can be discarded at a node where a plurality of readings among the readings continuing from the root occur.

(4)また、本発明の形態素解析装置は、文字列をもとに、これに関する読みの情報を出力する形態素解析装置であって、(1)から(3)のいずれかに記載の辞書装置と、入力された文字列を形態素に区切り、文字列の順に沿って前記形態素ごとに前記入力された文字列を前記辞書装置に照合し、前記形態素ごとに読みに関する情報の候補を出力する照合部と、前記入力された文字列に付随する所定の制約を参照し、前記ノードごとに読みに関する情報が前記所定の制約を満たすか否かを判定し、前記所定の制約を満たさない候補を破棄する制約参照部と、を備えることを特徴としている。これにより、形態素の読みを照合していく処理において条件を満たさない候補を早い段階で破棄できるため、処理を効率化できる。   (4) Moreover, the morpheme analyzer of this invention is a morpheme analyzer which outputs the reading information regarding this based on a character string, Comprising: The dictionary apparatus in any one of (1) to (3) And a collating unit that divides the inputted character string into morphemes, collates the inputted character string for each morpheme in the order of character strings with the dictionary device, and outputs information candidates regarding reading for each morpheme And whether or not the information related to reading satisfies the predetermined constraint for each node, and discards candidates that do not satisfy the predetermined constraint. And a constraint reference unit. Thereby, candidates that do not satisfy the condition can be discarded at an early stage in the process of collating morpheme readings, and the process can be made more efficient.

(5)また、本発明のデータ構造は、コンピュータ内の記憶部に、ルートからリーフへ枝分かれするトライに基づいて構成される形態素解析用の辞書のデータ構造であって、形態素を構成する文字または部分文字列は、枝に対応付けられて格納され、少なくとも前記枝を接続するノードのルート側最近接の枝に対応付けられた文字または部分文字列に関する情報が、すべてのノードに対応付けられて格納されていることを特徴としている。これにより、形態素解析の際に各ノードで条件を満たさない候補を破棄することができ、処理を効率化することができる。   (5) Further, the data structure of the present invention is a data structure of a dictionary for morpheme analysis configured based on a trie branching from a root to a leaf in a storage unit in a computer, and includes a character or The partial character string is stored in association with the branch, and at least information on the character or partial character string associated with the closest branch on the root side of the node connecting the branches is associated with all the nodes. It is characterized by being stored. As a result, candidates that do not satisfy the condition at each node can be discarded at the time of morphological analysis, and the processing can be made more efficient.

(6)また、本発明の方法は、文字列をもとに、これに関する読みの情報を出力する形態素解析の方法であって、入力された文字列を形態素に区切り、文字列の順に沿って前記形態素ごとに前記入力された文字列を(1)から(3)のいずれかに記載の辞書装置に照合し、前記形態素ごとに読みに関する情報の候補を出力するステップと、前記入力された文字列に付随する所定の制約を参照し、前記ノードごとに読みに関する情報が前記所定の制約を満たすか否かを判定し、前記所定の制約を満たさない候補を破棄するステップと、をコンピュータを用いて実行することを特徴としている。これにより、形態素の読みを照合していく処理において条件を満たさない候補を早い段階で破棄できるため、処理を効率化できる。これにより、形態素の読みを照合していく処理において条件を満たさない候補を早い段階で破棄できるため、処理を効率化できる。   (6) Further, the method of the present invention is a morpheme analysis method for outputting reading information related to a character string, dividing the input character string into morphemes, and following the order of the character strings. Collating the input character string for each morpheme with the dictionary device according to any one of (1) to (3), outputting candidate information on reading for each morpheme, and the input characters Using a computer, referring to a predetermined constraint attached to a column, determining whether information about reading satisfies the predetermined constraint for each node, and discarding candidates that do not satisfy the predetermined constraint It is characterized by being executed. Thereby, candidates that do not satisfy the condition can be discarded at an early stage in the process of collating morpheme readings, and the process can be made more efficient. Thereby, candidates that do not satisfy the condition can be discarded at an early stage in the process of collating morpheme readings, and the process can be made more efficient.

(7)また、本発明のプログラムは、文字列をもとに、これに関する読みの情報を出力する形態素解析のプログラムであって、入力された文字列を形態素に区切り、文字列の順に沿って前記形態素ごとに前記入力された文字列を(1)から(3)のいずれかに記載の辞書装置に照合し、前記形態素ごとに読みに関する情報の候補を出力する処理と、前記入力された文字列に付随する所定の制約を参照し、前記ノードごとに読みに関する情報が前記所定の制約を満たすか否かを判定し、前記所定の制約を満たさない候補を破棄する処理と、を含む一連の処理をコンピュータに実行させることを特徴としている。これにより、形態素の読みを照合していく処理において条件を満たさない候補を早い段階で破棄できるため、処理を効率化できる。   (7) Further, the program of the present invention is a morpheme analysis program that outputs reading information relating to a character string, and divides the input character string into morphemes and follows the order of the character strings. A process of collating the input character string for each morpheme with the dictionary device according to any one of (1) to (3), and outputting a candidate for information about reading for each morpheme, and the input character A series of processing including: referring to a predetermined constraint attached to a column, determining whether information about reading satisfies the predetermined constraint for each node, and discarding candidates that do not satisfy the predetermined constraint It is characterized by causing a computer to execute processing. Thereby, candidates that do not satisfy the condition can be discarded at an early stage in the process of collating morpheme readings, and the process can be made more efficient.

本発明によれば、形態素解析の際に各ノードで条件を満たさない候補を破棄することができ、処理を効率化することができる。   According to the present invention, candidates that do not satisfy the condition at each node can be discarded at the time of morphological analysis, and the processing can be made efficient.

本発明の形態素解析装置を示すブロック図である。It is a block diagram which shows the morphological analyzer of this invention. 本発明の形態素解析装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the morphological analyzer of this invention. 従来のデータ構造の一例を示す図である。It is a figure which shows an example of the conventional data structure. 本発明のデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of this invention. 本発明のデータ構造の一例を示す図である。It is a figure which shows an example of the data structure of this invention.

次に、本発明の実施の形態について、図面を参照しながら説明する。以下の説明において表記文字列が同じであっても読みが異なる形態素は、異なる形態素として扱う。   Next, embodiments of the present invention will be described with reference to the drawings. In the following description, morphemes with different readings even if the notation character strings are the same are treated as different morphemes.

[第1の実施形態]
(形態素解析装置の構成)
図1は、形態素解析装置100を示すブロック図である。図1に示すように、形態素解析装置100は、照合部110、辞書装置120、制約参照部130、決定部140および連接表記憶部150を備え、入力された文字列をもとに、読みに関する情報のうち適したものを決定し出力する。
[First Embodiment]
(Configuration of morphological analyzer)
FIG. 1 is a block diagram showing a morphological analyzer 100. As shown in FIG. 1, the morphological analysis apparatus 100 includes a collation unit 110, a dictionary device 120, a constraint reference unit 130, a determination unit 140, and a connection table storage unit 150, and relates to reading based on an input character string. Determine and output suitable information.

照合部110は、入力された文字列(漢字仮名交じり文)を形態素に区切り、文字列の順に沿って形態素ごとに入力された文字列を辞書装置120に照合し、読みに関する情報の候補を出力する。辞書装置120内のデータは格納された文字列に沿った順で照合される。   The collation unit 110 divides the input character string (kanji-kana mixed text) into morphemes, collates the character strings input for each morpheme in the order of the character strings, and outputs candidate information about reading. To do. The data in the dictionary device 120 is collated in the order along the stored character string.

辞書装置120は、文字列のデータおよび文字列のデータに関する情報を格納する。辞書装置120は、ルートからリーフへ枝分かれするトライに基づく構造で文字列のデータを格納する。辞書装置120は、そのインデックスに発音情報を埋め込んだデータ構造のデータを有している事が好ましい。   The dictionary device 120 stores character string data and information related to character string data. The dictionary device 120 stores character string data in a structure based on a trie that branches from a root to a leaf. The dictionary device 120 preferably has data having a data structure in which pronunciation information is embedded in the index.

例えば、辞書装置120において、形態素を構成する文字または部分文字列は枝に対応付けられて格納される。少なくとも枝を接続するノードのルート側最近接の枝に対応付けられた文字または部分文字列に関する情報が、すべてのノードに対応付けられて格納されている。ノードには、ルートからノードに至る経路の枝に対応付けられた文字または部分文字列を順に連結して構成した文字列の読みに関する情報が対応付けられて格納されていることが好ましい。これにより、ルートから続く読みのうち複数の読みが生じるノードで条件を満たさない候補を破棄できる。   For example, in the dictionary device 120, characters or partial character strings constituting morphemes are stored in association with branches. Information on characters or partial character strings associated with at least the branch closest to the root of the node connecting the branches is stored in association with all nodes. The node preferably stores information relating to reading of a character string formed by sequentially connecting characters or partial character strings associated with branches of a route from the root to the node. As a result, candidates that do not satisfy the condition can be discarded at a node where a plurality of readings among the readings continuing from the root occur.

そのノードまでの部分文字列と一致する形態素が辞書登録されている場合は、そのフラグを1に、ない場合は0とする。また、フラグが1となっている読み関する情報に対応する形態素の生成コスト情報は仮に読み情報毎に設定する。なお、形態素の生成コスト情報は形態素の品詞型等、生成コスト関数のパラメータとなる情報も含む。   If a morpheme that matches the partial character string up to that node is registered in the dictionary, the flag is set to 1, otherwise it is set to 0. Further, the generation cost information of the morpheme corresponding to the information related to reading whose flag is 1 is set for each reading information. The morpheme generation cost information includes information that is a parameter of the generation cost function, such as a morpheme part-of-speech type.

トライにより構成されたデータ構造を用いて形態素解析処理を行う場合、共通接頭辞探索として、トライのルートノードからリーフノード方向に木をたどり、ノード上の形態素を候補して出力する。   When performing a morpheme analysis process using a data structure constituted by a trie, the tree is traced from the root node of the trie toward the leaf node as a common prefix search, and the morpheme on the node is output as a candidate.

制約参照部130は、入力された文字列に付随する所定の制約を参照し、ノードごとに読みに関する情報が所定の制約を満たすか否かを判定し、所定の制約を満たさない候補を破棄する。これにより、形態素の読みを照合していく処理において条件を満たさない候補を早い段階で破棄できるため、処理を効率化できる。   The constraint reference unit 130 refers to a predetermined constraint attached to the input character string, determines whether or not information related to reading satisfies the predetermined constraint for each node, and discards candidates that do not satisfy the predetermined constraint. . Thereby, candidates that do not satisfy the condition can be discarded at an early stage in the process of collating morpheme readings, and the process can be made more efficient.

制約参照部130は、入力された文字列に付随する読みに関する情報を制約として参照し、照合の結果として出力された候補のうち制約を満たす候補を出力する。辞書装置120のデータ構造を利用することで、形態素ごとに読みに関する情報を容易に参照することができるため、読みの情報の制約を考慮した形態素解析処理を実現できる。   The constraint reference unit 130 refers to information related to the reading accompanying the input character string as a constraint, and outputs candidates that satisfy the constraint among candidates output as a result of collation. By using the data structure of the dictionary device 120, it is possible to easily refer to information related to reading for each morpheme, so that it is possible to realize a morpheme analysis process in consideration of restrictions on reading information.

決定部140は、照合参照部130が出力した形態素候補の最適な並びをコストに基づき決定し、形態素解析結果の形態素列として出力する。連接表記憶部150は、部分文字列とその読みが連続したものと対応する各コストを表す連接表を記憶している。   The determination unit 140 determines an optimal arrangement of the morpheme candidates output from the collation reference unit 130 based on the cost, and outputs the result as a morpheme sequence of the morpheme analysis result. The concatenation table storage unit 150 stores a concatenation table representing costs corresponding to partial character strings and consecutive readings.

(トライに基づく特有のデータ構造)
辞書装置120では、トライに基づく形態素辞書のリーフノードを含む各ノードにおいて、ルートから各ノードまでに対応する部分文字列の読みに関する情報(部分文字列に関する情報)が格納されている。ただし、読みに関する情報は、複数種類登録される場合もある。また、形態素終端を表す符号は表記文字列側には設けず、各読み情報に対して、その読み情報に直接対応する形態素があるか否かを示す符号(ここでは終端フラグと呼ぶ)を設定する。
(Specific data structure based on trial)
In the dictionary device 120, in each node including a leaf node of a morphological dictionary based on a trie, information related to reading of a partial character string corresponding to the root to each node (information related to the partial character string) is stored. However, multiple types of information regarding reading may be registered. In addition, a code indicating the end of the morpheme is not provided on the notation character string side, and for each reading information, a code indicating whether or not there is a morpheme that directly corresponds to the reading information (herein referred to as an end flag) is set. To do.

(形態素解析装置の動作)
形態素解析装置100による共通接頭辞探索の動作例を説明する。図2は、形態素解析装置の動作を示すフローチャートである。まず、変数iを1に、トライのノードを表す変数nにトライのルートノードを設定する(ステップS1)。次に、探索文字列sのi番目の文字と一致するトライのノードnの枝があるか否かを判定し(ステップS2)、あると判定された場合にはステップS3に進み、ないと判定された場合には処理を終了する。
(Operation of morphological analyzer)
An operation example of common prefix search by the morpheme analyzer 100 will be described. FIG. 2 is a flowchart showing the operation of the morphological analyzer. First, a variable i is set to 1, and a trie root node is set to a variable n representing a trie node (step S1). Next, it is determined whether or not there is a branch of a trie node n that matches the i-th character of the search character string s (step S2). If so, the process ends.

ステップS3では探索文字列sのi番目の文字と一致するnの枝のリーフ側最近接のノードを新たに変数nに設定して、ステップS4に進む。ステップS4では、探索文字列sのi番目の文字までに対応する読み情報が読み制約を満たすか否かを判定し、満たす場合にはステップS5に進み、満たさない場合には処理を終了する。このようにして、音声合成等で必要とされる制約付きの形態素解析処理を、より効率的に実現できる。   In step S3, a leaf-side closest node of n branches that matches the i-th character of the search character string s is newly set as a variable n, and the process proceeds to step S4. In step S4, it is determined whether or not the reading information corresponding to the i-th character in the search character string s satisfies the reading constraint. If satisfied, the process proceeds to step S5, and if not satisfied, the process ends. In this way, it is possible to more efficiently realize the morphological analysis processing with restrictions required for speech synthesis or the like.

ステップS5では、ノードnを終端とする形態素があるか否かを判定し、ある場合にはステップS6へ進み、ない場合にはステップS7へ進む。ステップS6では、ノードnを終端とする形態素のうち、読み制約を満たす形態素候補を形態素候補リストに追加し、ステップS7へ進む。ステップS7ではiを1増加させて、ステップ2へ戻る。以上のような動作は、コンピュータにプログラムを実行させることで実現可能である。   In step S5, it is determined whether there is a morpheme that terminates at node n. If there is, the process proceeds to step S6, and if not, the process proceeds to step S7. In step S6, morpheme candidates satisfying the reading constraint are added to the morpheme candidate list among the morphemes that end at node n, and the process proceeds to step S7. In step S7, i is incremented by 1, and the process returns to step 2. The above operation can be realized by causing a computer to execute a program.

(具体例)
図3は、従来のデータ構造の一例を示す図である。従来の形態素辞書構造では、トライのノードに、そのノードを終端とする形態素に対応する形態素情報が結び付けられている。このため、読み情報に関する制約つき探索を行う場合、共通接頭辞探索により形態素候補の全てを列挙してから、各形態素情報を調べて、読み制約を満たさない候補を捨てる処理が必要となる。
(Concrete example)
FIG. 3 is a diagram illustrating an example of a conventional data structure. In the conventional morpheme dictionary structure, the morpheme information corresponding to the morpheme that ends with the node of the trie is associated with the trie node. For this reason, when performing a constrained search for reading information, it is necessary to list all the morpheme candidates by a common prefix search and then examine each morpheme information to discard candidates that do not satisfy the reading constraint.

これに対し、形態素辞書構造をルートノードから当該ノードに対応する文字までの読み情報付で構築した場合、発音情報を単に読み飛ばすのではなく、発音情報が、与えられた読み情報に関する制約を満たすか否かをトライの探索の段階でチェックできる。   On the other hand, when the morpheme dictionary structure is constructed with reading information from the root node to the character corresponding to the node, the pronunciation information does not simply skip the pronunciation information, and the pronunciation information satisfies the restrictions on the given reading information. It can be checked at the stage of the search for a try.

このようにして読み情報の制約条件を満たさない形態素を、より早い時点で形態素候補の列挙対象から除外することができる。その結果、列挙対象の形態素の候補数が減り、処理量やメモリ使用量を減らすことができる。   In this way, morphemes that do not satisfy the restriction condition of the reading information can be excluded from the morpheme candidate enumeration targets at an earlier time point. As a result, the number of candidate morphemes to be enumerated decreases, and the amount of processing and memory usage can be reduced.

以下では表記文字列「三田」に関する例を考える。まず、本例では、「三田」について読みの異なる、「ミタ」「サンダ」「サンタ」「ミツダ」の4つの形態素が辞書登録されている。さらに「三田図書館」に対する読みを一意に確定させるために、「ミタトショカン」という読みで「三田図書館」が形態素として登録されているとする。また、形態素辞書には「図書館」、「に」(助詞)、「行く」という形態素が登録されているとする。さらに、ここでは説明を簡単にするため、形態素辞書にそれ以外の形態素は登録されていないとする。   In the following, an example regarding the notation character string “Mita” will be considered. First, in this example, four morphemes of “Mita”, “Sanda”, “Santa”, and “Mitsuda” with different readings about “Mita” are registered in the dictionary. Further, in order to uniquely determine the reading for “Mita Library”, it is assumed that “Mita Library” is registered as a morpheme with the reading “Mitatoshokan”. Further, it is assumed that morphemes such as “library”, “ni” (particle), and “go” are registered in the morpheme dictionary. Furthermore, for the sake of simplicity of explanation, it is assumed that no other morpheme is registered in the morpheme dictionary.

ここで、「三田図書館に行く」を形態素解析すると、結果として、「三田」「図書館」「に」「行く」あるいは、「三田図書館」「に」「行く」の2つの可能性がある。先述のように「三田図書館」という形態素を登録するのは、この文字列に対する読みを確定させるためなので、多くの場合で、後者が形態素解析結果となるように生成コストや連結コストが設定される。   Here, if the morphological analysis of “go to Mita Library” is performed, there are two possibilities of “Mita”, “Library”, “Ni”, “Go”, or “Mita Library”, “Ni”, “Go”. The reason why the morpheme “Mita Library” is registered as described above is to fix the reading of this character string, and in many cases, the generation cost and concatenation cost are set so that the latter is the morpheme analysis result. .

しかし、その結果として「三田図書館に行く」は「ミタトショカンニイク」と読まれ、正解が「サンダトショカンニイク」であってもそのように読ませることはできない。また、仮に「さんだ図書館に行く」と読みを制約した個所を仮名表記に変えためた形で入力されると「さんだ」の部分は辞書登録されていないため、形態素解析結果上は候補がない。そこで通常の形態素解析では、「さんだ」の部分を未知語の形態素として一時的に捉え、文頭から文末までの形態素列を強制的に作成する。   However, as a result, “Go to Mita Library” is read as “Mitatoshokaniku”, and even if the correct answer is “Sandatoshokaniku”, it cannot be read as such. In addition, if “go to Sanda Library” is entered in the form of changing the place where reading is restricted to Kana notation, the “Sanda” part is not registered in the dictionary, so there is no candidate in the morphological analysis result. Therefore, in normal morphological analysis, the part of “Sanda” is temporarily recognized as an unknown word morpheme, and a morpheme string from the beginning to the end of the sentence is forcibly created.

しかし、そのような形態素解析では解析誤りが生じやすく、さらに「さんだ」は形態素辞書登録された語ではないため、アクセント型等の読みに関する正確な情報を得ることができない。これはアクセント型誤り等の不自然な読みの原因となる。   However, in such morphological analysis, an analysis error is likely to occur, and “Sanda” is not a word registered in the morpheme dictionary, so accurate information regarding accent type reading cannot be obtained. This causes unnatural reading such as accent type errors.

これに対し、「三田<サンダ>図書館に行く」(<>はルビ等の情報に基づく読み制約指定を表す)という入力を受け付けることができれば、先述の「三田」「図書館」「に」「行く」と、「三田図書館」「に」「行く」の2つの候補から、後者が正解にならないことがまず分かり、「三田」の読みとして「サンダ」を選択すれば良いことが分かる。ただし、この方法では可能な形態素列の全ての組み合わせをまず列挙した上で、読み制約を満たす候補を選ぶ、という処理が必要になる。   On the other hand, if it is possible to accept the input “go to Mita <Sanda> library” (<> indicates reading constraint specification based on information such as ruby), “Mita” “library” “to” “go” ”,“ Mita Library ”,“ Ni ”, and“ Go ”, it can be seen that the latter is not the correct answer, and“ Sanda ”should be selected as the reading for“ Mita ”. However, in this method, it is necessary to first enumerate all possible combinations of morpheme strings and then select candidates that satisfy the reading constraints.

ところで、形態素解析処理では「三田図書館に行く」、「田図書館に行く」、「図書館に行く」、といったような入力文字列に対する各部分文字列に対して共通接頭辞探索を行い、形態素候補をそれぞれ列挙することになる。   By the way, in the morphological analysis process, a common prefix search is performed for each partial character string for the input character string such as “go to Mita Library”, “go to Ta Library”, “go to library”, etc. Each will be listed.

最初の「三田図書館に行く」に対する共通接頭辞探索の時点で読み制約を満たさない「三田図書館」を候補から除外できれば、列挙する形態素候補数が減り、より少ない消費メモリと計算量で正解となる形態素列を得ることができる。本発明ではそのためにトライ構造を有する辞書の中間ノードにおいても、そこまでの読みに関する情報を含めることで、読み制約を満たさない形態素候補を候補として列挙しないようできる。   If “Mita Library”, which does not satisfy the reading restrictions at the time of the common prefix search for the first “Go to Mita Library”, can be excluded from the candidates, the number of morpheme candidates to enumerate will be reduced, and the correct answer will be with less memory consumption and calculation amount A morpheme string can be obtained. Therefore, in the present invention, even in an intermediate node of a dictionary having a trie structure, morpheme candidates that do not satisfy the reading constraint can be prevented from being enumerated as candidates by including information related to reading so far.

(具体例への適用)
上記の例は、第1の実施形態のデータ構造で表すことができる。図4は、第1の実施形態のデータ構造の一例を示す図である。図4に示す例では、中間ノードまでの表記文字列に対応する読み情報すべてを中間ノードに登録する。読み制約が与えられた共通接頭辞探索において、ルートノードからトライをたどっていく際、読み制約を満たす読みがなくなった時点で、読み制約を満たす形態素候補がないことが分かり、それ以上トライをたどって形態素候補を探す処理を行う必要がなくなり、処理量を削減できる。
(Application to specific examples)
The above example can be represented by the data structure of the first embodiment. FIG. 4 is a diagram illustrating an example of a data structure according to the first embodiment. In the example shown in FIG. 4, all the reading information corresponding to the notation character string up to the intermediate node is registered in the intermediate node. In a common prefix search with reading constraints, when tracing a trie from the root node, it is found that there are no morpheme candidates that satisfy the reading constraints when there are no more readings that satisfy the reading constraints. Thus, there is no need to perform processing for searching for morpheme candidates, and the processing amount can be reduced.

この場合、例えば「三田」(ミタ)、「三田」(サンダ)、「三田」(サンタ)、「三田」(ミツダ)および「三田図書館」(ミタトショカン)という5単語で構成される辞書において、その構造は図3のようになる。このような例では、「三田図書館に行く」に対する共通接頭辞探索で、「図」の文字までトライをたどった段階で、「三田」の部分の読みが「サンダ」となる形態素が、トライをこれ以上たどっても存在しないことが分かる。   In this case, for example, in a dictionary composed of five words “Mita” (Mita), “Mita” (Sanda), “Mita” (Santa), “Mita” (Mitsuda) and “Mita Library” (Mitashokan) The structure is as shown in FIG. In such an example, in the common prefix search for “go to Mita Library”, the morpheme whose reading of “Mita” is “Sanda” at the stage of tracing the letters “Figure” It turns out that it doesn't exist even if it traces any more.

[第2の実施形態]
上記の実施形態では、ノードにルートからそのノードに至るまでの読みに関する情報が格納されているが、ノードにノードごとの差分の情報が格納されていてもよい。すなわち、ノードには、ルート側最近接の枝に対応付けられた文字または部分文字列の読みに関する情報および読みに関する情報の識別情報と、読みに関する情報に対してルート側際近接のノードに対応付けられて読み情報の識別情報が格納されている。これにより、ルートから続く読みのうち複数の読みが生じるノードで条件を満たさない候補を破棄できる。
[Second Embodiment]
In the above embodiment, information related to reading from the root to the node is stored in the node. However, difference information for each node may be stored in the node. That is, the node is associated with information related to reading of the character or partial character string associated with the closest branch on the root side and identification information of the information related to reading, and associated with the node closest to the root with respect to the information related to reading. The identification information of the reading information is stored. As a result, candidates that do not satisfy the condition can be discarded at a node where a plurality of readings among the readings continuing from the root occur.

上記の実施形態では各ノードごとに読み情報を配置しているが、各ノードにおける読み情報は、親(ルートノード側)ノードからの追加差分情報として格納してもよい。この場合、各ノードに複数の読み情報が格納されている場合を考えると、どの情報からの差分なのかを決定するための情報が必要となる。   In the above embodiment, reading information is arranged for each node, but reading information in each node may be stored as additional difference information from the parent (root node side) node. In this case, considering the case where a plurality of reading information is stored in each node, information for determining which information is the difference is required.

これには、各ノードのそれぞれの読み情報に対しID番号を設定し、それぞれの読み情報に対して、親ノードにおけるどのIDの読み情報からの差分なのかを表す情報を追加すればよい。この方法により、複数形態素間で読み情報の共通部分が共有されるので、形態素辞書における読み情報の合計サイズを小さくすることができる。したがって、それぞれの情報は、当該ノードにおける読みを識別する「読みID」、親ノードで用いた読みIDを示す「前の読みID」、読み情報、終端フラグの4つで構築される。   For this purpose, an ID number is set for each reading information of each node, and information indicating which ID of the reading information is different from the parent node may be added to each reading information. By this method, since the common part of the reading information is shared among the plurality of morphemes, the total size of the reading information in the morpheme dictionary can be reduced. Accordingly, each piece of information is composed of four items: a “reading ID” that identifies the reading at the node, a “previous reading ID” that indicates the reading ID used at the parent node, reading information, and a termination flag.

(具体例への適用)
上記の例を第2の実施形態のデータ構造で表すことができる。図5は、第2の実施形態のデータ構造の一例を示す図である。第2の実施形態では、中間ノードに、前の(トライのおけるルートノード側の)中間ノードまで読みに対する差分情報を格納する。差分のみを格納することで、各ノードに結びつけるデータのサイズは小さくなるが、それぞれのノードには複数の読みが格納される場合があるため、前のノードのいずれの読みに対する差分なのかを示す識別子も合わせて格納する。
(Application to specific examples)
The above example can be represented by the data structure of the second embodiment. FIG. 5 is a diagram illustrating an example of a data structure according to the second embodiment. In the second embodiment, the difference information for the reading is stored in the intermediate node up to the previous intermediate node (on the root node side in the trie). By storing only the difference, the size of the data linked to each node is reduced, but multiple readings may be stored in each node, so it indicates the difference with respect to which reading of the previous node The identifier is also stored.

この場合、共通接頭辞探索処理において、各ノードで、読み制約を満たす読みに対する識別子のリストを作成する必要がある。あるノードにおいて、その前の中間ノードにおいて読み制約を満たした読みに対する差分のみが有効である。   In this case, in the common prefix search process, it is necessary to create a list of identifiers for readings that satisfy the reading constraint at each node. At a certain node, only the difference with respect to the reading satisfying the reading constraint at the preceding intermediate node is valid.

この場合、例えば「三田」(ミタ)、「三田」(サンダ)、「三田」(サンタ)、「三田」(ミツダ)および「三田図書館」(ミタトショカン)という5単語で構成される辞書において、その構造は図5のようになる。この構造により共通接頭辞探索におけるトライの探索の途中において、読み制約を満たす候補の有無を判定でき、無い場合には共通接頭辞探索を打ち切ることができるのは第1の実施形態と同様であり、処理も同様となる。   In this case, for example, in a dictionary composed of five words “Mita” (Mita), “Mita” (Sanda), “Mita” (Santa), “Mita” (Mitsuda) and “Mita Library” (Mitashokan) The structure is as shown in FIG. With this structure, it is possible to determine whether or not there is a candidate that satisfies the reading constraint during the trie search in the common prefix search, and if there is no candidate, the common prefix search can be aborted as in the first embodiment. The process is the same.

(バリエーションなど)
これまでの説明では、形態素の表記文字列の側に終端符号を設定せず、読み情報の側に終端フラグを設定していたが、表記文字列側に終端符号文字を定義してもよい。この場合、終端符号文字に対応する枝の直下のノードの全ての読み情報は、先の説明における終端フラグが1になっていることに相当し、一方それ以外のノードの全ての読み情報は、終端フラグが0になっていることに相当する。
(Variations, etc.)
In the description so far, the terminal code is not set on the morpheme character string side and the terminal flag is set on the reading information side. However, the terminal code character may be defined on the character string side. In this case, all the reading information of the node immediately below the branch corresponding to the terminal code character corresponds to the terminal flag in the above description being 1, while all the reading information of the other nodes is This corresponds to the end flag being 0.

なお、読み情報を考慮した共通接頭辞探索において読み情報の制約は、完全一致条件に限らない。ルビでは拗音を例えば「きゃ」ではなく「きや」と記載することが多いが、このような事例に対応するために、曖昧性を認めた判断基準とする方法も可能である。この場合、例えば編集距離を用い、読み情報に関し、一定文字数まで置換・挿入・脱落を認める、といった方法が可能である。実際、JEITA IT−4006の仮名レベル表記で定義されているような、アクセント型情報や韻律境界情報(アクセント句境界情報など)を読み制約として記述することは容易ではないので、このような曖昧性を持たせることは有効である。   Note that the restriction of reading information in the common prefix search considering reading information is not limited to the perfect match condition. In ruby, stuttering is often described as, for example, “Kiya” instead of “Kya”, but in order to deal with such cases, it is possible to use a method for determining the ambiguity. In this case, for example, it is possible to use an editing distance and to allow replacement, insertion, and omission up to a certain number of characters regarding the reading information. Actually, it is not easy to describe accent type information and prosodic boundary information (accent phrase boundary information, etc.) as reading restrictions as defined in the KEITA IT-4006 kana level notation. It is effective to have

また、読み情報についても、JEITA IT−4006のような直接的な記法だけでなく、例えば、読みの揺らぎに対する付加情報として「読み記号表記上で2記号まで置換を許容する」「読み情報先頭において濁音化を認める」といった規則をそれを表す符号の形で読み情報に追加し、それを曖昧性を認めた判断基準で考慮してもよい。これにより、例えば連濁(2形態素が連結した場合の読みで、主として後続形態素の先頭が濁音化する現象)等の影響で生じる読み指示の揺らぎを、処理において考慮することができる。   Also, the reading information is not limited to direct notation such as JEITA IT-4006. For example, “additional substitution of up to two symbols on reading symbol notation” is added as additional information for reading fluctuations. A rule such as “acceptance of muddy sound” may be added to the reading information in the form of a code representing it, and this may be taken into account by a judgment criterion that recognizes ambiguity. As a result, fluctuations in the reading instruction caused by the influence of, for example, rendaku (a phenomenon in which reading is performed when two morphemes are connected and the beginning of the subsequent morpheme becomes muddy) can be taken into consideration in the processing.

また、本発明の方法において、読み情報以外の以外を格納し、形態素候補列挙の際の、列挙判定の有無にその情報を用いてもよい。 例えば形態素の生起コストが、文字表記における各文字の生起コストの和で定義されるような形態素解析システムにおいては、文字生起コストを表す記号を定義し、文字とこの記号の組を並べてトライのインデックスを構成することで、トライの木構造そのものに、形態素の生起コストに関する情報を直接埋め込むことができる。   In the method of the present invention, information other than reading information may be stored, and the information may be used for the presence / absence of enumeration determination when enumerating candidate morphemes. For example, in a morphological analysis system in which the morpheme occurrence cost is defined as the sum of the occurrence costs of each character in the character notation, a symbol representing the character occurrence cost is defined, and a set of characters and this symbol is arranged to indicate a trie index. By configuring the information, the information about the morpheme generation cost can be directly embedded in the trie structure itself.

この構造では、トライをたどる過程で生起コストの値が得られるので、形態素する候補を列挙する過程で形態素生成コストが大きい候補を捨てといったような、形態素の生起コストを考慮した候補の列挙を行うことができる。また、格納する情報は、読み情報と文字生起コストの組み合わせ等、様々な情報の組み合わせでもよい。   In this structure, since the cost of occurrence is obtained in the process of following the trial, enumeration of candidates taking into account the cost of occurrence of the morpheme is performed, such as discarding candidates with high morpheme generation cost in the process of enumerating candidates for morpheme. be able to. The information to be stored may be a combination of various information such as a combination of reading information and a character generation cost.

また、上記の説明で、ノードに結び付けられる表は3種類の情報で構成されていたが、表に含める情報の構成はこれに限定されない。例えば、読みの揺らぎに対する付加情報として「読み記号表記上で2記号まで置換を許容する」「読み情報先頭において濁音化を認める」といった情報を加えてもよい。これにより、例えば連濁(2形態素が連結した場合の読みで、主として後続形態素の先頭が濁音化する現象)等の影響で生じる読み指示の揺らぎを、処理において考慮することができる。なおこの場合、辞書登録されている読み情報を形態素情報として出力するのではなく、読みに関する制約情報を強い読み指定と見なして、指定された読みをそのまま形態素情報として出力する方法も可能である。   In the above description, the table linked to the node is configured with three types of information, but the configuration of the information included in the table is not limited to this. For example, information such as “permits replacement of up to two symbols on reading symbol notation” and “accepts muddying at the beginning of reading information” may be added as additional information for fluctuations in reading. As a result, fluctuations in the reading instruction caused by the influence of, for example, rendaku (a phenomenon in which reading is performed when two morphemes are connected and the beginning of the subsequent morpheme becomes muddy) can be taken into consideration in the processing. In this case, instead of outputting the reading information registered in the dictionary as morpheme information, it is also possible to regard the restriction information related to reading as a strong reading specification and output the specified reading as morpheme information as it is.

さらに、全ての表記文字列を前後逆順にした形での辞書構成も可能である。例えば、文字列を前後逆にした形態素辞書を構築しておき、文の形態素解析では、文の末尾から先頭方向に向かって形態素候補を列挙する方法が考えられる。この場合、最終的に得られる最適な形態素列が、文頭から文末に向かって確定していくが、多くの装置では、形態素解析結果も文頭から文末方向に向かって出力するため、形態素解析結果を文末から文頭方向に確定させていく場合と異なり、形態素解析結果を一時的に保存する必要がなくなる、といった利点がある。   Furthermore, it is possible to construct a dictionary in which all written character strings are arranged in reverse order. For example, a morpheme dictionary in which character strings are reversed in front and back is constructed, and in the morpheme analysis of a sentence, a method of enumerating morpheme candidates from the end of the sentence toward the head is conceivable. In this case, the optimal morpheme sequence finally obtained is determined from the beginning of the sentence toward the end of the sentence.However, in many devices, the morpheme analysis result is also output from the beginning of the sentence toward the end of the sentence. Unlike the case of determining from the end of the sentence to the beginning of the sentence, there is an advantage that it is not necessary to temporarily store the morphological analysis result.

100 形態素解析装置
110 照合部
120 辞書装置
130 制約参照部
140 決定部
150 連接表記憶部
n トライのノード
s 探索文字列
100 Morphological Analysis Device 110 Collation Unit 120 Dictionary Device 130 Constraint Reference Unit 140 Determination Unit 150 Concatenated Table Storage Unit n Trie Nodes Search String

Claims (5)

文字列をもとに、これに関する読みの情報を出力する形態素解析装置であって、
ルートからリーフへ枝分かれするトライに基づく構造で文字列のデータを格納する形態素解析用の辞書装置であって、形態素を構成する文字または部分文字列は、枝に対応付けられて格納され、少なくとも前記枝を接続するノードのルート側最近接の枝に対応付けられた文字または部分文字列に関する読みの情報が、すべてのノードに対応付けられて格納されている辞書装置と、
入力された文字列を部分文字列に区切り、文字列の順に沿って前記部分文字列ごとに前記入力された文字列を前記辞書装置に照合し、前記部分文字列ごとに読みに関する情報の候補を出力する照合部と、
前記入力された文字列に付随する読みの情報の制約を参照し、前記ノードごとに読みに関する情報が前記読みの情報の制約を満たすか否かを判定し、前記読みの情報の制約を満たさない候補を破棄する制約参照部と、を備えることを特徴とする形態素解析装置。
A morphological analyzer that outputs information about readings based on character strings,
A dictionary device for morpheme analysis that stores character string data in a structure based on a trie branching from a root to a leaf, wherein a character or a partial character string constituting the morpheme is stored in association with a branch, and at least A dictionary device in which reading information related to characters or partial character strings associated with the closest branch on the root side of the node connecting the branches is stored in association with all the nodes ;
The input character string is divided into partial character strings , the input character strings are collated with the dictionary device for each partial character string in the order of character strings , and candidates for information related to reading are determined for each partial character string. A collation part to output,
Refers to the restriction on the reading information attached to the input character string, determines whether the information on reading satisfies the restriction on the reading information for each node, and does not satisfy the restriction on the reading information A morpheme analyzer comprising: a constraint reference unit that discards candidates.
前記辞書装置において、前記ノードには、ルート側最近接の枝に対応付けられた文字または部分文字列の読みに関する情報および前記読みに関する情報の識別情報と、前記読みに関する情報に対してルート側最近接のノードに対応付けられて読み情報の識別情報が格納されていることを特徴とする請求項1記載の形態素解析装置 In the dictionary apparatus, the node includes information related to reading of a character or a partial character string associated with a branch closest to the root side, identification information of the information related to the reading, and information on the root side closest to the information related to the reading. The morpheme analyzer according to claim 1, wherein identification information of reading information is stored in association with a contact node. 前記辞書装置において、前記ノードには、ルートから前記ノードに至る経路の枝に対応付けられた文字または部分文字列を順に連結して構成した文字列の読みに関する情報が対応付けられて格納されていることを特徴とする請求項1記載の形態素解析装置 In the dictionary device, the node stores information related to reading of a character string formed by sequentially connecting characters or partial character strings associated with a branch of a route from a route to the node. The morpheme analyzer according to claim 1, wherein 文字列をもとに、これに関する読みの情報を出力する形態素解析の方法であって、
入力された文字列を部分文字列に区切り、文字列の順に沿って前記部分文字列ごとに前記入力された文字列をルートからリーフへ枝分かれするトライに基づく構造で文字列のデータを格納する形態素解析用の辞書装置であって、形態素を構成する文字または部分文字列は、枝に対応付けられて格納され、少なくとも前記枝を接続するノードのルート側最近接の枝に対応付けられた文字または部分文字列に関する読みの情報が、すべてのノードに対応付けられて格納されている辞書装置に照合し、前記部分文字列ごとに読みに関する情報の候補を出力するステップと、
前記入力された文字列に付随する読みの情報の制約を参照し、前記ノードごとに読みに関する情報が前記読みの情報の制約を満たすか否かを判定し、前記読みの情報の制約を満たさない候補を破棄するステップと、をコンピュータを用いて実行することを特徴とする方法。
A morphological analysis method based on a character string that outputs reading information about this,
Separate the input character string into partial strings, morphemes that stores data of a string the string is the input for each of the partial character string along the order of the string from the root structure based on trie that branches to the leaf A dictionary device for analysis, wherein a character or a partial character string that constitutes a morpheme is stored in association with a branch, and at least a character or a character corresponding to a root side closest branch of a node connecting the branch Collating with the dictionary device in which the reading information about the partial character string is stored in association with all the nodes, and outputting candidate information about the reading for each partial character string ;
Refers to the restriction on the reading information attached to the input character string, determines whether the information on reading satisfies the restriction on the reading information for each node, and does not satisfy the restriction on the reading information And discarding the candidates, using a computer.
文字列をもとに、これに関する読みの情報を出力する形態素解析のプログラムであって、
入力された文字列を部分文字列に区切り、文字列の順に沿って前記部分文字列ごとに前記入力された文字列をルートからリーフへ枝分かれするトライに基づく構造で文字列のデータを格納する形態素解析用の辞書装置であって、形態素を構成する文字または部分文字列は、枝に対応付けられて格納され、少なくとも前記枝を接続するノードのルート側最近接の枝に対応付けられた文字または部分文字列に関する読みの情報が、すべてのノードに対応付けられて格納されている辞書装置に照合し、前記部分文字列ごとに読みに関する情報の候補を出力する処理と、
前記入力された文字列に付随する読みの情報の制約を参照し、前記ノードごとに読みに関する情報が前記読みの情報の制約を満たすか否かを判定し、前記読みの情報の制約を満たさない候補を破棄する処理と、を含む一連の処理をコンピュータに実行させることを特徴とするプログラム。
A morphological analysis program that outputs information about readings based on character strings,
Separate the input character string into partial strings, morphemes that stores data of a string the string is the input for each of the partial character string along the order of the string from the root structure based on trie that branches to the leaf A dictionary device for analysis, wherein a character or a partial character string that constitutes a morpheme is stored in association with a branch, and at least a character or a character corresponding to a root side closest branch of a node connecting the branch A process of collating with a dictionary device in which reading information related to partial character strings is stored in association with all nodes, and outputting candidate reading information for each partial character string ;
Refers to the restriction on the reading information attached to the input character string, determines whether the information on reading satisfies the restriction on the reading information for each node, and does not satisfy the restriction on the reading information A program for causing a computer to execute a series of processes including a process of discarding candidates.
JP2014066673A 2014-03-27 2014-03-27 Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program Active JP6300596B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014066673A JP6300596B2 (en) 2014-03-27 2014-03-27 Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014066673A JP6300596B2 (en) 2014-03-27 2014-03-27 Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program

Publications (2)

Publication Number Publication Date
JP2015191317A JP2015191317A (en) 2015-11-02
JP6300596B2 true JP6300596B2 (en) 2018-03-28

Family

ID=54425784

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014066673A Active JP6300596B2 (en) 2014-03-27 2014-03-27 Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program

Country Status (1)

Country Link
JP (1) JP6300596B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09245045A (en) * 1996-03-14 1997-09-19 Fuji Xerox Co Ltd Method and device for key retrieval
JP3452353B2 (en) * 2000-07-04 2003-09-29 株式会社ジャストシステム Recording medium recording dictionary data structure, dictionary lookup method, phrase acquisition method, dictionary lookup apparatus, phrase acquisition apparatus, recording medium recording program
JP2007058509A (en) * 2005-08-24 2007-03-08 Toshiba Corp Language processing system
JP5224953B2 (en) * 2008-07-17 2013-07-03 インターナショナル・ビジネス・マシーンズ・コーポレーション Information processing apparatus, information processing method, and program
JP4709919B2 (en) * 2009-09-29 2011-06-29 株式会社東芝 Candidate presentation device, candidate presentation method, candidate presentation program

Also Published As

Publication number Publication date
JP2015191317A (en) 2015-11-02

Similar Documents

Publication Publication Date Title
US9818401B2 (en) Systems and methods for adaptive proper name entity recognition and understanding
US20110238412A1 (en) Method for Constructing Pronunciation Dictionaries
AU2017326987B2 (en) Systems and methods for adaptive proper name entity recognition and understanding
JP4931958B2 (en) Text summarization method, apparatus and program
US20110320464A1 (en) Retrieval device
Goldberg et al. A single generative model for joint morphological segmentation and syntactic parsing
US20110238420A1 (en) Method and apparatus for editing speech, and method for synthesizing speech
JP2017097062A (en) Reading imparting device, speech recognition device, reading imparting method, speech recognition method, and program
JP2006338261A (en) Translation device, translation method and translation program
JP6300601B2 (en) Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program
KR100542757B1 (en) Automatic expansion Method and Device for Foreign language transliteration
KR20120052591A (en) Apparatus and method for error correction in a continuous speech recognition system
WO2019179884A1 (en) Processing speech-to-text transcriptions
JP6300596B2 (en) Dictionary device, morpheme analyzer, data structure, morpheme analysis method and program
JP5623380B2 (en) Error sentence correcting apparatus, error sentence correcting method and program
JP6619932B2 (en) Morphological analyzer and program
JP4478088B2 (en) Symbol string conversion method, speech recognition method, symbol string converter and program, and recording medium
JP2008059389A (en) Vocabulary candidate output system, vocabulary candidate output method, and vocabulary candidate output program
JP2004294542A (en) Speech recognition device and program therefor
JP2009199434A (en) Alphabetical character string/japanese pronunciation conversion apparatus and alphabetical character string/japanese pronunciation conversion program
JP2006343405A (en) Speech-understanding device, speech-understanding method, method for preparing word/semantic expression merge database, its program and storage medium
KR20160053587A (en) Method for minimizing database size of n-gram language model
KR102278288B1 (en) Apparatus and method for searching text based on phoneme
JP2014126925A (en) Information search device and information search method
JP3414326B2 (en) Speech synthesis dictionary registration apparatus and method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160729

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170620

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170623

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20170818

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180206

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180227

R150 Certificate of patent or registration of utility model

Ref document number: 6300596

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150