JPH0264737A - Multilanguage generator - Google Patents

Multilanguage generator

Info

Publication number
JPH0264737A
JPH0264737A JP21767888A JP21767888A JPH0264737A JP H0264737 A JPH0264737 A JP H0264737A JP 21767888 A JP21767888 A JP 21767888A JP 21767888 A JP21767888 A JP 21767888A JP H0264737 A JPH0264737 A JP H0264737A
Authority
JP
Japan
Prior art keywords
pattern
multilingual
generating pattern
generation
multilanguage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP21767888A
Other languages
Japanese (ja)
Inventor
Takahiro Sugiyama
杉山 高弘
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP21767888A priority Critical patent/JPH0264737A/en
Publication of JPH0264737A publication Critical patent/JPH0264737A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To separate the control of a device and a multilanguage description, to make an output image clear and to easily correspond even when a change occurs in a data structure by providing a multilanguage generating pattern storage means, a generating pattern extracting means, etc. CONSTITUTION:A multilanguage generating pattern storage device 103 stores a multilanguage generating pattern which is the model of a language to be generated such as a Japanese sentence generating pattern and a program generating pattern. A generating pattern extracting device 102 takes elements successively out of timber structure type input data held by an input data holding device 101 until there is no more element and inputs the multilanguage generating pattern corresponding to the elements. Pattern components included in the pattern are taken out successively from the head of each language generating pattern in the device 103, the next suitable element is taken out of the input data by its type, or concerning a program language or Japanese to show the meaning of the present pattern component, the one suitable for a context is selected and outputted. Consequently, even when the data structure occurs in the data structure, the device can correspond easily.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、同一の木構造型データから、日本文やプログ
ラム言語あるいはプログラム構造図等を生成する多言語
生成装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a multilingual generation device that generates Japanese sentences, programming languages, program structure diagrams, etc. from the same tree-structured data.

〔概要〕〔overview〕

本発明は、同一の木構造型データから、日本文やプログ
ラム言語あるいはプログラム構造図等を生成する多言語
生成装置において、 多言語生成パターンを記憶させておいて、木構造データ
の多言語記述と制御とを分けて記述解析し言語生成パタ
ーンを作成して出力することにより、 出力イメージがひと目で理解でき、データ構造の変更に
柔軟に対応できるようにするものである。
The present invention stores multilingual generation patterns in a multilingual generation device that generates Japanese sentences, programming languages, program structure diagrams, etc. from the same tree-structured data, and generates multilingual descriptions of tree-structured data. By separately analyzing the description from control and creating and outputting language generation patterns, the output image can be understood at a glance, and it is possible to respond flexibly to changes in the data structure.

〔従来の技術〕[Conventional technology]

多言語を生成するには、多言語の元となる木構造型デー
タの中で、キーワードとなる各要素に適当な言語要素、
例えば名詞、動詞、付属語列、命令語等を対応させ許さ
れた語順で出力すればよい。
To generate multiple languages, in the tree-structured data that is the source of multiple languages, select appropriate language elements for each keyword element,
For example, nouns, verbs, adjunct word sequences, imperative words, etc. may be associated and output in the permitted word order.

従来の技術では、各要素に適当な言語要素を対応させ、
出力する際に、出力命令を実際に羅列する手続き的記述
が知られている。(文献 長尾真:“言語工学”人工知
能シリーズ2、昭晃堂1983)この従来の技術では、
多言語を生成するには、出力する言語に対応して手続き
的記述の出力命令を個々に用意する。
In conventional technology, each element is associated with an appropriate language element,
Procedural descriptions that actually list output instructions when outputting are known. (Reference Makoto Nagao: “Language Engineering” Artificial Intelligence Series 2, Shokodo 1983) With this conventional technology,
To generate multiple languages, separate procedural description output commands are prepared corresponding to the languages to be output.

第2図に木構造型データ例である仮定ノードを示し、こ
の第2図に示す仮定ノード201に対応する多言語生成
中の1つである手続き的記述の例を以下に示す。
FIG. 2 shows a hypothetical node that is an example of tree-structured data, and an example of a procedural description that is being generated in multiple languages corresponding to the hypothetical node 201 shown in FIG. 2 is shown below.

記述例 print (° もし、′) call(”C0NDスロ・Iトに記憶されている次の
ノードの処理手続き″) print (” とき、″) if <THfl’Nスロットに子ノードが存在するか
?〉then print (改行コード)ca l 
1 (”THBNスロットに記憶されている次のノード
の処理手続き″) print  (改行コード) if (εLSEスロットに子ノードが存在するか?〉
then print (”そうでなければ、′)ca
ll(”εLSEスロットに記憶されている次のノード
の処理手続き″) この記述例において、print文は、ふされしい文字
を出力し、call文は次のノード処理手続きを繰り返
し呼び出す。「”」の内部は、実際には漢字コードとな
っている。
Description example print (° If, ') call ("Next node processing procedure stored in C0ND slot I") print ("When,") if <THfl'N Is there a child node in the slot? ? 〉then print (line feed code) ca l
1 (“Procedure for the next node stored in the THBN slot”) print (line feed code) if (Is there a child node in the εLSE slot?>
then print (“otherwise,’) ca
ll ("next node processing procedure stored in εLSE slot") In this example description, the print statement outputs appropriate characters, and the call statement repeatedly calls the next node processing procedure. The part inside “” is actually a kanji code.

第2図に示す木構造型データは、要素として、仮定ノー
ド201、同等条件ノード202、実行ノード203、
加算ノード206、代入コード207、変数コード20
4.208.210.211、値コード205.209
を持つ。仮定ノード201は同等条件ノード202と実
行ノード203を下部構造として持ち、それぞれ、CD
N0スロツト212 、T)IBNスロット213で結
合している。
The tree-structured data shown in FIG. 2 includes, as elements, a hypothesis node 201, an equivalent condition node 202, an execution node 203,
Addition node 206, assignment code 207, variable code 20
4.208.210.211, value code 205.209
have. The assumption node 201 has an equivalence condition node 202 and an execution node 203 as substructures, each of which has a CD
The N0 slot 212 and T)IBN slot 213 are connected to each other.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかし、この従来の手続き的記述による多言語生成には
、以下に述べる欠点があった。
However, this conventional multilingual generation using procedural descriptions has the following drawbacks.

(a)  日本文やプログラム言語の出力イメージが、
その記述を見ても容易に理解できない。記述例1におい
て、出力される文字、改行、字下げ等が容易に分からな
いので、小さな変更に対しても対処し難い。
(a) The output image of Japanese sentences and programming languages is
Even if you look at the description, it is not easy to understand. In description example 1, output characters, line breaks, indentation, etc. are not easily recognized, so it is difficult to deal with even small changes.

(b)  手続き的記述のため、多言語生成装置の制御
と手続き的記述とが完全に依存関係にある。このため、
記述例1の仮定ノード手続きにおいて、if文によって
特定の条件が成立していることを確かめた上で出力命令
やcall文を実行しなければならない。したがって、
手続き的記述の中にif文やcall文を明示的に挿入
する必要があり、多言語生成装置の制御まで手続きの中
で記述しなければならなかった。
(b) Because of the procedural description, the control of the multilingual generator and the procedural description are completely dependent. For this reason,
In the hypothetical node procedure of description example 1, an output command or a call statement must be executed after confirming that a specific condition is met using an if statement. therefore,
It was necessary to explicitly insert if statements and call statements into the procedural description, and even the control of the multilingual generator had to be described within the procedure.

(C)  多言語生成を行うために、個々に手続き的記
述を作成しなくてはならないので、それらの記述の中に
は多言語生成装置の制御など重複する部分が多くなる。
(C) In order to perform multilingual generation, procedural descriptions must be created individually, so there are many overlapping parts in those descriptions, such as control of the multilingual generation device.

本発明は、従来技術のこのような欠点を解決するもので
、装置の制御と多言語記述とを分離して出力イメージが
明瞭であり、データ構造に変更が生じても容易に対応す
ることができる多言語生成装置を提供することを目的と
する。
The present invention solves these shortcomings of the prior art, and separates device control and multilingual description to provide a clear output image and easily adapt to changes in the data structure. The purpose is to provide a multilingual generation device that can.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、木構造型データの中から日本文またはプログ
ラム言語を含む複数の言語を生成して出力する多言語生
成装置において、 生成される複数の言語の木構造型入力データを保持する
入力データ保持手段と、生成される言語のひな型となる
多言語生成パターンを記憶する多言語生成パターン記憶
手段と、上記入力データ保持手段に保持されている入力
データから各要素を取り出し、上記多言語生成パターン
記憶手段から各要素に対応するパターンを抽出する生成
パターン抽出手段と、上記入力データ保持手段に保持さ
れているデータの文脈を探索する文脈探索手段と、この
文脈探索手段の出力により、上記生成パターン抽出手段
が抽出したパターンによって複数の言語形態で出力する
多言語出力手段とを備えたことを特徴とする。
The present invention provides a multilingual generation device that generates and outputs a plurality of languages including Japanese sentences or a programming language from tree-structure data. a holding means; a multilingual generation pattern storage means for storing a multilingual generation pattern serving as a template for a language to be generated; and a multilingual generation pattern storage means for extracting each element from the input data held in the input data holding means and generating the multilingual generation pattern. A generated pattern extraction means extracts a pattern corresponding to each element from the storage means, a context search means searches for the context of the data held in the input data holding means, and the output of the context search means extracts the generated pattern. The present invention is characterized by comprising multilingual output means for outputting in a plurality of languages depending on the pattern extracted by the extraction means.

〔作用〕[Effect]

入力データ保持手段に保持された木構造型入力データか
ら生成パターン抽出手段で、要素がなくなるまで順次取
り出す。現在取り出された要素に対応する多言語生成パ
ターンを入力する。パターン中に含まれるパターン構成
要素を多言語生成パターン記憶手段内の各言語生成パタ
ーンから先頭から順次取り出し、その種類によって入力
データの中から適切な次の要素を取り出すか、現在のパ
ターン構成要素の意味を表すプログラム言語や日本語を
文脈にふされしいものを選択して出力する。
A generated pattern extracting means sequentially extracts elements from the tree-structured input data held in the input data holding means until no elements are left. Enter the multilingual generation pattern corresponding to the currently retrieved element. The pattern components included in the pattern are sequentially extracted from each language generation pattern in the multilingual generation pattern storage means from the beginning, and depending on the type, the appropriate next element is extracted from the input data, or the current pattern component is extracted. Select and output the programming language or Japanese that expresses the meaning according to the context.

〔実施例〕〔Example〕

以下図面を参照して、本発明実施例を説明する。 Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明一実施例の多言語生成装置の構成を示す
ブロック図である。第1図において、本実施例の多言語
生成装置は、入力された木構造型入力データを保持する
入力データ保持装置101 と、この入力データを解析
して各要素に対応する多言語生成パターン記憶装置10
3内に記憶された各日本文生成パターン、プログラム生
成パターン、日本語注釈付プログラム生成パターン等か
ら生成パターンを抽出して多言語出力装置105に出力
する生成パターン抽出装置102と、入力データ保持装
置101に保持された入力データの文脈を解析探索して
、その結果を多言語出力装置105に出力する文脈探索
装置104と、この生成パターン抽出装置102からの
多言語生成パターンと文脈探索装置104とからのデー
タから多言語出力を行う多言語出力装置105とを備え
ている。
FIG. 1 is a block diagram showing the configuration of a multilingual generation device according to an embodiment of the present invention. In FIG. 1, the multilingual generation device of this embodiment includes an input data holding device 101 that holds input tree-structured input data, and a multilingual generation pattern memory that analyzes this input data and corresponds to each element. Device 10
a generation pattern extraction device 102 that extracts generation patterns from each Japanese sentence generation pattern, program generation pattern, Japanese annotated program generation pattern, etc. stored in 3 and outputs it to a multilingual output device 105; and an input data holding device. a context search device 104 that analyzes and searches the context of input data held in 101 and outputs the result to a multilingual output device 105; and a multilingual generation pattern and context search device 104 from this generation pattern extraction device 102. and a multilingual output device 105 that performs multilingual output from data from.

次に本実施例装置の動作を第2図に示す多言語の元とな
る木構造のデータについて、日本文、プログラムと日本
語注釈文付きプログラムを出力する例で説明し、特に日
本文で出力する場合の例で説明する。他の言語の場合に
おいても同様の処理がなされる。
Next, we will explain the operation of this embodiment of the device using an example of outputting Japanese text, a program, and a program with Japanese annotations for the tree-structured data that is the source of multilingual data shown in Figure 2. In particular, we will output Japanese text. This will be explained using an example. Similar processing is performed for other languages as well.

第3図は、多言語生成パターン記憶装置103内に記憶
されている生成される日本文を抽象化した日本文生成パ
ターン401〜405を示すものである。
FIG. 3 shows Japanese sentence generation patterns 401 to 405 that are stored in the multilingual generation pattern storage device 103 and are abstracted from Japanese sentences to be generated.

第3図の仮定ノード日本文生成パターン401は、構成
要素として先頭に仮定ノード名410を持つ。
The hypothetical node Japanese sentence generation pattern 401 in FIG. 3 has a hypothetical node name 410 at the beginning as a component.

仮定ノード名410は、このパターン記述が第2図の仮
定ノード201 に対応するものであることを認識する
ためにある。
Hypothetical node name 410 is provided to recognize that this pattern description corresponds to hypothetical node 201 in FIG.

この仮定ノード名410 に続く、符号411.412
.413.414および415のrmoshi *C0
ND toki #new−1ine *T)IEJの
部分が仮定ノードから実際に日本文を生成するとき参照
されるパターンの構成要素である。先頭に「*」が付い
たパターン構成要素412.415.418は、第2図
の仮定ノード201の下部構造が、C0NDスロツト2
12と、THENスロット213 、ELSEスロット
によって接続されていることを示す。ただし、このとき
8LSEスロツトはパターンに[コがついているため、
第2図の仮定ノード201以下にELSEスロットが存
在していなくてもかまわない。すなわち、なにも出力し
ないで次の処理に移る。パターン構成要素411.41
3.417 は、仮定ノードの処理を表現する適切な日
本語とそれぞれ対応している。パターンとしては出力す
る日本語を表すラベル(この例ではローマ字のラベル)
で表現されており、” moshi ”411と、’t
oki”413と°’5oudenakereba”4
17は、それぞれ「もし、]、「とき、」、「そうでな
ければ、」が実際に出力される。
The code 411.412 following this assumed node name 410
.. 413.414 and 415 rmoshi *C0
ND toki #new-1ine *T) The IEJ part is a component of a pattern that is referred to when actually generating Japanese sentences from a hypothetical node. The pattern components 412, 415, and 418 with "*" at the beginning have the lower structure of the hypothetical node 201 in FIG.
12, THEN slot 213, and ELSE slot. However, at this time, the 8LSE slot has a [ ] in the pattern, so
There is no need for ELSE slots to exist below the hypothetical node 201 in FIG. In other words, it moves to the next process without outputting anything. Pattern component 411.41
3.417 respectively correspond to the appropriate Japanese words expressing the processing of the hypothetical node. The pattern is a label representing the Japanese language to be output (in this example, a label in Roman letters)
It is expressed as "moshi"411 and 't
oki"413 and °'5oudenakereba"4
17, "if,""when," and "otherwise," are actually output.

第6図は、本実施例での動作を説明するフローチャート
であり、このフローチャートに従い、第2図の木構造型
データの例から次の 「もし、Xが2に等しいとき、 Yに1を加える。
FIG. 6 is a flowchart explaining the operation of this embodiment. According to this flowchart, from the tree-structured data example in FIG. .

ZにYをセットする。」 の日本文が入力される過程を順次説明する。Set Y to Z. ” The process of inputting Japanese sentences will be explained step by step.

■ 第2図に示す木構造型データを入力データ保持装置
101に入力する(ステップ5100O)。
(2) Input the tree-structured data shown in FIG. 2 into the input data holding device 101 (step 5100O).

■ たどるべきノードが既に存在しないときくステップ
5100I)、処理を終了する。
■ If the node to be traced no longer exists (step 5100I), the process ends.

■ 入力データ保持装置101に保持されている木構造
型データから、最上位ノードとなっている仮定ノード2
01を取り出す(ステップ51002)。
■ Hypothetical node 2, which is the top node, from the tree-structured data held in the input data holding device 101
01 is taken out (step 51002).

■ 仮定ノード201に対応する日本文生成パターン4
01を多言語生成パターン記憶装置103から抽出する
(ステップ51003)。
■ Japanese sentence generation pattern 4 corresponding to hypothetical node 201
01 is extracted from the multilingual generation pattern storage device 103 (step 51003).

■ 日本文生成パターン401の生成部の先頭から構成
要素”mosh i”411を取り出すくステップ51
004)。
■ Step 51 of extracting the component “moshi i” 411 from the beginning of the generation part of the Japanese sentence generation pattern 401
004).

■ 構成要素″’mosh i ’”411は′°*”
で始まっていないので(ステップ51005)、多言語
出力装置105へ処理を移す。
■ Component "mosh i '"411 is'°*"
Since the process has not started with (step 51005), the process is transferred to the multilingual output device 105.

■ 多言語出力装置105では”mosh i”に対応
する日本3吾「もし、」を出力する(ステップ5100
6)。
■ The multilingual output device 105 outputs the Japanese word "moshi" corresponding to "moshi i" (step 5100).
6).

■ 日本文生成パターン401において次の構成要素本
C0ND ”412を取り出す(ステップ51004)
■ Extract the next component book C0ND "412 in the Japanese sentence generation pattern 401 (step 51004)
.

■ 構成要素’本C0ND ”412は、′*”で始ま
っているので、子ノードを探索する(ステップ5100
?)。
■ Component 'Book C0ND "412" starts with '*', so the child node is searched (step 5100).
? ).

■ 仮定ノード201から下部構造である同等条件ノー
ド202が、C0NDスロツト以下に接続されているこ
とが構成要素”紅OND”より分かる(ステップ510
01、ステップ51002)。
■ It can be seen from the component "red OND" that the equivalence condition node 202, which is a lower structure from the hypothetical node 201, is connected below the C0ND slot (step 510).
01, step 51002).

同等条件ノード202の処理は、■以下と同様に処理す
れば、仮定ノードにおける日本語の条件文が出力される
。このとき出力される日本文は、「Xが2に等しい。」
である。
If the equivalent condition node 202 is processed in the same manner as described below, the Japanese conditional sentence at the hypothetical node will be output. The Japanese sentence that is output at this time is "X is equal to 2."
It is.

■ 日本文生成パターン401の次の構成要素’tok
i”413は、■と同様に多言語出力装置105で「と
き、」を出力する(ステップ51006)。
■ Next component of Japanese sentence generation pattern 401 'tok'
i'' 413 outputs ``toki,'' on the multilingual output device 105 similarly to ■ (step 51006).

■ さらに処理を続けていくと、■と同様に次の構成要
素”$newline”414を取り出す(ステップ5
1004)。
■ As the process continues, the next component "$newline" 414 is extracted in the same way as in ■ (step 5).
1004).

■ 多言語出力装置105において、’llnewli
ne”414は、改行コードを出力する。このとき先頭
に#″′が付いている構成要素は、文脈探索装置104
が入力データ保持装置101に保持されているデータの
文脈を探索することによって、ふされしい出力をする。
■ In the multilingual output device 105, 'llnewli
ne'' 414 outputs a new line code. At this time, components with #''' at the beginning are output by the context search device 104.
outputs an appropriate output by searching the context of the data held in the input data holding device 101.

この場合、文脈探索装置104が実行ノード203以下
の子ノードが複数個存在するかを調べる。
In this case, the context search device 104 checks whether there are multiple child nodes below the execution node 203.

現在存在するので文脈探索装置104は、多言語出力装
置105へ改行コードを出力し以後率下げを実行する情
報を送る(ステップ51005)。
Since it currently exists, the context search device 104 outputs a line feed code to the multilingual output device 105 and sends information for executing rate reduction from now on (step 51005).

■ 日本語生成パターン401の構成要素′本T HB
 N ”415 も■と同様に文脈探索装置104で実
行ノード203をたどり、■以下と同様に処理すれば、
仮定ノードにおける本T)IENの日本語の実行文が出
力される。
■ Components of Japanese generation pattern 401' Book T HB
N "415 also traces the execution node 203 with the context search device 104 in the same way as ■, and processes in the same manner as ■ and below, then
The Japanese executable sentence of T)IEN at the hypothetical node is output.

■ 最後に、構成要素”糺LSE”418を処理するが
、第2図にはIELSEスロットが存在しないので、[
]で囲まれた部分は出力しない。
■Finally, we process the component "LSE" 418, but since there is no IELSE slot in FIG.
] The part surrounded by brackets is not output.

これらの処理によって、 「もし、Xが2に等しいとき、 Yに1を加える。Through these processes, "If X is equal to 2, Add 1 to Y.

2にYをセットする。」 文が出力される。Set Y to 2. ” The statement is output.

また、第4図は、プログラム言語を出力するプログラム
生成パターンを説明する図であり、この第4図に示す生
成パターンにより、上述の■〜■と同様の動作により次
のプログラム言語が多言語出力装置105から出力され
る。
Moreover, FIG. 4 is a diagram explaining a program generation pattern for outputting a programming language. The generation pattern shown in FIG. It is output from the device 105.

rlFX=2 COMPUTB Y= Y+1 MOVB   Y TO2 END−IF、J また、第5図は、日本語注釈文付プログラム生成パター
ンを説明する図であり、この第4図に示す生成パターン
により、上述の■〜@と同様の動作により、次の日本語
注釈文付プログラム言語を多言語出力装置105から出
力される。
rlFX=2 COMPUTB Y= Y+1 MOVB Y TO2 END-IF, J Fig. 5 is a diagram explaining the generation pattern of a program with Japanese annotation text, and the generation pattern shown in Fig. 4 allows the above-mentioned ■ By the same operation as ~@, the next Japanese annotated program language is output from the multilingual output device 105.

rlFX=2 /本Xが21こ等しい本/ CDMPUTB Y= Y +1 /本Y1こ1をカロえる。本/ MOVB     Y  TOZ /本Z1こYをセットする。本/ END−IP、 J このように、多言語生成パターンを多言語生成パターン
記憶装置103にそれぞれ記憶しておき、生成パターン
抽出装置102で入力データに対応するパターンを取り
出して多言語出力装置105で出力するので、 (1)第3図、第4図、第5図に示す多言語生成仮定ノ
ードパターン401.601.801 を参照すると、
出力される言語どおりのイメージでパターンが、改行や
字下げを表現できることがわかる。出力される日本語も
漢字コードではなく、ローマ字等の一見して分かるもの
で置き換えられる。
rlFX=2 / book where X is equal to 21 / CDMPUTB Y= Y +1 / book Y1 equals 1. Set the book/MOVB Y TOZ/book Z1koY. Book/END-IP, J In this way, the multilingual generation patterns are stored in the multilingual generation pattern storage device 103, and the pattern corresponding to the input data is extracted by the generation pattern extraction device 102 and sent to the multilingual output device 105. (1) Referring to the multilingual generation hypothetical node pattern 401.601.801 shown in Figures 3, 4, and 5,
You can see that the pattern can express line breaks and indentation using images that match the output language. The output Japanese is not a kanji code, but is replaced with something that can be understood at a glance, such as Roman characters.

(2)多言語生成パターン記述において、*が先頭に付
いている構成要素(例えば本CDN0412等)はスロ
ット名を表し、それに従って次にたどるべき子ノードを
入力データ保持装置から抽出する。このため従来の子ノ
ードに対応する手続きを呼び出す方法に比べて簡潔に記
述されている。#が先頭に付いている構成要素(例えば
$newline、 # i等)は文脈に沿って出力を
選択できるようにパターン外部に定義した処理手続きを
呼び出す。これによりパターンに制御を持ち込むことな
く、本多言語生成処理の記述性を高めている。[コで囲
まれたスロットは、その子ノードが存在しないとき、[
コの内部は何も出力しない。従来の方式では手続きの内
部が複雑になっていたが、多言語生成パターンでは上記
方式により制御と多言語記述が独立した。
(2) In the multilingual generation pattern description, a component with an * at the beginning (for example, this CDN0412, etc.) represents a slot name, and the child node to be followed next is extracted from the input data holding device according to the slot name. Therefore, the description is simpler than the conventional method of calling a procedure corresponding to a child node. Components prefixed with # (for example, $newline, #i, etc.) call a processing procedure defined outside the pattern so that the output can be selected according to the context. This improves the descriptive nature of this multilingual generation process without introducing control into patterns. [Slots enclosed in square brackets are [ ] when their child nodes do not exist.
Nothing is output inside this. In the conventional method, the inside of the procedure was complicated, but in the multilingual generation pattern, the above method made the control and multilingual description independent.

(3)新しいプログラム言語によるプログラムを生成し
たいとき、本実施例装置によれば新しいプログラム言語
の構文を表す生成パターンを付加するだけで簡単に対処
できる。
(3) When it is desired to generate a program in a new programming language, according to the present embodiment, this can be easily done by simply adding a generation pattern representing the syntax of the new programming language.

〔発明の効果〕〔Effect of the invention〕

以上説明したように、本発明の多言語生成装置は、日本
文生成パターンを有し、装置の制御と多言語記述とを分
離しているため、日本文の出力イメージが記述を見ただ
けで明瞭であり、文の元となるデータ構造に変更が生じ
ても容易に対応でき、従来のものと比べて多言語生成の
操作性が高くなった多言語生成装置を実現できる。
As explained above, the multilingual generation device of the present invention has a Japanese sentence generation pattern and separates the control of the device from the multilingual description, so the output image of the Japanese sentence can be changed just by looking at the description. It is possible to realize a multilingual generation device that is clear, can easily cope with changes in the data structure that is the source of sentences, and has improved operability in multilingual generation compared to conventional devices.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明実施例の構成を示す図。 第2図は入力データのデータ構造例を示す図。 第3図は日本文生成パターンの例を示す説明図。 第4図はプログラム生成パターンの例を示す説明図。 第5図は日本譜注釈文付プログラム生成パターンの例を
示す説明図。 第6図は、本実施例装置の動作を説明するフローチャー
ト。 101・・・入力データ保持装置、102・・・生成パ
ターン抽出装置、103・・・多言語生成パターン記憶
装置、104・・・文脈探索装置、105・・・多言語
出力装置。
FIG. 1 is a diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a diagram showing an example of the data structure of input data. FIG. 3 is an explanatory diagram showing an example of a Japanese sentence generation pattern. FIG. 4 is an explanatory diagram showing an example of a program generation pattern. FIG. 5 is an explanatory diagram showing an example of a program generation pattern with Japanese score annotations. FIG. 6 is a flowchart explaining the operation of the device of this embodiment. 101... Input data holding device, 102... Generation pattern extraction device, 103... Multilingual generation pattern storage device, 104... Context search device, 105... Multilingual output device.

Claims (1)

【特許請求の範囲】 1、木構造型データの中から日本文またはプログラム言
語を含む複数の言語を生成して出力する多言語生成装置
において、 生成される複数の言語の木構造型入力データを保持する
入力データ保持手段と、 生成される言語のひな型となる多言語生成パターンを記
憶する多言語生成パターン記憶手段と、上記入力データ
保持手段に保持されている入力データから各要素を取り
出し、上記多言語生成パターン記憶手段から各要素に対
応するパターンを抽出する生成パターン抽出手段と、 上記入力データ保持手段に保持されているデータの文脈
を探索する文脈探索手段と、 この文脈探索手段の出力により、上記生成パターン抽出
手段が抽出したパターンによって複数の言語形態で出力
する多言語出力手段と を備えたことを特徴とする多言語生成装置。
[Scope of Claims] 1. A multilingual generation device that generates and outputs a plurality of languages including Japanese sentences or a programming language from tree-structured data, comprising: a multilingual generation pattern storage means for storing a multilingual generation pattern serving as a template for a language to be generated; and a multilingual generation pattern storage means for storing a multilingual generation pattern that is a template for a language to be generated; a generation pattern extraction means for extracting a pattern corresponding to each element from the multilingual generation pattern storage means; a context search means for searching the context of the data held in the input data holding means; and an output from the context search means. and multilingual output means for outputting in a plurality of languages according to the pattern extracted by the generation pattern extraction means.
JP21767888A 1988-08-30 1988-08-30 Multilanguage generator Pending JPH0264737A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21767888A JPH0264737A (en) 1988-08-30 1988-08-30 Multilanguage generator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21767888A JPH0264737A (en) 1988-08-30 1988-08-30 Multilanguage generator

Publications (1)

Publication Number Publication Date
JPH0264737A true JPH0264737A (en) 1990-03-05

Family

ID=16708006

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21767888A Pending JPH0264737A (en) 1988-08-30 1988-08-30 Multilanguage generator

Country Status (1)

Country Link
JP (1) JPH0264737A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110674A (en) * 1992-09-28 1994-04-22 Sony Corp Program preparing device and interactive program preparing device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06110674A (en) * 1992-09-28 1994-04-22 Sony Corp Program preparing device and interactive program preparing device

Similar Documents

Publication Publication Date Title
JPS6375835A (en) Apparatus for generating intended code, program, list and design document
Zaytsev et al. Parsing in a broad sense
JP5071373B2 (en) Language processing apparatus, language processing method, and language processing program
CN102439590A (en) System and method for automatic semantic labeling of natural language texts
JPH0411906B2 (en)
JPH06110701A (en) Device and method for converting computer program language
JPH0567144A (en) Method and device for pre-edit supporting
Hernandez et al. PyRATA, Python Rule-based feAture sTructure Analysis
JPH0264737A (en) Multilanguage generator
KR0142818B1 (en) Identifier dictionary generator
EP3255558A1 (en) Syntax analyzing device, learning device, machine translation device and recording medium
JPH06214776A (en) Automatic generation system for software
KR101472029B1 (en) Natural language-based syntax analysis method using index element and system thereof
JP3003459B2 (en) Program creation support device
JPH0424825A (en) Grammar editing processor
JP2006277674A (en) Sentence division computer program
JPS63192161A (en) Japanese sentence forming device
Rodger et al. Increasing the use of JFLAP in Courses
Kešelj A Proposal for Universal Preprocessing and Text-Embedded Programming (PTEP) System
JPS62297973A (en) Editing device for soft specification using meaning of input data
CN114443685A (en) SQL injection detection method and device
Hornick et al. A natural language query system for Hubble Space Telescope proposal selection
JPH02129758A (en) Japanese sentence elaborating processor
JPH0439763A (en) Sentence editing device
JPS6210734A (en) Program generating system