JP3099457B2 - Kana-Kanji conversion device - Google Patents

Kana-Kanji conversion device

Info

Publication number
JP3099457B2
JP3099457B2 JP03271260A JP27126091A JP3099457B2 JP 3099457 B2 JP3099457 B2 JP 3099457B2 JP 03271260 A JP03271260 A JP 03271260A JP 27126091 A JP27126091 A JP 27126091A JP 3099457 B2 JP3099457 B2 JP 3099457B2
Authority
JP
Japan
Prior art keywords
rule
word
pointer
conversion
kana
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.)
Expired - Fee Related
Application number
JP03271260A
Other languages
Japanese (ja)
Other versions
JPH05108625A (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.)
Brother Industries Ltd
Original Assignee
Brother Industries Ltd
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 Brother Industries Ltd filed Critical Brother Industries Ltd
Priority to JP03271260A priority Critical patent/JP3099457B2/en
Publication of JPH05108625A publication Critical patent/JPH05108625A/en
Application granted granted Critical
Publication of JP3099457B2 publication Critical patent/JP3099457B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【産業上の利用分野】本発明は、日本語ワードプロセッ
サ等のかな漢字変換処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a kana-kanji conversion processor such as a Japanese word processor.

【0002】[0002]

【従来の技術】従来、この種のかな漢字変換装置は、特
開平3−142658号公報で開示されているように、
単語の読みに対する漢字等の表記を記憶した基本辞書に
基づいてかな漢字変換を行い、変換結果記憶部にかな漢
字変換結果を記憶し、そして、複数の単語列のパターン
とその書き換え情報とを一組の規則として格納したもの
を規則辞書とし、その規則辞書中の規則と一致した規則
が検索されたとき、前記かな漢字変換結果の内容を書き
換え、表示装置により表示するようにしたものであっ
た。このような一連の作用は、規則変換と称していた。
2. Description of the Related Art Conventionally, a kana-kanji conversion device of this kind has been disclosed in Japanese Patent Application Laid-Open No. 3-142658.
Performs Kana-Kanji conversion based on a basic dictionary that stores notation such as Kanji for reading words, stores the Kana-Kanji conversion result in the conversion result storage unit, and stores a set of word string patterns and their rewriting information as a set. The rules stored as rules are used as a rule dictionary, and when a rule that matches a rule in the rule dictionary is searched, the contents of the Kana-Kanji conversion result are rewritten and displayed on a display device. Such a series of actions was called rule conversion.

【0003】例えば、「きものをきていないで」と入力
した場合に、通常の変換では初回に、変換結果として
「着物を規定内で」が出力されるときがある。
[0003] For example, when "Do not wear kimono" is input, "Kimono within regulation" may be output as a conversion result for the first time in normal conversion.

【0004】次いで、規則辞書中の規則に基づいて、規
則変換を行うときに、規則辞書中に<U−着物:N><
U−を:N><D−きてい:着,て,い>なる規則が存
在すれば、「着物を規定内で」という誤変換を「着物を
着てい内で」と書き換えるものであった。
[0004] Next, when performing rule conversion based on the rules in the rule dictionary, when the <U-kimono: N><
If there is a rule of U-: N><D-ki-te: wear, te, ii>, an erroneous conversion of "within a kimono within a rule" is rewritten as "within a kimono". .

【0005】[0005]

【発明が解決しようとする課題】しかしながら、前記規
則変換処理を行う場合に、変換結果が「着物を規定内
で」と誤変換されたときは、規則変換により書き換えら
れた部分は、「着物を着てい」と正しい変換結果となる
が、規則により書き換えられた部分の直後の変換結果
「内で」については誤変換のままで、なんら修正が行わ
れない。従って、「着物を着ていないで」と変換させた
いのにも関わらず、「着物を着てい内で」と誤変換が出
力されていた。また、場合によっては「着物を規定内
で」という形で使いたいにも係わらず規則変換によっ
て、常に「着物を着てい内で」と変換されていた。
However, when performing the rule conversion process, if the conversion result is erroneously converted to "Kimono within the rules", the portion rewritten by the rule conversion is "Kimono Although the conversion result is correct when "wearing", the conversion result "inside" immediately after the part rewritten by the rule remains erroneous conversion without any correction. Therefore, although the user wants to convert to "without kimono", an erroneous conversion is output as "within kimono". Also, in some cases, the rule conversion always converts "within a kimono in" even though the user wants to use the kimono in the form of "within a rule".

【0006】本発明では、上記問題点を解決するために
なされたものであり、規則辞書を用いて規則変換が行な
われた時、書き換えられた直後の部分に誤変換が存在す
るような場合、その規則変換による書き換えを元に戻
し、当かな漢字変換装置の変換精度を向上させることを
目的とする。
The present invention has been made in order to solve the above-mentioned problem. When rule conversion is performed using a rule dictionary, if there is an erroneous conversion immediately after rewriting, It is an object of the present invention to undo the rewriting by the rule conversion and improve the conversion accuracy of the correct kanji conversion device.

【0007】[0007]

【課題を解決するための手段】この問題を解決するため
に本発明のかな漢字変換装置は図1に示すように、かな
読み文字列を入力するための入力手段と、単語の読みに
対する表記を記憶した基本辞書と、その基本辞書の2単
語間の接続関係を記憶した接続テーブルと、前記基本辞
書と前記接続テーブルとに基づいて、かな漢字変換を行
うかな漢字変換手段と、そのかな漢字変換手段による変
換結果を記憶する変換結果記憶手段と、前記基本辞書の
複数の単語列のパターンとその書き換え情報を持つ規則
を記憶した規則辞書と、前記変換結果記憶手段の内容に
ついて、前記規則辞書から一致するパターンを持つ規則
を検索する規則検索手段と、その規則検索手段により一
致した規則が検索されたとき、検索された規則に一致し
た変換結果記憶手段の内容を書き換える規則書き換え手
段とを備えている。
In order to solve this problem, a kana-kanji conversion apparatus according to the present invention, as shown in FIG. 1, stores an input means for inputting a kana reading character string and a notation for reading a word. Kana-Kanji conversion means for performing Kana-Kanji conversion based on the basic dictionary and the connection table between the two words of the basic dictionary, Kana-Kanji conversion based on the basic dictionary and the connection table, and conversion results obtained by the Kana-Kanji conversion means A conversion result storage means for storing a pattern having a plurality of word strings in the basic dictionary and rules having rewrite information thereof, and a pattern matching the contents of the conversion result storage means from the rule dictionary. A rule search means for searching for a rule possessed by the user, and a conversion result storage means that matches the searched rule when the rule matched by the rule search means is searched. And a rule rewriting means for rewriting the contents.

【0008】そして、その規則書き換え手段によって書
き換えの行われた部分と書き換えの行われていない部分
とが正しくつながるか前記接続テーブルに基づいて判定
する接続判定手段と、その接続判定手段により前記部分
のつながりが正しくないと判定されたとき、前記規則書
き換え手段による書き換えを元に戻す規則書き換え回復
手段と、前記変換結果記憶手段の内容を出力する出力手
段とを備えている。
Then, a connection judging means for judging, based on the connection table, whether or not the part rewritten by the rule rewriting means and the part not rewritten are connected correctly, and the connection judging means judges whether the part is rewritten. When it is determined that the connection is not correct, there are provided rule rewriting recovery means for restoring the rewriting by the rule rewriting means and output means for outputting the contents of the conversion result storage means.

【0009】[0009]

【作用】上記の構成を有する本発明のかな漢字変換装置
は、入力手段から入力されたかな読み文字列は、かな漢
字変換手段にて、基本辞書及び接続テーブルを参照して
かな漢字変換される。
According to the kana-kanji conversion device of the present invention having the above-described configuration, the kana-reading character string input from the input means is converted by the kana-kanji conversion means with reference to the basic dictionary and the connection table.

【0010】その後、かな漢字変換された結果が変換結
果記憶手段に格納され、規則検索手段により規則辞書中
の規則の内で変換結果記憶手段に一致する規則が検索さ
れる。
[0010] Thereafter, the result of the Kana-Kanji conversion is stored in the conversion result storage means, and a rule matching the conversion result storage means is searched from the rules in the rule dictionary by the rule search means.

【0011】次に、その検索された規則の指示にしたが
って、変換結果記憶手段中に一致した部分の書き換えが
行われる。そこで、接続判定手段は、規則にしたがって
書き換えが行なわれた部分の末尾の単語とその直後の単
語とを前記接続テーブルを参照して接続可能かどうかを
判定し、接続不可の時には、規則書き換え回復手段によ
り規則書き換えを元に戻す。その結果、変換結果記憶手
段の内容をかな漢字文字列にしたものが出力手段により
表示される。
Next, according to the instruction of the searched rule, the matching part is rewritten in the conversion result storage means. Therefore, the connection determining means determines whether or not the last word of the portion rewritten according to the rule and the word immediately after the last word can be connected by referring to the connection table. Undo rule rewriting by means. As a result, the contents of the conversion result storage means converted into the Kana-Kanji character string are displayed by the output means.

【0012】[0012]

【実施例】以下、本発明を具体化した一実施例を図面を
参照して説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings.

【0013】かな漢字変換装置全体の構成を図2を参照
して説明する。
The overall structure of the kana-kanji conversion device will be described with reference to FIG.

【0014】かな漢字変換をする文字列を入力するため
のキーボード等の入力装置10は、装置全体を制御する
ための中央処理装置(CPU)12に接続されている。
記憶手段としてのRAM20はCPU12に接続され、
かな漢字変換された結果を記憶するための変換結果記憶
領域22と、入力されたかな読み文字列を記憶するため
の読み入力バッファ領域24と、変換結果記憶領域22
の内容をかな漢字文字列として記憶するための出力バッ
ファ領域26と、ポインタ情報を記録するワークエリア
28と、変換結果記憶領域22の記憶内容を規則書き換
えが行われる前に記憶する補助記憶領域29とを格納し
ている。
An input device 10 such as a keyboard for inputting a character string to be subjected to kana-kanji conversion is connected to a central processing unit (CPU) 12 for controlling the entire device.
RAM 20 as storage means is connected to CPU 12,
A conversion result storage area 22 for storing a result of Kana-Kanji conversion, a reading input buffer area 24 for storing an input kana reading character string, and a conversion result storage area 22
An output buffer area 26 for storing the contents of the character string as a Kana-Kanji character string, a work area 28 for recording pointer information, and an auxiliary storage area 29 for storing the storage contents of the conversion result storage area 22 before rule rewriting is performed. Is stored.

【0015】変換結果記憶領域22は、図3に示すよう
に、変換結果全体が単語単位で情報を付して記憶されて
おり、後述する基本辞書42中に記憶されているそれぞ
れの単語を識別するための固有の数値である単語ID2
2aと、単語の読み長22bと、単語の表記22cと、
同音語先頭ID22dと、同音語末尾ID22eとがデ
ータとして各単語ごとに記憶されている。
As shown in FIG. 3, the conversion result storage area 22 stores the entire conversion result attached with information in word units, and identifies each word stored in a basic dictionary 42 described later. ID2 which is a unique numerical value for performing
2a, word reading length 22b, word notation 22c,
The homophone head ID 22d and the homophone end ID 22e are stored as data for each word.

【0016】尚、同音語先頭ID22dは、入力装置1
0から入力された文字列(単語)と同音であり、基本辞
書42に記憶された単語ID42aの数値が最も小さい
ものを示すものである。また、同音語末尾ID22e
は、入力装置10から入力された文字列(単語)と同音
であり、基本辞書42に記憶された単語ID42aの数
値が最も大きいものを示すものである。
Note that the homophone head ID 22d is stored in the input device 1
It is the same as the character string (word) input from 0, and indicates the word ID 42a stored in the basic dictionary 42 with the smallest numerical value. Also, the homophone end ID 22e
Is the same as the character string (word) input from the input device 10 and indicates the word ID 42a stored in the basic dictionary 42 with the largest numerical value.

【0017】プログラムや辞書等を格納するROM30
はCPU12と接続され、プログラム部32と辞書部4
0とからなる。プログラム部32は、かな漢字変換プロ
グラム34と、規則検索プログラム36と、規則書き換
えプログラム38と、規則書き換え回復プログラム39
とを格納している。
ROM 30 for storing programs, dictionaries, etc.
Is connected to the CPU 12, the program unit 32 and the dictionary unit 4
It consists of 0. The program unit 32 includes a kana-kanji conversion program 34, a rule search program 36, a rule rewriting program 38, and a rule rewriting recovery program 39
And are stored.

【0018】尚、上記規則検索プログラム36と規則書
き換えプログラム38と規則書き換え回復プログラム3
9とにより行われる処理を規則変換処理と呼ぶ。
The rule search program 36, the rule rewriting program 38, and the rule rewriting recovery program 3
9 is referred to as rule conversion processing.

【0019】辞書部40は、基本辞書42と、接続テー
ブル44と、規則辞書46とから構成されている。基本
辞書42は、図4に示すように、その単語の固有の識別
番号たる単語ID42aと、その単語の読み42bと、
その単語の漢字表記42cと、その単語の品詞42d
と、その単語の属するカテゴリーを表す意味コード42
eが記憶されている。
The dictionary section 40 comprises a basic dictionary 42, a connection table 44, and a rule dictionary 46. As shown in FIG. 4, the basic dictionary 42 includes a word ID 42a which is a unique identification number of the word, a reading 42b of the word,
The kanji 42c of the word and the part of speech 42d of the word
And the meaning code 42 representing the category to which the word belongs
e is stored.

【0020】接続テーブル44は、単語どうしの接続関
係の可否を品詞情報により判断するためのデータを記憶
している。例えば、名詞と格助詞の接続は可能という情
報や動詞と格助詞の接続はできないという情報をテーブ
ルデータとして記憶している。
The connection table 44 stores data for determining whether or not there is a connection relationship between words based on part of speech information. For example, information that a noun and a case particle can be connected and information that a verb and a case particle cannot be connected are stored as table data.

【0021】規則辞書46は、図5に示すように、規則
項目46a〜46dの組を一つの規則として記憶してお
り、一般に規則の項目は、<検索因子−単語パターン:
書き換え情報>という形で書かれており、この項目の組
合せで一つの規則がつくられる仕組みになっている。検
索因子とは、規則変換の検索方法の種類を示すもので、
U因子、D因子、Y因子、M因子があり、U因子は変換
結果記憶領域22に記憶されている単語についての読み
及び表記と完全一致を意味し、D因子は変換結果記憶領
域22に記憶されている単語についての読みつまりその
単語と同音で一致することを意味する。また、Y因子は
変換結果記憶領域22の中に記憶されている1単語以上
の単語列についての読みと一致することを意味する。M
因子は変換結果記憶領域22に記憶されている単語の意
味コードで一致することを意味する。単語パターンと
は、その規則項目を変換結果記憶領域22中の項目に一
致させる単語のことを示し、ここには単語の読み又は表
記又は意味コードが入る。
As shown in FIG. 5, the rule dictionary 46 stores a set of rule items 46a to 46d as one rule. In general, rule items include <search factor-word pattern:
Rewriting information>, and one rule is created by combining these items. The search factor indicates the type of search method for rule conversion.
There are a U factor, a D factor, a Y factor, and an M factor. The U factor means reading and notation of a word stored in the conversion result storage area 22 and a perfect match, and the D factor is stored in the conversion result storage area 22. This means that the word that is being read is the same as the word. Further, the Y factor means that it matches the reading of one or more word strings stored in the conversion result storage area 22. M
The factor means that they match with the meaning code of the word stored in the conversion result storage area 22. The word pattern indicates a word that matches the rule item with the item in the conversion result storage area 22, and contains a word reading or notation or a meaning code.

【0022】書き換え情報は、無変化マーカーN、削除
マーカーD、または単語列のいずれかであり、無変化マ
ーカーNが格納されているときは規則辞書46の項目に
一致した変換結果記憶領域22中の単語をそのままに
し、書き換えないことを表す。また、削除マーカーDが
格納されているときはその項目を削除することを表し、
単語列のときは規則辞書46の項目と一致した変換結果
記憶領域22中の単語をその単語列に書き換えることを
表している。ここでいう単語列とは、複数の単語(一つ
の単語だけでもよい)が規則辞書46に単語IDで記憶
されたものであり、この単語IDに基づいて基本辞書4
2を参照することにより、変換結果記憶領域22の単語
読み長22b、同音語先頭ID22c、同音語末尾ID
22d等の設定が可能である。尚、図5においては、理
解しやすいように単語IDの部分を数値ではなく、読
み、または表記で表している。
The rewriting information is any one of the unchanged marker N, the deleted marker D, and the word string. When the unchanged marker N is stored, the conversion result storage area 22 corresponding to the item of the rule dictionary 46 is stored. Means that the word is not rewritten. When the delete marker D is stored, it indicates that the item is to be deleted.
In the case of a word string, it indicates that a word in the conversion result storage area 22 that matches an item of the rule dictionary 46 is rewritten to the word string. Here, the word string is a plurality of words (only one word may be stored) stored in the rule dictionary 46 by a word ID.
2, the word reading length 22b, the homophone head ID 22c, and the homophone tail ID in the conversion result storage area 22
Settings such as 22d are possible. In FIG. 5, for easy understanding, the word ID portion is represented by a reading or a notation instead of a numerical value.

【0023】次に、このように構成されたかな漢字変換
装置の動作を図6のフローチャートを参照して説明す
る。
Next, the operation of the kana-kanji conversion device thus constructed will be described with reference to the flowchart of FIG.

【0024】例えば、読み文字列「きものをきていない
で」が入力装置10より入力されると、そのかな文字コ
ードがRAM20の読み入力バッファ領域24に記憶さ
れる(S10)。その後、ROM30のかな漢字変換プ
ログラム34により基本辞書42と接続テーブル44に
基づいて、読み入力バッファ領域24に記憶されている
かな文字コードが漢字かな混じり文に変換され、変換結
果記憶領域22に単語ID等が記憶される。例えば、基
本辞書中で、単語「規定」と、「内」が選択され、漢字
かな混じり文「着物を規定内で」と変換される。そし
て、その単語IDが変換結果記憶領域22に記憶される
(S12)。そして、ROM30の規則検索プログラム
36及び規則書き換えプログラム38により、変換結果
記憶領域22の内容と規則辞書46を参照して規則変換
処理が行われる(S14)。
For example, when a reading character string "Do not wear kimono" is input from the input device 10, the kana character code is stored in the reading input buffer area 24 of the RAM 20 (S10). Thereafter, the kana character code stored in the reading input buffer area 24 is converted into a kanji mixed kana sentence based on the basic dictionary 42 and the connection table 44 by the kana / kanji conversion program 34 in the ROM 30, and the word ID is stored in the conversion result storage area 22. Etc. are stored. For example, in the basic dictionary, the words “prescription” and “inside” are selected and converted into a sentence “Kimono within the provisions” mixed with kanji or kana. Then, the word ID is stored in the conversion result storage area 22 (S12). Then, the rule conversion process is performed by the rule search program 36 and the rule rewriting program 38 in the ROM 30 with reference to the contents of the conversion result storage area 22 and the rule dictionary 46 (S14).

【0025】次に、規則変換処理の具体的な処理につい
て図7、図8、図9のフローチャートを参照して説明す
る。
Next, the specific processing of the rule conversion processing will be described with reference to the flowcharts of FIGS. 7, 8 and 9.

【0026】まず、前記変換結果記憶領域22に記憶し
た「着物を規定内で」の先頭の単語「着物」にポインタ
P1を設定し、ポインタP1のポインタ情報がRAM2
0のワークエリア28に記憶される(S30)。
First, a pointer P1 is set to the first word "Kimono" of "Kimono within rules" stored in the conversion result storage area 22, and the pointer information of the pointer P1 is stored in the RAM2.
0 is stored in the work area 28 (S30).

【0027】次に、ポインタP1の指す単語と一致する
規則が規則辞書46中にあるか否かを検索する(S3
2)。図9に示す規則検索サブルーチンにおいては、ま
ず、ポインタP5を規則辞書46中の先頭の規則5−1
に設定し、ポインタ情報をワークエリア28に記録する
(S320)。次に、ポインタP6をポインタP5の指
す規則5−1の先頭の項目46aに設定し、ポインタ情
報がワークエリア28に記憶される(S322)。次い
で、ポインタP7をポインタP1の指す変換結果記憶領
域22中のかな漢字変換結果の先頭の単語「着物」に設
定する(S324)。
Next, it is searched whether or not a rule matching the word pointed by the pointer P1 exists in the rule dictionary 46 (S3).
2). In the rule search subroutine shown in FIG. 9, first, the pointer P5 is set to the first rule 5-1 in the rule dictionary 46.
And the pointer information is recorded in the work area 28 (S320). Next, the pointer P6 is set to the first item 46a of the rule 5-1 indicated by the pointer P5, and the pointer information is stored in the work area 28 (S322). Next, the pointer P7 is set to the first word “kimono” of the kana-kanji conversion result in the conversion result storage area 22 pointed to by the pointer P1 (S324).

【0028】ここでは、ポインタP6の指す規則<U−
聞き耳:N>とポインタP7の指す変換結果記憶領域2
2中の単語「着物」とを比較する(326)。この場
合、規則と単語は一致せず(S326・NO)、ポイン
タP5の示す規則5−1が規則辞書46中で最後の規則
ではないので(S328・NO)、ポインタP5を次の
規則5−2に移動し、ポインタ情報がワークエリア28
に記憶され(S330)、前期S322に戻る。次に、
ポインタP6をポインタP5の指す規則5−2の先頭の
項目47aに設定し、ポインタ情報がワークエリア28
に記憶される(S322)。次いで、ポインタP7をポ
インタP1の指す変換結果記憶領域22中のかな漢字変
換結果の先頭の単語「着物」に設定する(S324)。
Here, the rule pointed by the pointer P6 <U-
Listening: N> and conversion result storage area 2 pointed by pointer P7
Then, the word “kimono” is compared with the word “kimono” (326). In this case, the rule does not match the word (S326 / NO), and the rule 5-1 indicated by the pointer P5 is not the last rule in the rule dictionary 46 (S328 / NO). 2 and the pointer information is stored in the work area 28.
(S330), and returns to S322. next,
The pointer P6 is set in the first item 47a of the rule 5-2 indicated by the pointer P5, and the pointer information is set in the work area 28.
(S322). Next, the pointer P7 is set to the first word “kimono” of the kana-kanji conversion result in the conversion result storage area 22 pointed to by the pointer P1 (S324).

【0029】ここでは、ポインタP6の指す規則項目<
U−着物:N>47aとポインタP7の指す変換結果記
憶領域22中の単語「着物」とを比較する(326)。
この場合、規則と単語は一致し(S326・YES)、
ポインタP6が末尾項目ではないので(S332・N
O)、ポインタP7を変換結果記憶領域22中に記憶さ
れている「着物」の次の単語「を」に移動し、ポインタ
P6も規則5−2中の次の項目<U−を:N>(47
b)に移動して、そのポインタ情報をワークエリア28
に記憶し(S334)、前記S326に戻る。
Here, the rule item pointed by the pointer P6 <
U-Kimono: N> 47a is compared with the word "Kimono" in the conversion result storage area 22 indicated by the pointer P7 (326).
In this case, the rule and the word match (S326, YES),
Since the pointer P6 is not the last item (S332 · N
O), the pointer P7 is moved to the next word "" of "kimono" stored in the conversion result storage area 22, and the pointer P6 is also moved to the next item <U-: N> in rule 5-2. (47
b) and stores the pointer information in the work area 28.
(S334), and returns to S326.

【0030】ここで、ポインタP6の指す規則項目<U
−を:N>47bとポインタP7の指す変換結果記憶領
域22中の単語「を」とを比較する(326)。この場
合、規則と単語は一致し(S326・YES)、ポイン
タP6が末尾項目ではないので(S332・NO)、ポ
インタP7を変換結果記憶領域22中の次の単語「規
定」に移動し、ポインタP6も規則5−2中の次の項目
<D−きてい:着,て,い>(47c)に移動して、そ
のポインタ情報をワークエリア28に記憶し(S33
4)、前記S326に戻る。
Here, the rule item pointed by the pointer P6 <U
-A: N> 47b is compared with the word "wo" in the conversion result storage area 22 indicated by the pointer P7 (326). In this case, the rule and the word match (S326, YES), and since the pointer P6 is not the last item (S332, NO), the pointer P7 is moved to the next word "regulation" in the conversion result storage area 22, and P6 also moves to the next item in the rule 5-2, <D-Iki: wear, te, i> (47c), and stores the pointer information in the work area 28 (S33).
4), and return to S326.

【0031】ここで、ポインタP6の指す規則項目<D
−きてい:着,て,い>(47c)は、D因子が付され
ており、読みで一致を意味する。従って、ポインタP7
の示す単語「規定」と一致し(S326・YES)、ポ
インタP6の示す項目47cは末尾項目なので(S33
2・YES)、ワークエリア28に規則フラグONを記
憶し(S336)、図7に示すS34に進む。
Here, the rule item pointed by the pointer P6 <D
-Coming: wearing, te, ii> (47c) is provided with a factor D and means a match in reading. Therefore, the pointer P7
(S326: YES), and the item 47c indicated by the pointer P6 is the last item (S33).
2 ・ YES), the rule flag ON is stored in the work area 28 (S336), and the process proceeds to S34 shown in FIG.

【0032】尚、一致する規則が検索されないときは
(S326・NO)、ポインタP5の指す規則が規則辞
書中で最後の規則になるまで(S328・NO)、ポイ
ンタP5を次の規則へ順次移動し(S330)、一致す
る規則を検索する(S322〜S330)。ポインタP
5が示す規則が、規則辞書で最後の規則となったときは
(S328・YES)、一致する規則がなかったことを
示す規則フラグOFFをワークエリア28に記憶する
(S338)。
If no matching rule is found (S326: NO), the pointer P5 is sequentially moved to the next rule until the rule indicated by the pointer P5 becomes the last rule in the rule dictionary (S328: NO). Then, a matching rule is searched (S322 to S330). Pointer P
When the rule indicated by No. 5 is the last rule in the rule dictionary (S328: YES), a rule flag OFF indicating that there is no matching rule is stored in the work area 28 (S338).

【0033】次に、図7、図8に示す規則書き換え処理
について説明する。
Next, the rule rewriting process shown in FIGS. 7 and 8 will be described.

【0034】S32の規則検索処理においてワークエリ
ア28の規則フラグがONとなっているので(S34・
YES)、規則書き換えプログラム38による規則書き
換え処理に入る。まず、ポインタP2をポインタP1の
指す変換結果記憶領域22に記憶した単語列「着物を規
定内で」の先頭の単語「着物」に設定し、ポインタP2
のポインタ情報をワークエリア28に記憶する(S3
6)。次いで、ポインタP3をポインタP7が指す変換
結果記憶領域22に記憶した「着物を規定内で」という
単語列の内、規則に一致した部分の末尾の単語「規定」
に設定し、ポインタP3の情報をワークエリア28に記
憶する(S38)。続いて、ポインタP4を規則辞書4
6中の一致した規則5−2の先頭項目に設定し、ポイン
タP4のポインタ情報をワークエリア28に記憶する
(S40)。
Since the rule flag of the work area 28 is ON in the rule search process of S32 (S34.
YES), and enters a rule rewriting process by the rule rewriting program 38. First, the pointer P2 is set to the first word “Kimono” of the word string “Kimono within the rules” stored in the conversion result storage area 22 pointed to by the pointer P1, and the pointer P2 is set.
Is stored in the work area 28 (S3).
6). Next, in the word string “Kimono within rules” stored in the conversion result storage area 22 pointed to by the pointer P7, the word “rule” at the end of the part that matches the rule
And the information of the pointer P3 is stored in the work area 28 (S38). Subsequently, the pointer P4 is set in the rule dictionary 4
6 is set as the first item of the matched rule 5-2, and the pointer information of the pointer P4 is stored in the work area 28 (S40).

【0035】次に、変換結果記憶領域22に記憶されて
いる変換結果の内、ポインタP2の示す単語からポイン
タP3の示す単語までの範囲を補助記憶領域29に記憶
し(S42)、S44に進む。
Next, of the conversion results stored in the conversion result storage area 22, the range from the word indicated by the pointer P2 to the word indicated by the pointer P3 is stored in the auxiliary storage area 29 (S42), and the flow proceeds to S44. .

【0036】ここでは、規則辞書46中の規則5−2に
おいてポインタP4の指す先頭項目<U−着物:N>
(47a)は無変化マーカーNが付与されている(S4
4・YES)ので、書き換えずそのままにし、S46に
進む。
Here, in the rule 5-2 in the rule dictionary 46, the head item <U-kimono: N> indicated by the pointer P4.
(47a) is provided with the invariable marker N (S4).
4. YES), so that it is left as it is without rewriting, and the process proceeds to S46.

【0037】もし、ポインタP4の指す項目46b中の
書き換え情報の場所に削除マーカーDが立っているとき
は(S44・NO、S48・YES)、変換結果記憶領
域22のポインタP2の指す単語「着物」を削除し(S
50)、S46に進む。さらにポインタP4の指す項目
47a中の書き換え情報の場所に単語列があるときは
(S44・NO、S48・NO、S52・YES)、変
換結果記憶領域22のポインタP2の指す単語「着物」
をその単語列と書き換え(S54)、S46に進む。
If the deletion marker D is standing at the location of the rewriting information in the item 46b indicated by the pointer P4 (S44 / NO, S48 / YES), the word "kimono" indicated by the pointer P2 in the conversion result storage area 22 is displayed. Is deleted (S
50), and proceed to S46. Further, when there is a word string at the location of the rewriting information in the item 47a indicated by the pointer P4 (S44 / NO, S48 / NO, S52 / YES), the word "kimono" indicated by the pointer P2 in the conversion result storage area 22.
Is replaced with the word string (S54), and the process proceeds to S46.

【0038】S46においては、ポインタP2の指す単
語とポインタP3の指す単語が同じかどうか比較する。
つまり、ポインタP2の示す単語とポインタP3の示す
単語が同じときは、ポインタP2が規則に一致した単語
列の最後の単語まで進んだことを意味する。この場合
は、ポインタP2の指す「着物」は変換結果記憶領域2
2に記憶されている変換結果の最後の単語ではないので
(S46・NO)、単語ポインタP2を変換結果記憶領
域22に記憶している次の単語「を」に移動し、ポイン
タP4を規則5−2中の次の項目<U−を:N>(47
b)に移動すると共に(S56)、前記S44に戻る。
In S46, it is determined whether the word pointed by the pointer P2 is the same as the word pointed by the pointer P3.
That is, when the word indicated by the pointer P2 and the word indicated by the pointer P3 are the same, it means that the pointer P2 has advanced to the last word of the word string that matches the rule. In this case, the “kimono” indicated by the pointer P2 is stored in the conversion result storage area 2
Since the word is not the last word of the conversion result stored in No. 2 (S46: NO), the word pointer P2 is moved to the next word "" stored in the conversion result storage area 22 and the pointer P4 is changed to the rule 5 -2: <U-: N> (47
The process moves to b) (S56), and returns to S44.

【0039】ここでは、ポインタP4の指す項目<U−
を:N>に無変化マーカーNがあるので(S44・YE
S)、書き換えずそのままにして、S46に進む。この
場合は、ポインタP2の指す「を」は変換結果記憶領域
22に記憶している変換結果の最後の単語ではないので
(S46・NO)、単語ポインタP2を次の単語「規
定」に移動し、ポインタP4を規則5−2中の次の項目
<D−きてい:着,て,い>(47c)に移動すると共
に(S56)、前記S44に戻る。
Here, the item pointed by the pointer P4 <U-
: Since there is no change marker N in N> (S44 • YE
S) The process proceeds to S46 without rewriting. In this case, since "" indicated by the pointer P2 is not the last word of the conversion result stored in the conversion result storage area 22 (S46 / NO), the word pointer P2 is moved to the next word "prescribe". Then, the pointer P4 is moved to the next item in the rule 5-2, <D-Iki: wear, te, i> (47c) (S56), and the process returns to S44.

【0040】次いで、ポインタP4の指す項目<D−き
てい:着,て,い>の書き換え情報に単語列「着てい」
があるので(S44・NO、S48・NO、S52・Y
ES)、変換結果記憶領域22に記憶されているポイン
タP2の示す単語「規定」を「着てい」と書き換え(S
54)、前記S46に進む。
Next, the word string “wear” is added to the rewrite information of the item <D-kite: wear, te, i> indicated by the pointer P4.
(S44.NO, S48.NO, S52.Y)
ES), the word “regulation” indicated by the pointer P2 stored in the conversion result storage area 22 is rewritten as “wearing” (S
54), and proceed to S46.

【0041】ここで、ポインタP2が指す単語が、変換
結果記憶領域22に記憶されている単語列の内、ポイン
タP3の示す規則に一致した部分の末尾の単語になって
いるので(S46・YES)、規則書き換え回復処理に
進む(S57)。
Here, since the word pointed to by the pointer P2 is the last word of the part of the word string stored in the conversion result storage area 22 that matches the rule indicated by the pointer P3 (YES in S46). ), And proceed to the rule rewriting recovery process (S57).

【0042】以下規則書き換え回復処理について図10
を参照して説明する。
FIG. 10 shows the rule rewriting recovery process.
This will be described with reference to FIG.

【0043】ポインタP2は、前記規則変換処理によっ
て、変換結果記憶領域22に記憶されている「着物を着
てい内で」という単語列の内、規則に一致した「着物を
着てい」という部分の末尾の単語列「着てい」を示して
いる。ここで、ポインタP2が示す単語列「着てい」
は、変換結果記憶領域22に記憶されている単語列の内
で末尾の単語ではないので(S400・NO)、ポイン
タP8を変換結果記憶領域22に記憶されている単語列
の内で、ポインタP2の示す単語列「着てい」の直後の
単語「内」に設定し、ポインタ8のポインタ情報をワー
クエリア28に記憶する(S410)。次に、ポインタ
P2の示す単語列「着てい」とポインタP8の示す単語
「内」が接続可能か規則書き換え回復処理プログラム3
9により接続テーブル44を参照して判定する(S42
0)。
The pointer P2 indicates the part of the word "wearing kimono" that matches the rule in the word string "wearing kimono" stored in the conversion result storage area 22 by the rule conversion processing. The word string “wearing” at the end is shown. Here, the word string “wearing” indicated by the pointer P2
Is not the last word in the word string stored in the conversion result storage area 22 (S400: NO), the pointer P8 is changed to the pointer P2 in the word string stored in the conversion result storage area 22. Is set to the word “in” immediately after the word string “wear”, and the pointer information of the pointer 8 is stored in the work area 28 (S410). Next, the rule rewriting recovery processing program 3 determines whether the word string “wearing” indicated by the pointer P2 and the word “inside” indicated by the pointer P8 are connectable.
9 by referring to the connection table 44 (S42).
0).

【0044】ここで、ポインタP2の示す単語列「着て
い」が、ポインタP8の示す単語「内」と接続可能では
ないので(S420・NO)、ポインタP1の示す変換
結果記憶領域22中の単語列の内の規則と一致した部分
の先頭の単語からポインタP2の示す規則に一致した末
尾の単語までを、補助記憶領域29に記憶した内容に書
き換え、規則書き換えプログラム38により書き換えら
れる前の状態に戻す(S430)。具体的には、規則変
換処理により「着物を着てい内で」と変換されたものを
「着物を規定内で」という元の変換結果に戻すものであ
る。
Here, since the word string "wearing" indicated by the pointer P2 is not connectable to the word "inside" indicated by the pointer P8 (S420: NO), the word in the conversion result storage area 22 indicated by the pointer P1 is not detected. From the first word of the portion that matches the rule in the column to the last word that matches the rule indicated by the pointer P2, the contents stored in the auxiliary storage area 29 are rewritten to the contents before being rewritten by the rule rewriting program 38. Return (S430). Specifically, what is converted to "within the kimono" by the rule conversion process is returned to the original conversion result of "within the kimono".

【0045】尚、S400においてポインタP2が変換
結果記憶領域22に記憶されている単語の内、末尾の単
語であったとき(S400・YES)、又は、S420
においてポインタP2の示す単語とポインタP8の示す
単語が接続可能であったとき(S420・YES)は、
規則書き換え回復処理(S430)を行わず、図8に示
すS58に進む。
When the pointer P2 is the last word of the words stored in the conversion result storage area 22 in S400 (S400: YES), or S420.
When the word indicated by the pointer P2 and the word indicated by the pointer P8 can be connected (YES at S420),
The process proceeds to S58 shown in FIG. 8 without performing the rule rewriting recovery process (S430).

【0046】ここで、ポインタP1が変換結果記憶領域
22に記憶されている単語列の末尾の単語になければ
(S58・NO)、ポインタP1を次の単語へ一つずつ
移動させ(S60)、再び同様の規則検索処理(S3
2)を規則検索プログラム36により行う。この場合
は、ポインタP1を変換結果記憶領域22に記憶された
文字列「着物を規定内で」の二番目の単語「を」に移動
する。そして、S32〜S60の処理を繰り返す。最後
にポインタP1が変換結果記憶領域22中の末尾の単語
「で」となったとき(S58・YES)、規則変換処理
を終了する。
Here, if the pointer P1 is not at the last word of the word string stored in the conversion result storage area 22 (NO in S58), the pointer P1 is moved to the next word one by one (S60). Again, the same rule search processing (S3
2) is performed by the rule search program 36. In this case, the pointer P1 is moved to the second word “O” of the character string “Kimono within the rules” stored in the conversion result storage area 22. Then, the processing of S32 to S60 is repeated. Finally, when the pointer P1 has become the last word “at” in the conversion result storage area 22 (S58: YES), the rule conversion process ends.

【0047】尚、ワークエリア28に記憶されている規
則フラグがOFFであるときは(S34・NO)、前記
S58に進む。ここで、ポインタP1が変換結果記憶領
域22中の記憶されている単語列の末尾の単語になけれ
ば(S58・NO)、ポインタP1を次の単語へ一つず
つ移動させ(S60)、再び前記同様の規則検索処理
(S32)を規則検索プログラム36により行う。この
場合は、ポインタP1を変換結果記憶領域22に記憶さ
れた文字列の二番目の単語「を」に移動する(S58・
NO、S60)。そして、S32〜S60の処理を繰り
返す。最後にポインタP1が変換結果記憶領域22中の
末尾の単語のとき(S58・YES)、規則変換処理を
終了する。
When the rule flag stored in the work area 28 is OFF (S34 / NO), the flow proceeds to S58. Here, if the pointer P1 is not at the last word of the word string stored in the conversion result storage area 22 (S58 / NO), the pointer P1 is moved to the next word one by one (S60), and again A similar rule search process (S32) is performed by the rule search program 36. In this case, the pointer P1 is moved to the second word "" of the character string stored in the conversion result storage area 22 (S58.
NO, S60). Then, the processing of S32 to S60 is repeated. Finally, when the pointer P1 is the last word in the conversion result storage area 22 (S58: YES), the rule conversion processing ends.

【0048】以上説明したように、本実施例のかな漢字
変換装置は、かな漢字変換プログラム34により「着物
を規定内で」と変換されたものが、規則変換処理により
「着物を着てい内で」と変換されたとき、元の「着物を
規定内で」という候補に戻すことによって、規則変換に
よるユーザーの意図しない変換を防止することができ
る。
As described above, the kana-kanji conversion apparatus of the present embodiment converts the kana-kanji conversion program 34 into "within the kimono within the rules" by the rule conversion processing. When the conversion is performed, by returning the kimono to the original candidate of “Kimono within the rules”, it is possible to prevent the conversion that the user does not intend by the rule conversion.

【0049】[0049]

【発明の効果】以上説明したことから明かなように、本
発明のかな漢字変換装置は規則変換処理によって規則に
一致し書き換えの行われた部分とそうでない部分の接続
の不一致をさけ、適切な規則のみを適用し、不適切な位
置での規則の適用を行わないことによりかな漢字変換精
度の向上を計ることができる。
As is apparent from the above description, the kana-kanji conversion apparatus of the present invention matches the rules by the rule conversion process, avoids the connection mismatch between the rewritten portion and the non-rewritten portion, and applies an appropriate rule. Only kana-kanji conversion accuracy can be improved by applying only rules and not applying rules at inappropriate positions.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の構成を示す図である。FIG. 1 is a diagram showing a configuration of the present invention.

【図2】本実施例によるかな漢字変換装置の制御部のブ
ロック図である。
FIG. 2 is a block diagram of a control unit of the kana-kanji conversion device according to the embodiment.

【図3】本実施例の変換結果記憶領域の内容の概念図で
ある。
FIG. 3 is a conceptual diagram of the contents of a conversion result storage area according to the embodiment.

【図4】本実施例の基本辞書の内容の概念図である。FIG. 4 is a conceptual diagram of the contents of a basic dictionary according to the present embodiment.

【図5】本実施例の規則辞書の内容の概念図である。FIG. 5 is a conceptual diagram of the contents of a rule dictionary according to the present embodiment.

【図6】本実施例のかな漢字変換装置のフローチャート
である。
FIG. 6 is a flowchart of the kana-kanji conversion device of the present embodiment.

【図7】本実施例の規則変換のフローチャートである。FIG. 7 is a flowchart of rule conversion according to the embodiment.

【図8】本実施例の規則変換のフローチャートである。FIG. 8 is a flowchart of rule conversion according to the embodiment.

【図9】本実施例の規則検索サブルーチンのフローチャ
ートである。
FIG. 9 is a flowchart of a rule search subroutine of the embodiment.

【図10】本実施例の規則書き換え回復処理サブルーチ
ンのフローチャートである。
FIG. 10 is a flowchart of a rule rewriting recovery processing subroutine of the embodiment.

【符号の説明】[Explanation of symbols]

10 入力装置 12 CPU 20 RAM 22 変換結果記憶領域 24 読み入力バッファ領域 26 出力バッファ領域 28 ワークエリア 29 補助記憶領域 30 ROMエリア 32 プログラム部 34 かな漢字変換プログラム 36 規則検索プログラム 38 規則書き換えプログラム 39 規則書き換え回復プログラム 40 辞書部 42 基本辞書 44 接続テーブル 46 規則辞書 50 出力装置 DESCRIPTION OF SYMBOLS 10 Input device 12 CPU 20 RAM 22 Conversion result storage area 24 Reading input buffer area 26 Output buffer area 28 Work area 29 Auxiliary storage area 30 ROM area 32 Program part 34 Kana-Kanji conversion program 36 Rule search program 38 Rule rewriting program 39 Rule rewriting recovery Program 40 Dictionary unit 42 Basic dictionary 44 Connection table 46 Rule dictionary 50 Output device

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 かな読み文字列を入力するための入力手
段と、 単語の読みに対する表記を記憶した基本辞書と、 その基本辞書の2単語間の接続関係を記憶した接続テー
ブルと、 前記基本辞書と前記接続テーブルとに基づいて、かな漢
字変換を行うかな漢字変換手段と、 そのかな漢字変換手段による変換結果を記憶する変換結
果記憶手段と、 前記基本辞書の複数の単語列のパターンとその書き換え
情報を持つ規則を記憶した規則辞書と、 前記変換結果記憶手段の内容について、前記規則辞書か
ら一致するパターンを持つ規則を検索する規則検索手段
と、 その規則検索手段により一致した規則が検索されたと
き、検索された規則に一致した変換結果記憶手段の内容
を書き換える規則書き換え手段と、 前記接続テーブルに基づいて、前記規則書き換え手段に
よって書き換えが行なわれた部分と書き換えの行われて
いない部分とが正しくつながるかどうかを判定する接続
判定手段とその接続判定手段により、単語どうしのつな
がりが正しくないと判定されたとき、前記規則書き換え
手段により書き換えられた内容を元に戻す規則書き換え
回復手段と、 前記変換結果記憶手段の内容を出力する出力手段とを備
えることを特徴とするかな漢字変換装置。
An input unit for inputting a kana reading character string; a basic dictionary storing notations for reading words; a connection table storing a connection relationship between two words of the basic dictionary; Kana-Kanji conversion means for performing Kana-Kanji conversion on the basis of the Kana-Kanji conversion means, a conversion result storage means for storing a conversion result of the Kana-Kanji conversion means, A rule dictionary storing rules; a rule search unit for searching a rule having a matching pattern from the rule dictionary with respect to the contents of the conversion result storage unit; and a search when the rule search unit finds a matching rule. Rule rewriting means for rewriting the contents of the conversion result storage means that matches the set rule, and the rule document based on the connection table. The connection determining means and the connection determining means for determining whether the part rewritten by the replacement means and the part not rewritten are correctly connected, when the connection between the words is determined to be incorrect, A kana-kanji conversion device, comprising: rule rewriting recovery means for restoring the contents rewritten by the rule rewriting means; and output means for outputting the contents of the conversion result storage means.
JP03271260A 1991-10-18 1991-10-18 Kana-Kanji conversion device Expired - Fee Related JP3099457B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03271260A JP3099457B2 (en) 1991-10-18 1991-10-18 Kana-Kanji conversion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03271260A JP3099457B2 (en) 1991-10-18 1991-10-18 Kana-Kanji conversion device

Publications (2)

Publication Number Publication Date
JPH05108625A JPH05108625A (en) 1993-04-30
JP3099457B2 true JP3099457B2 (en) 2000-10-16

Family

ID=17497600

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03271260A Expired - Fee Related JP3099457B2 (en) 1991-10-18 1991-10-18 Kana-Kanji conversion device

Country Status (1)

Country Link
JP (1) JP3099457B2 (en)

Also Published As

Publication number Publication date
JPH05108625A (en) 1993-04-30

Similar Documents

Publication Publication Date Title
US5289375A (en) Translation machine
JP3099457B2 (en) Kana-Kanji conversion device
JP3097225B2 (en) Kana-Kanji conversion device
JP3342028B2 (en) Kana-Kanji conversion device
JPH05108624A (en) Kana to kanji converter
JP2870375B2 (en) Sentence correction device
JP3350070B2 (en) Kana-Kanji conversion device
JPH05108623A (en) Kana to kanji converter
JP3342026B2 (en) Kana-Kanji conversion device
JP3329476B2 (en) Kana-Kanji conversion device
JPH05108618A (en) Kana to kanje converter
JPH05108627A (en) Kana to kanji converter
JP3337524B2 (en) Kana-Kanji conversion device
JP2776069B2 (en) Document inspection device
JPH05120264A (en) Japanese syllabary to chinese character conversion device
JP3342027B2 (en) Kana-Kanji conversion device
JP3501240B2 (en) Document creation support device
JPH0844723A (en) Device for preparing document and method thereof
JPH0573539A (en) Kana/kanji conversion device
JP2723908B2 (en) Document creation device
JP3273778B2 (en) Kana-kanji conversion device and kana-kanji conversion method
JP2742142B2 (en) Dictionary registration method of Kana-Kanji conversion device
JPH0581262A (en) &#39;kana&#39;/&#39;kanji&#39; converter
JPH05120266A (en) Japanese syllabary to chinese character conversion device
JPH10261049A (en) Character recognizing device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees