JP2000076370A - Slip recognizing method and its device - Google Patents

Slip recognizing method and its device

Info

Publication number
JP2000076370A
JP2000076370A JP11271784A JP27178499A JP2000076370A JP 2000076370 A JP2000076370 A JP 2000076370A JP 11271784 A JP11271784 A JP 11271784A JP 27178499 A JP27178499 A JP 27178499A JP 2000076370 A JP2000076370 A JP 2000076370A
Authority
JP
Japan
Prior art keywords
data
input
format
processing
field
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
JP11271784A
Other languages
Japanese (ja)
Inventor
Haruo Takeda
晴夫 武田
Masayuki Tsuchiya
雅幸 土屋
Hitoshi Suzuki
仁 鈴木
Shoji Yamada
昇司 山田
Toshihiko Matsuda
敏彦 松田
Hiroshi Fujise
洋 藤瀬
Keisho Kuno
恵章 久野
Ichitaro Ogo
一太郎 小合
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP11271784A priority Critical patent/JP2000076370A/en
Publication of JP2000076370A publication Critical patent/JP2000076370A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To easily obtain document format information for key-inputting data to a data processor by referring to a format display displayed on a screen by inputting a picture including a slip written in an original document and executing a program corresponding to the kind of the slip in the inputted picture. SOLUTION: First, a paper where the format of the slip is written is read by a picture inputting device 93 to store in a picture storing area 981 as digital picture information. Next, the picture of a slip format is recognized to obtain format information converted into code data and is stored in a slip format storing area 932. In addition, slip contents data suited to the slip format is prepared and stored in a slip contents storing area 983. At the same time, outputting data of slip data by these format and contents data of these is prepared and stored in an outputting slip storing area. Then, output slip data is printed by a printer 95 or stored in a data file 99. Thus, a new data inputting format, etc., is easily executed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、画像データを利用
する文書データ処理方式に関し、更に詳しくは、例えば
一般の事務処理分野で、キーボードからデータベースへ
のデータ入力、あるいはキーボードやデータベースから
のデータ出力のために必要とされる、文字データの入力
あるいは出力のための空欄をもつ所定の書式を備えた文
書(帳票)の作成のためのデータ処理方式、及びデータ
処理方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a document data processing system using image data, and more particularly, to data input from a keyboard to a database or data output from a keyboard or a database in, for example, a general office processing field. The present invention relates to a data processing method and a data processing method for creating a document (form) having a predetermined format with a blank space for inputting or outputting character data required for the data processing.

【0002】[0002]

【従来の技術】ワークステーション、オフィスプロセッ
サ、パーソナルコンピュータ、あるいはワードプロセッ
サなどのオフィス機器を利用して、例えば、各種の申込
み書、データ入力票、請求伝票や領収書、あるいは会
計、統計、内訳などのための所定の書式をもつ文書(帳
票)を発行したり、画面上に表示された上記文書のフォ
ーマットを利用してデータベースにデータを入力しよう
とする場合、データ入出力のための空欄をもつ帳票の書
式を上述したオフィス機器の表示画面上に定義する必要
がある。
2. Description of the Related Art Using office equipment such as a workstation, office processor, personal computer, or word processor, for example, various application forms, data entry slips, billing slips and receipts, or accounting, statistics, breakdown, etc. When a document (form) having a predetermined format for issuance is to be issued or data is to be input to a database using the format of the document displayed on the screen, a form having a blank for data input / output is provided. Must be defined on the display screen of the above-described office equipment.

【0003】従来の代表的な書式定義方法は、例えば日
立製作所発行のマニュアルで、ETOILE/OPと題
する文献に記載されているように、ディスプレイ上でカ
ーソル等を移動させて罫線や文字を定義し、さらにプロ
グラムのエディタ等を用いてこれを発行するためのプロ
グラムを作成編集するものである。
[0003] A conventional typical format definition method is to define ruled lines and characters by moving a cursor or the like on a display as described in, for example, a manual issued by Hitachi, Ltd. in a document entitled ETOILE / OP. In addition, a program for issuing the program is created and edited using a program editor or the like.

【0004】[0004]

【発明が解決しようとする課題】このような従来技術で
は、機器にとって未知の書式の帳票を発行したり、書式
画面を利用したデータ入力環境をつくるためには、大き
な時間とプログラムに関する専門的知識および経験を要
する。未知の書式は機器の初期導入ばかりでなく、例え
ば取引先から指定伝票という形で指定される場合など、
日常的に生じる。このためその簡単化と高速化が大きな
課題となっていた。
In such prior art, in order to issue a form in a format unknown to a device or to create a data input environment using a format screen, a large amount of time and specialized knowledge about a program are required. And require experience. Unknown format is not only the initial introduction of equipment, for example, when specified by a supplier in the form of a specified slip
Occurs on a daily basis. For this reason, simplification and speeding up have been major issues.

【0005】尚、OCRで文字読取りを行なうための書
式データを、文書画像データから自動的に生成するよう
にした文書解析方式が、特開昭61-059568号公報に記載
されている。
Japanese Patent Application Laid-Open No. 61-059568 discloses a document analysis system in which format data for performing character reading by OCR is automatically generated from document image data.

【0006】上記文書解析方式では、文書画像データか
ら、文書に含まれる線パターンで構成された表形式の物
理的な構造を認識した後、上記表形式を構成している矩
形のセル領域(先願の明細書では、これを枠と言ってい
る)の種類、属性および従属書係を分析することによ
り、文書の論理的な構造の認識も行なわれている。しか
しながら、上記従来技術で行なわれている論理構造の認
識は、OCRへの適用を目的としたものであり、セルの
種類(項目名称を設定するためのセルか、データを設定
するためのセルかの区別)、セルの属性(セル内に記入
される文字の種類および許容範囲)、およびセル間の従
属関係を分析するに留まっている。
In the above document analysis method, after recognizing a physical structure of a tabular form composed of line patterns included in a document from document image data, a rectangular cell area (first part) constituting the tabular form is recognized. In the specification of the application, this is called a frame), and the logical structure of the document is also recognized by analyzing the type, attribute, and dependents. However, the recognition of the logical structure performed in the above prior art is intended for application to OCR, and the type of cell (cell for setting item names or cell for setting data) is used. Only the analysis of cell attributes (types and tolerances of characters written in cells) and sub-dependencies between cells.

【0007】本発明の目的は、オペレータが画面上に表
示された書式表示を参照して、データをデータ処理装置
にキー入力するための文書書式情報を容易に得られるよ
うにした帳票あるいは書式文書データの処理方法および
装置を提供することにある。
It is an object of the present invention to provide a form or form document in which an operator can easily obtain document format information for keying data into a data processing device by referring to a format display displayed on a screen. An object of the present invention is to provide a data processing method and apparatus.

【0008】本発明の他の目的は、オペレータがキー入
力したデータ、あるいはデータファイルから読出された
データを書式中の所定の空欄に設定した形の文書を印刷
あるいは表示するのに適した、帳票あるいは書式文書の
ためのデータ処理方法および装置を提供することにあ
る。
Another object of the present invention is to provide a form suitable for printing or displaying a document in which data input by an operator or data read from a data file is set in a predetermined blank space in a format. Another object is to provide a data processing method and apparatus for a form document.

【0009】本発明の更に他の目的は、データを入力あ
るいは出力するための空欄(データ入出力フィールド)
を有する所定のフォーマットの書式表示を参照しながら
オペレータがデータ処理装置にデータを入力するため
の、あるいは、データ入力された帳票を出力するための
データ処理プログラムを、オペレータの簡単な操作によ
り生成するのに適したプログラム自動生成方法および装
置を提供することにある。
Still another object of the present invention is to provide a blank (data input / output field) for inputting or outputting data.
A data processing program for an operator to input data to a data processing device or to output a data-inputted form while referring to a format display of a predetermined format having a It is an object of the present invention to provide a method and an apparatus for automatically generating a program suitable for the above.

【0010】[0010]

【課題を解決するための手段】上記目的を達成するため
に、本発明による帳票あるいは書式文書の処理方式で
は、画像入力手段から直接的に、あるいは他のシステム
を介して間接的に供給された帳票あるいは書式文書の画
像を処理するためのプロセッサと、表示手段と、オペレ
ータ操作手段とを備えたデータ処理システムを用い、固
定データまたは可変データを記入するためのフィールド
部分を含む帳票あるいは書式文書の画像を、上記プロセ
ッサに予め用意された書式認識プログラムに従って処理
させ、入力画像情報から文書の構造を自動的に認識す
る。
In order to achieve the above object, a form or form document processing system according to the present invention is supplied directly from an image input means or indirectly through another system. Using a data processing system having a processor for processing an image of a form or form document, a display means, and an operator operating means, a form or form document including a field portion for filling fixed data or variable data is used. The image is processed by the processor according to a format recognition program prepared in advance, and the structure of the document is automatically recognized from the input image information.

【0011】入力文書の書式認識は、例えば、線分、文
字あるいは円弧などのパターン配置、すなわち入力文書
の図形構造を識別するための物理構造認識と、この物理
構造認識結果に基づいて行なわれる入力文書の論理構造
認識とからなる。ここで言う論理構造は、例えば、帳票
中に含まれる表(テーブル)の行桁構造やフィールドな
どの意味に及ぶ構造を意味する。この論理構造の認識結
果を用いることにより、例えば、表示画面上でオペレー
タが1つのフィールドにデータの入力を完了したとき、
カーソルを次のフィールドに自動的に移動させたり、フ
ァイルに予め準備されたデータを該当するフィールドに
正しく設定したりすることができる。
For example, the format recognition of the input document is performed based on the pattern arrangement of lines, characters, or arcs, that is, the physical structure recognition for identifying the graphic structure of the input document, and the input performed based on the physical structure recognition result. Recognition of the logical structure of the document. The logical structure referred to here means, for example, a structure that extends to the meaning of a line column structure or a field of a table included in a form. By using the result of the recognition of the logical structure, for example, when the operator completes inputting data in one field on the display screen,
The cursor can be automatically moved to the next field, or data prepared in advance in the file can be correctly set in the corresponding field.

【0012】上記論理構造認識について更に詳述する
と、この認識処理では、例えば可変データを入力するた
めの入出力フィールドと、固定データあるいは項目名称
が記入されている固定フィールドとを識別するためのフ
ィールド認識と、入出力フィールドと固定フィールドあ
るいはフィールド名称とを対応づけるためのフィールド
関係認識と、知識ベースを参照して入出力フィールド属
性認識とが行なわれる。
The above-described logical structure recognition will be described in further detail. In this recognition processing, for example, an input / output field for inputting variable data and a field for identifying a fixed field in which fixed data or an item name is written are described. Recognition, field relationship recognition for associating input / output fields with fixed fields or field names, and input / output field attribute recognition with reference to a knowledge base are performed.

【0013】本発明によれば、入力文書の論理構造とし
て、各人出力フィールドに設定すべきデータの供給源を
識別するようにしているため、例えば「商品コード」、
「商品名」、「単価」、「数量」、「金額」の記入欄を
もつ書式文書画像を認識処理して、オペレータが商品コ
ードと数量を入力するだけで、他の欄をデータファイル
からの読出しデータ、あるいは計算結果で自動的に満た
すことのできるデータ入力用、あるいは帳票発行用のデ
ータ処理システムを実現することができる。また、上述
した文書の物理構造と論理構造の認識結果を利用するこ
とにより、データ入力用あるいは帳票出力処理のための
プログラムを自動的に生成することもできる。
According to the present invention, as the logical structure of the input document, the source of the data to be set in each person's output field is identified.
Recognize and process a form document image with columns for “Product Name”, “Unit Price”, “Quantity”, and “Amount”, and the operator simply inputs the product code and quantity, and the other fields are entered from the data file. It is possible to realize a data processing system for inputting data or issuing a form that can be automatically filled with read data or calculation results. In addition, by using the recognition result of the physical structure and the logical structure of the document, a program for data input or a form output process can be automatically generated.

【0014】本発明の他の特徴は、帳票あるいは書式文
書の論理構造認識の1つとして、物理構造の認識結果を
示すデータに基づいて、表形式の行方向の寸法、および
各入出力フィールドの桁寸法を、表示画面上でのカーソ
ルの基本ピッチあるいは文字ピッチに適合するように修
正した正規化された書式表示を得ることにある。文書の
構造データとは別に、このように画面上でのデータ入力
に適した正規化された書式表示を生成することにより、
データ入力のためのオペレータのキー操作、およびキー
ボードあるいはプログラム処理により生成されたデータ
の画面への出力が容易になる。
Another feature of the present invention is that one of the logical structures of a form or a form document is based on data indicating the recognition result of a physical structure, and has a table-like dimension in a row direction and the size of each input / output field. It is an object of the present invention to obtain a normalized format display in which a digit size is modified so as to conform to a basic pitch or a character pitch of a cursor on a display screen. Apart from the structural data of the document, by generating such a normalized format display suitable for on-screen data entry,
Operator key operations for data input and output of data generated by a keyboard or program processing to a screen are facilitated.

【0015】尚、書式文書上の各入出力フィールドに記
入できる文字のサイズ、文字数、および文字ピッチは、
各入出力フィールドの物理サイズと、各入出力フィール
ドに設定されるデータの種類(これは、各入出力フィー
ルドに与えるべきフィールド名称により決まる)とによ
り決定できる。これらの文字サイズ、文字数、文字ピッ
チを示す情報は、フィールド属性の1部として記憶さ
れ、上記行桁の正規化処理は上記フィールド属性を参照
して行なわれる。
The size, the number of characters, and the character pitch that can be entered in each input / output field on the form document are as follows:
It can be determined by the physical size of each input / output field and the type of data set in each input / output field (this is determined by the field name to be given to each input / output field). The information indicating the character size, the number of characters, and the character pitch is stored as a part of the field attribute, and the line digit normalization process is performed with reference to the field attribute.

【0016】書式表示上の入出力フィールドに設定され
た文字データは、入力文書の物理構造認識データで定義
される文書フォーマットに、上記フィールド属性で定義
されている文字サイズ、文字ピッチでもって組み合わさ
れ、プリンタに出力される。これにより、データ入力操
作時に画面上に出力された文字サイズおよび書式表示と
は異なる入力文書と同一フォームの印刷を、空白部にフ
ィールドサイズに応じたサイズの文字で満たした形で得
ることができる。
The character data set in the input / output fields on the format display is combined with the document format defined by the physical structure recognition data of the input document with the character size and character pitch defined by the field attributes. Is output to the printer. Accordingly, it is possible to obtain a print of the same form as an input document having a different character size and format display output on the screen at the time of the data input operation, in a form in which a blank portion is filled with characters having a size corresponding to the field size. .

【0017】本発明において、物理構造認識により得ら
れた文書データは、キー操作により罫線の移動や消去、
文字の変更、追加、消去を可能とした書式表示を表示画
面に産み出す。従って、オペレータは、表示画面上の書
式表示の1部を修正するための操作を行なうことによ
り、原文書とは部分的に異なる書式文書について、上述
した論理構造認識とプログラム自動生成を行なわせるこ
とができる。
In the present invention, the document data obtained by the physical structure recognition can be moved or deleted by a key operation.
Create a format display on the display screen that allows you to change, add, or delete characters. Therefore, the operator performs an operation for correcting a part of the format display on the display screen, thereby causing the above-described logical structure recognition and automatic program generation for a format document partially different from the original document. Can be.

【0018】本発明によれば、例えば罫線により区画さ
れた複数のフィールド(欄)からなる表と、これらのフ
ィールドの内、あるいは外に記入された文字列とを含む
原紙を用い、これを画像入力装置に入力してプロセッサ
に画像処理を行なわせることにより、入力文書の構造を
自動的に認識し、表面画面上に書式表示を行なう。オペ
レータは、キー操作により、画面上で書式データの一部
を修正したり、追加したりすることができるため、書式
設計作業を大幅に改善できる。
According to the present invention, a base paper including, for example, a table including a plurality of fields (columns) partitioned by ruled lines and a character string entered in or outside of these fields is used, and this is used as an image. By inputting to the input device and causing the processor to perform image processing, the structure of the input document is automatically recognized, and the format is displayed on the front screen. The operator can modify or add a part of the format data on the screen by operating the keys, thereby greatly improving the format design work.

【0019】また、上記認識結果を利用してデータ入力
用、あるいは帳票発行用の実用的なプログラム、あるい
は担当者が若干の修正を施こすだけで実用できる程度に
完成されたプログラムを自動的に生成できるため、書式
の変更あるいは新設に伴なうプログラム開発作業を迅速
に済ませることができる。
Also, a practical program for data entry or form issuance using the above recognition result, or a program completed to such an extent that it can be put into practical use with only a slight modification by a person in charge, is automatically generated. Because it can be generated, the program development work associated with a format change or new establishment can be completed quickly.

【0020】[0020]

【発明の実施の形態】以下本発明の実施例を説明する。Embodiments of the present invention will be described below.

【0021】図1は、本発明の帳票処理装置のハードウ
ェアの構成の1例を示す。図において、91はオペレー
タからのコマンドを入力するためのディスプレス画面と
キーボードとを備えたコンソール、92は帳票処理を実
行するためのプロセッサ、93は画像データをメモリに
取り込むための画像入力装置、94は画像入力装置93
のコントローラ、95はメモリ上のデータを印刷するた
めのプリンタ、96はプリンタ95のコントローラ、9
7はプロセッサ92が実行するプログラムを格納するた
めのメモリ、98はプロセッサ92が使用する各種デー
タを格納するためのメモリ、99は各種の数値データや
文書(帳票)データを格納するためのメモリ(例えばデ
ィスク装置)、90は上記プロセッサ92とその他の要
素とを相互に接続するためのバスである。メモリ97
は、帳票処理の全体動作を制御するためのメインプログ
ラムを格納する全体制御部970と、画像を入力するた
めのサブルーチンプログラムを格納する画像入力部97
1と、帳票の書式を認識するためのサブルーチンプログ
ラムを格納する帳票書式認識部972と、帳票を作成す
るためのサブルーチンプログラムを格納する帳票作成部
973と、帳票を出力するためのサブルーチンプログラ
ムを格納する帳票出力部974から構成される。メモリ
98は、画像データを格納するための画像格納領域98
1と、帳票の書式データを格納するための帳票書式格納
領域982と、帳票の内容データを格納するための帳票
内容格納領域983と、出力する帳票データを格納する
ための出力帳票格納領域984と、プロセッサ92の作
業領域985から構成される。メモリ97はROM(R
ead Only Memory)、メモリ98はRA
M(Random Access Memory)を利
用して実施することもできるし、またディスクなど外部
記憶装置とRAMを組み合わせて実施することもでき
る。
FIG. 1 shows an example of the hardware configuration of a form processing apparatus according to the present invention. In the figure, 91 is a console provided with a press screen and a keyboard for inputting commands from an operator, 92 is a processor for executing a form processing, 93 is an image input device for loading image data into a memory, 94 is an image input device 93
, A printer 95 for printing data on the memory, 96 a controller for the printer 95, 9
Reference numeral 7 denotes a memory for storing a program executed by the processor 92, 98 denotes a memory for storing various data used by the processor 92, and 99 denotes a memory for storing various numerical data and document (form) data. Reference numeral 90 denotes a bus for interconnecting the processor 92 and other elements. Memory 97
Are an overall control unit 970 for storing a main program for controlling the overall operation of the form processing, and an image input unit 97 for storing a subroutine program for inputting an image.
1, a form format recognizing unit 972 for storing a subroutine program for recognizing a form format, a form preparing unit 973 for storing a subroutine program for preparing a form, and a subroutine program for outputting a form. And a form output unit 974 to be executed. The memory 98 has an image storage area 98 for storing image data.
1, a form format storage area 982 for storing form data, a form content storage area 983 for storing form data, and an output form storage area 984 for storing form data to be output. , The work area 985 of the processor 92. The memory 97 has a ROM (R
read only memory), the memory 98 is RA
It can be implemented using M (Random Access Memory), or can be implemented by combining an external storage device such as a disk with a RAM.

【0022】図2は、メモリ970に格納される帳票処
理のメインプログラムの基本的実施例を示すフローチャ
ートを示す。ステップ1〜ステップ4は領域971〜9
74に格納されたサブルーチンプログラムにそれぞれ対
応する。画像入力ステップ1では、帳票の書式が記され
た用紙を画像入力装置93で読み取って、ディジタル画
像情報として画像格納領域981に格納する。帳票書式
認識ステップ2では、前記帳票書式の画像を認識してコ
ードデータに変換された書式情報を求め、帳票書式格納
領域982に格納する。帳票作成ステップ3では、前記
帳票書式に適合する帳票内容データを作成し、帳票内容
格納領域983に格納すると共に、これらの書式および
内容データによる帳票データの出力用データを作成し、
出力帳票格納領域に格納する。本ステップの特別な場合
として帳票内容が存在せず帳票書式のみの帳票データを
作成することもできる。帳票出力ステップ4では、前記
出力帳票データをプリンタ95により印刷したり、デー
タファイル99に格納したりする。
FIG. 2 is a flowchart showing a basic embodiment of a main program for form processing stored in the memory 970. Steps 1 to 4 correspond to areas 971 to 9
74 respectively correspond to the subroutine programs stored in the subroutine program. In the image input step 1, a paper on which a form is described is read by the image input device 93 and stored in the image storage area 981 as digital image information. In the form format recognition step 2, the form format image is recognized, the format information converted into the code data is obtained, and stored in the form format storage area 982. In the form creation step 3, form content data conforming to the form format is created and stored in the form content storage area 983, and output data of the form data in these formats and content data is created.
Store in the output form storage area. As a special case of this step, it is also possible to create form data having only a form format without form contents. In the form output step 4, the output form data is printed by the printer 95 or stored in the data file 99.

【0023】図3、図4は、以下の実施例の説明に利用
する帳票データの一例を示す。図3EX1は、前記のス
テップ1で画像入力装置93から入力する帳票用紙の1
例である。図4EX2は、前記のステップ4でプリンタ
95から出力する帳票の1例である。本帳票処理装置
は、EX1のように罫線(線パターン)100、帳票名
称(タイトル)101、年月日102、項目名称103
(103A〜103D)などからなる帳票の書式が記さ
れている用紙を画像入力して、EX2のように各項目や
日付のデータ内容110を含む帳票をプリンタ等から高
品質で出力することを目的とするものである。
FIGS. 3 and 4 show examples of form data used in the description of the following embodiment. FIG. 3EX1 shows one of the forms input from the image input device 93 in step 1 described above.
It is an example. FIG. 4EX2 is an example of a form output from the printer 95 in step 4 described above. The form processing apparatus includes a ruled line (line pattern) 100, a form name (title) 101, a date 102, an item name 103 as in EX1.
(103A-103D), etc. The purpose of this is to input an image on a form on which a form format is recorded, and to output a form including data contents 110 of each item and date, such as EX2, from a printer or the like with high quality. It is assumed that.

【0024】尚、本明細書では、罫線100によって描
かれた表において、行あるいは列方向に並ぶ各矩形領域
を欄あるいはセルと呼び、これらのうち、項目名称10
3が記入されているものを項目セルあるいは固定フィー
ルドセル、後でデータを記入するための空白領域を残し
ているものを入出力フィールドセルと呼ぶことにする。
また、表以外の領域にある特殊なフィールドは、単に固
定フィールドあるいは入出力フィールドと呼ぶ。
In the present specification, in the table drawn by the ruled line 100, each rectangular area arranged in the row or column direction is called a column or a cell.
A cell in which 3 is written is called an item cell or a fixed field cell, and a cell in which a blank area for writing data is left is called an input / output field cell.
Special fields in areas other than the table are simply called fixed fields or input / output fields.

【0025】図5はメモリ970に格納される帳票処理
プログラムの他の実施例を示すフローチャートである。
図2のプログラム・フローチャートでは、画像の入力か
ら帳票の印刷までを一連の動作で実行していたが、図5
のプログラムでは、画像の入力から書式の登録までの処
理を行なう書式定義処理と、書式の検索から帳票の印刷
までの処理を行なう帳票発行処理とを入力コマンドによ
り選択的に実行できるようにしている。
FIG. 5 is a flowchart showing another embodiment of the form processing program stored in the memory 970.
In the program flowchart of FIG. 2, a series of operations from image input to form printing are executed.
In this program, a form definition process for processing from image input to form registration and a form issuing process for processing from form search to form printing can be selectively executed by input commands. .

【0026】図において、コマンド入力ステップ5aで
は、書式定義コマンド、帳票発行コマンド、終了コマン
ドのいずれかのコマンドを入力する。書式定義コマンド
が入力された場合には、図2で説明したステップ1,2
を実行した後、ステップ5bにおいて帳票書式格納領域
に格納された書式データを、オペレータが指定する帳票
名と対応させてディスク装置等99に登録し、最後にコ
マンド入力ステップ5aを実行する。帳票発行コマンド
が入力された場合には、まず前記ステップ5bで登録し
た書式データの中から所望の書式を検索し、次に図2を
用いて説明したステップ3,4を実行し、最後にコマン
ド入力ステップ5aを実行する。本実施例では、オペレ
ータが同一の書式を用いて複数の帳票の連続発行を行え
るようにするため、この最後のコマンド入力ステップで
の帳票の連続発行コマンドの入力を許している。
In the figure, in a command input step 5a, one of a format definition command, a form issuing command, and an end command is input. If a format definition command is input, steps 1 and 2 described in FIG.
Is performed, the format data stored in the form format storage area in step 5b is registered in the disk device or the like 99 in association with the form name specified by the operator, and finally, the command input step 5a is executed. When the form issuing command is input, first, a desired format is searched from the format data registered in step 5b, and then steps 3 and 4 described with reference to FIG. 2 are executed. The input step 5a is executed. In this embodiment, in order to allow the operator to continuously issue a plurality of forms using the same format, input of a continuous form issuing command in the last command input step is permitted.

【0027】以下、本発明の主要部であるステップ1〜
4の処理内容を詳細に説明する。
Hereinafter, steps 1 to 1, which are main parts of the present invention, will be described.
4 will be described in detail.

【0028】図6は画像入力ステップ1で実行されるサ
ブルーチンプログラムの詳細フローチャートを示す。本
プログラムでは、先ず、ステップ11で、画像入力のた
めのパラメータとして、メモリ98における画像格納領
域のアドレス情報、入力すべき画像の範囲、ディジタル
化の標本化密度等をコントローラ94に設定する。次
に、ステップ12で、前記パラメータに従って画像デー
タを入力することをコントローラ94に指示し、画像入
力装置93を起動する。ステップ13では、コントロー
ラ94から画像入力処理が終了したか否かを示すフラグ
情報を読みだす。終了していない場合にはステップ13
を繰り返す。
FIG. 6 is a detailed flowchart of the subroutine program executed in the image input step 1. In this program, first, at step 11, address information of an image storage area in the memory 98, a range of an image to be input, a sampling density of digitization, and the like are set to the controller 94 as parameters for image input. Next, in step 12, the controller 94 is instructed to input image data according to the parameters, and the image input device 93 is activated. In step 13, flag information indicating whether or not the image input processing has been completed is read from the controller 94. Step 13 if not completed
repeat.

【0029】図7(A),(B)は入力画像のメモリ9
8への格納方法を説明するための図である。図(A)は
2次元的な画像を画素と呼ばれる小さな点の配列に分割
した状態を示す。ここでは、各点の値は白または黒の何
れかの状態をとるものとし、メモリ内では1ビットで表
現できるものとする。図において、mは左右方向の画素
位置、nは上下方向の画素位置、Mは位置mの最大値、
Nは位置nの最大値を示す。図(B)は、これらの画素
がメモリ98の画像格納領域981に格納された状態を
示す。図において、wは1ワードのビット数、aはメモ
リアドレス、bはワード内のビット数を表す。m,n,
bを1から始まる整数、aを0から始まる相対アドレス
とすると、画素位置(m,n)の画素120を、次の関
係が成立するメモリ内位置(a,b)に格納することに
よって、1対1対応とすることができる。
FIGS. 7A and 7B show an input image memory 9.
8 is a diagram for explaining a method of storing data in the storage device of FIG. FIG. 1A shows a state in which a two-dimensional image is divided into an array of small points called pixels. Here, it is assumed that the value of each point is either white or black, and can be represented by one bit in the memory. In the figure, m is a pixel position in the horizontal direction, n is a pixel position in the vertical direction, M is the maximum value of the position m,
N indicates the maximum value of the position n. FIG. 7B shows a state in which these pixels are stored in the image storage area 981 of the memory 98. In the figure, w represents the number of bits in one word, a represents a memory address, and b represents the number of bits in a word. m, n,
Assuming that b is an integer starting from 1 and a is a relative address starting from 0, the pixel 120 at the pixel position (m, n) is stored at the position (a, b) in the memory where the following relationship is established. One-to-one correspondence is possible.

【0030】a=↓{M・(n−1)+m}/w↓ b=M・(n−1)+m−a・w ここに記号↓↓で挟まれた式は、結果の小数以下を切り
捨てることを意味する。以下の説明では、説明の簡単化
のため、参照する画素位置を、メモリアドレスではな
く、2次元の画素位置で表現する。
A = ↓ {M · (n−1) + m} / w ↓ b = M · (n−1) + m−aw The expression between the symbols ↓↓ indicates that the decimal part of the result is Means to truncate. In the following description, for the sake of simplicity, a pixel position to be referred to is represented by a two-dimensional pixel position instead of a memory address.

【0031】図8は、帳票書式認識ステップ2で実行さ
れるサブルーチンプログラムの第1の実施例を示すフロ
ーチャートである。第1の実施例では、帳票書式認識ス
テップ2は、帳票の書式としてその物理構造を認識する
物理構造認識ステップ21のみから構成される。ここで
言う「帳票の物理構造」とは、後に詳述するように、線
分,文字,円弧等、帳票の意味には及ばない単なる図形
構造を意味する。
FIG. 8 is a flowchart showing a first embodiment of a subroutine program executed in the form format recognition step 2. In the first embodiment, the form format recognition step 2 comprises only a physical structure recognition step 21 for recognizing the physical structure of the form as a form. The “physical structure of a form” here means a simple graphic structure, such as a line segment, a character, and an arc, which does not extend to the meaning of the form, as described later in detail.

【0032】図9は前記物理構造認識ステップ21で呼
び出されるサブルーチンプログラムのフローチャートを
示す。上記サブルーチン21は、メモリ領域972内
で、プログラム2とは異なる領域に格納されている。
FIG. 9 shows a flowchart of a subroutine program called in the physical structure recognition step 21. The subroutine 21 is stored in an area different from the program 2 in the memory area 972.

【0033】ステップ211では、与えられた領域を、
黒画素が連結する領域の外接矩形を単位として複数のブ
ロックに分割する。与えられる領域は、ステップ2で最
初に呼ばれるときは画像全体であり、後述のように本ス
テップ21自身の中で再帰的に呼ばれるときは画像の一
部分となる。ステップ212では、ブロック分割ステッ
プ211で求めたブロックの内の1つのブロックを選択
する。ステップ213では、選択されたブロックの種別
が表か表以外かを判別する。このブロック種別の判別
は、例えば、ブロックの横幅と高さの値が、両方とも予
め定めた閾値より大きい場合に表を構成するブロックと
判断し、それ以外の場合は表以外の要素を構成するブロ
ックと判断する。ブロック種別が表以外と判定された場
合には、ステップ218で構成要素を認識する。ブロッ
ク種別が表と判定された場合には、まずステップ214
で、そのブロックを白画素連結領域の外接矩形の単位に
分割する。次にステップ215で、上記領域分割ステッ
プ214で求めた領域の内の1つを選択する。次にステ
ップ216で、選択された領域の種別が欄(セル)か、
欄以外かを認識する。領域種別が欄以外と判定された場
合には、ステップ217で非欄領域に関する認識処理を
行う。領域種別が欄と判定された場合には、ステップ2
1で物理構造認識サブルーチンプログラムを再帰的に呼
び出し、さらにこの領域の物理的な構造を認識する。
尚、上述したプログラムの再帰的な呼び出しを通常のプ
ロセッサで実行するための方法は、通常のプログラム言
語のコンパイラ技術として公知であり、例えばN.Wi
rth氏著、片山卓也氏訳による「アルゴリズム+デー
タ構造=プログラム」と題する文献(1979年、日本
コンピュータ協会発行)の142ページ以降に詳細に解
説されているので、ここでは説明を省略する。以上の処
理をすべてのブロックおよび領域について繰り返す。
In step 211, the given area is
The region is divided into a plurality of blocks in units of a circumscribed rectangle of a region where black pixels are connected. The given area is the whole image when it is first called in step 2, and becomes a part of the image when it is called recursively in step 21 itself as described later. In step 212, one of the blocks obtained in the block dividing step 211 is selected. In step 213, it is determined whether the type of the selected block is a table or a table other than a table. In the determination of the block type, for example, when the values of the width and the height of the block are both larger than a predetermined threshold value, the block is determined to be a block constituting a table, otherwise, an element other than the table is configured. Judge as a block. If it is determined that the block type is other than the table, the component is recognized in step 218. If the block type is determined to be a table, first, step 214
Then, the block is divided into units of a circumscribed rectangle of the white pixel connection region. Next, in step 215, one of the regions obtained in the region dividing step 214 is selected. Next, in step 216, whether the type of the selected area is a column (cell),
Recognize that it is not a column. If it is determined that the area type is other than the column, in step 217, a recognition process for a non-column area is performed. If the area type is determined to be a column, step 2
In step 1, the physical structure recognition subroutine program is recursively called, and furthermore, the physical structure of this area is recognized.
A method for executing the above-described recursive call of a program by a normal processor is known as a compiler technology of a normal programming language. Wi
This is described in detail on page 142 and subsequent pages of "Algorithm + Data Structure = Program" by Rth and translated by Takuya Katayama (published by the Japan Computer Association in 1979), and will not be described here. The above processing is repeated for all blocks and areas.

【0034】図10は前記ブロック分割ステップ211の
詳細フローチャートを示す。図において、変数Ιは処理
中有効な仮ブロック数、nは図7で説明した上下方向画
素位置、iは処理すべき仮ブロックの番号、Nは対象画
像または対象領域の高さ、p(x,y)は画素(x,
y)の濃度、mは左右方向画素位置、liおよびriは
第i番目の仮ブロックの左端画素位置および右端画素位
置を示す。
FIG. 10 is a detailed flowchart of the block dividing step 211. In the figure, the variable Ι is the number of valid temporary blocks during processing, n is the vertical pixel position described in FIG. 7, i is the number of the temporary block to be processed, N is the height of the target image or target area, , Y) is the pixel (x,
The density of y), m is the horizontal pixel position, and li and ri are the left and right pixel positions of the i-th temporary block.

【0035】本処理では、先ず、上述した変数の初期設
定を行ない、1行分の画素の処理が終了する毎に、ステ
ップ211aとステップ211bを繰り返す。ステップ
211aでは、当該行の処理終了時点で、テーブルT1
において同一のブロックが複数の仮ブロックとして検出
されていることが判明したものについて、仮ブロックの
統合処理を行う。ステップ211bでは、当該行におい
て新たに検出される仮ブロックをテーブルT1に登録処
理を行う。これらの仮ブロックの処理により変数Ιの値
も更新される。各仮ブロックについては、その左端また
は右端の位置が更新されるか否かを調べ、更新される場
合はステップ211dで仮ブロック情報を更新する。更
新されない場合には、仮ブロックが当該行において終了
しているか否かを調べ、終了している場合にはステップ
211eでその仮ブロックを正式ブロックとしてテーブ
ルT2に登録(追加)し、テーブルT1から仮ブロック
を削除する処理を行う。最後に、ステップ211Cで、
正式ブロックの外接四角形が互いに重なるものについ
て、これを統合する処理を行う。
In this processing, first, the above-mentioned variables are initialized, and each time the processing for one row of pixels is completed, steps 211a and 211b are repeated. In step 211a, at the end of the processing of the row, the table T1
In, it is determined that the same block has been detected as a plurality of temporary blocks. In step 211b, a temporary block newly detected in the row is registered in the table T1. The value of the variable Ι is also updated by the processing of these temporary blocks. For each temporary block, it is checked whether or not the position of the left end or the right end is updated. If it is updated, the temporary block information is updated in step 211d. If it is not updated, it is checked whether or not the temporary block has been completed in the row. A process for deleting a temporary block is performed. Finally, in step 211C,
If the circumscribed rectangles of the formal blocks overlap each other, a process of integrating them is performed.

【0036】以上の処理において、仮ブロックおよび正
式ブロックの情報登録のために用いるテーブルT1,T
2の構成を図11(A),(B)に示す。図(A)に示す
テーブルT1は、仮ブロックの情報を格納するためのテ
ーブルであり、仮ブロック左端の画素位置l、右端の画
素位置r、上端の画素位置n0の各項目から構成され
る。図(B)に示すテーブルT2は、正式ブロックの情
報を格納するためのテーブルであり、ブロック左端の画
素位置x0、右端の画素位置x1、上端の画素位置y
0、下端の画素位置y1の各項目から構成される。な
お、変数Jは最終的に得られたブロックの数を表してい
る。
In the above processing, the tables T1, T used for registering the information of the temporary block and the formal block
2A and 2B are shown in FIGS. The table T1 shown in FIG. 7A is a table for storing information of a temporary block, and is composed of items of a pixel position 1 at a left end, a pixel position r at a right end, and a pixel position n0 at an upper end. A table T2 shown in FIG. 7B is a table for storing information of a formal block, and includes a pixel position x0 at the left end of the block, a pixel position x1 at the right end, and a pixel position y at the upper end.
0, and each item of the pixel position y1 at the lower end. Note that the variable J represents the number of blocks finally obtained.

【0037】以上のブロック分割処理の様子を図12の具
体的例を用いて説明すると次のようになる。記号a〜e
はそれぞれステップ211a〜211eに対応し、その
地点で対応するステップが実行されることを示してい
る。まず行L1で、新規の仮ブロックB1を示す情報が
テーブルT1へ登録される(b)。次の行L2では、上
記仮ブロックと接する黒画素の検出によって、その左端
および右端の画素位置の更新が行われ(d)、同一行に
現われる別の仮ブロックB2の情報がテーブルT1へ登
録される(b)。さらに次の行L3では上記2つの仮ブ
ロックB1,B2の左右端の画素位置の更新が行われ
(d)、更に別の仮ブロックB3が登録される。仮ブロ
ックB1とB2は、本行の処理終了後、1つの仮ブロッ
クB1−2に統合される(a)。さらに次の行L4で
は、上記で統合された仮ブロックB1−2と接する黒画
素は現われないため、即ち仮ブロックが継続していない
ため、この行の処理終了後、上記仮ブロック情報を基に
正式ブロック情報を生成し、テーブルT2に格納すると
共に、その仮ブロック情報をテーブルT1より削除する
(e)。このようにすべての行の処理が終了した後、各
ブロックに外接する四角形が共通領域をもつ(互いに重
なる)ものについてブロック情報を統合する(c)。本
例では、2つのブロックB1−2とB3は部分的に重な
るため、1つのブロックに統合される。
The state of the above block division processing will be described with reference to a specific example of FIG. Symbols a to e
Respectively correspond to steps 211a to 211e, and indicate that the corresponding step is executed at that point. First, in a row L1, information indicating a new temporary block B1 is registered in the table T1 (b). In the next row L2, the detection of the black pixel in contact with the temporary block updates the left and right pixel positions thereof (d), and registers information of another temporary block B2 appearing in the same row in the table T1. (B). In the next row L3, the pixel positions at the left and right ends of the two temporary blocks B1 and B2 are updated (d), and another temporary block B3 is registered. The temporary blocks B1 and B2 are integrated into one temporary block B1-2 after the processing of this row is completed (a). Further, in the next row L4, since the black pixels in contact with the temporary block B1-2 integrated above do not appear, that is, the temporary block is not continued, and after the processing of this row is completed, based on the temporary block information, The formal block information is generated and stored in the table T2, and the temporary block information is deleted from the table T1 (e). After the processing of all the rows is completed as described above, block information is integrated for squares circumscribing each block having a common area (overlapping each other) (c). In this example, since the two blocks B1-2 and B3 partially overlap, they are integrated into one block.

【0038】図13は前記領域分割ステップ214の詳細
なフローチャートを示す。図において、変数Ιは処理中
に有効な仮領域の数、nは図7で説明した上下方向画素
位置、iは処理すべき仮領域の番号、Nは対象領域の高
さ、p(x,y)は画素(x,y)の濃度、mは左右方
向画素位置、liおよびriは第i仮領域の左端画素位
置および右端画素位置を示す。
FIG. 13 is a detailed flowchart of the area dividing step 214. In the figure, the variable Ι is the number of temporary areas effective during processing, n is the vertical pixel position described in FIG. 7, i is the number of the temporary area to be processed, N is the height of the target area, p (x, y) indicates the density of the pixel (x, y), m indicates the horizontal pixel position, and li and ri indicate the left end pixel position and the right end pixel position of the i-th temporary area.

【0039】本処理では、図11に示したのと同様のテー
ブルを用い、先ず、上述した変数の初期設定を行ない、
1行分の画素の処理が終了する毎に、ステップ214a
とステップ214bを繰り返す。ステップ214aで
は、当該行の処理終了時点で、同一の領域が複数の仮領
域として検出されていることが判明したものについて、
仮領域の統合処理を行う。ステップ214bでは、当該
行において新たに検出される仮領域の登録処理を行う。
これらの仮領域の処理により、変数Ιの値も変更され
る。
In this processing, the same table as that shown in FIG. 11 is used, and the above-mentioned variables are initially set.
Each time the processing of the pixels for one row is completed, step 214a
And step 214b are repeated. In step 214a, when it is determined that the same area is detected as a plurality of temporary areas at the end of the processing of the row,
The temporary area is integrated. In step 214b, registration processing of a temporary area newly detected in the row is performed.
By processing these temporary areas, the value of the variable の is also changed.

【0040】各仮領域については、その左端または右端
の位置が更新されるか否かを調べ、更新される場合は、
ステップ214dで仮領域情報を更新する。更新されな
い場合には、仮領域が当該行において終了しているか否
かを調べ、終了している場合には、ステップ214eで
正式領域として登録(追加)し、仮領域データを削除す
る処理を行う。最後に正式、ステップ214cで、領域
の外接四角形が重なるものを統合する。
With respect to each temporary area, it is checked whether or not the position of the left end or the right end is updated.
In step 214d, the temporary area information is updated. If it is not updated, it is checked whether or not the temporary area is completed in the row. If it is completed, processing for registering (adding) it as a formal area in step 214e and deleting temporary area data is performed. . Finally, formally, in step 214c, the overlapping rectangles of the regions are integrated.

【0041】図14(A)〜(C)は、物理構造認識ステ
ップ21の経過を具体的に説明するための図である。図
(A)は、原画像EX1に対して最初のブロック分割ス
テップ211を施したとき認識される領域の構造EX3
を示す。ここでは、検出された各ブロックを、それに外
接する四角形で表現している。図(B)に示すEX4
は、EX3中の表と判定されたブロックに対して領域分
割ステップ214を施したとき認識される領域の状態を
示す。特に検出した各領域を、それに外接する四角形で
表現している。図(C)に示すEX5は、上記EX4に
おいて欄と判定された領域に対して、それぞれブロック
分割ステップ211を施した場合に認識される領域の状
態である。
FIGS. 14A to 14C are diagrams for specifically explaining the progress of the physical structure recognition step 21. FIG. FIG. 9A shows a structure EX3 of an area recognized when the first block division step 211 is performed on the original image EX1.
Is shown. Here, each detected block is represented by a rectangle circumscribing it. EX4 shown in FIG.
Indicates a state of an area recognized when the area dividing step 214 is performed on a block determined as a table in EX3. In particular, each detected area is represented by a rectangle circumscribing it. EX5 shown in FIG. 9C is the state of the area recognized when the block division step 211 is performed on the area determined to be a column in EX4.

【0042】図15は前記領域種別認識ステップ216の
フローチャートである。本実施例では上記認識ステップ
216は、それぞれ領域の左右上下の各辺を認識する4
つのステップ216−1〜216−4からなる。物理構
造認識ステップ21では、この認識結果に基づいて、例
えば3辺以上の線分をもつ領域は欄であると判定する。
FIG. 15 is a flowchart of the area type recognition step 216. In the present embodiment, the recognition step 216 is to recognize each of the left, right, upper, and lower sides of the area.
It consists of two steps 216-1 to 216-4. In the physical structure recognition step 21, based on the recognition result, for example, it is determined that an area having a line segment of three or more sides is a column.

【0043】これらの4辺の認識ステップのうち、左辺
の認識ステップ216−1の詳細を、図16のフローチャ
ートを用いて説明する。図において、nは領域の上下方
向の画素位置を示す変数、n0,n1はそれぞれnの最
小値および最大値、mは領域の左右方向の画素位置を示
す変数、m0は領域の境界位置のmの値、wid(n)
は上下方向nの位置の画素行において境界m0の近傍で
横方向に連続する黒画素の個数を示す変数である。
The details of the left side recognition step 216-1 among the four side recognition steps will be described with reference to the flowchart of FIG. In the figure, n is a variable indicating the pixel position in the vertical direction of the area, n0 and n1 are the minimum and maximum values of n, m is a variable indicating the pixel position in the horizontal direction of the area, and m0 is m at the boundary position of the area. Value of wid (n)
Is a variable indicating the number of black pixels continuous in the horizontal direction near the boundary m0 in the pixel row at the position n in the vertical direction.

【0044】まず最初に各変数の初期設定を行った後、
ステップ216aでwid(n)を領域の外側について
求める。次に、ステップ216bでwid(n)を領域
の内側について求めて、上記値に加える。各nについて
求めたwid(n)を基に、ステップ216cで左辺の
線分の線幅を決定する。線幅は、例えば(n1−n0+
1)個のwid(n)の値のうち最も頻度の高い値を線
幅とみなす、などの方法で求めることができる。このよ
うにして求めた線幅が0でない場合には、以下、ステッ
プ216dで線分位置の特定を行い、ステップ216e
で線分テーブルTBL1にデータを追加する。
First, after initializing each variable,
In step 216a, wid (n) is obtained for the outside of the area. Next, in step 216b, wid (n) is obtained for the inside of the area and added to the above value. At step 216c, the line width of the left-side line segment is determined based on wid (n) obtained for each n. The line width is, for example, (n1-n0 +
1) The most frequent value of the values of wid (n) can be determined as a line width. If the line width obtained in this way is not 0, the line segment position is specified in step 216d, and step 216e is performed.
To add data to the line segment table TBL1.

【0045】上記左辺認識ステップを実行するために必
要なテーブルT3の構成の1例を図17に示す。テーブル
T3は、各nに対して境界近傍で横方向に連続する黒画
素の左端x0、右端x1、長さwidの各項目から構成
される。各nに対しては、式 wid=x1−x0+1 が成立する。本テーブルは作業領域985に用意され
る。
FIG. 17 shows an example of the structure of the table T3 required to execute the above-described left side recognition step. The table T3 is composed of items of a left end x0, a right end x1, and a length wi of a black pixel continuous in the horizontal direction near the boundary for each n. For each n, the equation wid = x1-x0 + 1 holds. This table is prepared in the work area 985.

【0046】図18(A),(B)は上述した左辺認識処
理を具体的に説明するための図である。図において、図
(A)は原画像における左辺の状態を示す。原画像上で
は、画像の入力誤差等により黒画素の1部が欠陥した
り、余分な黒画素が生成されたりして、直線の縁が凹凸
になるのが普通である。図(B)は上記入力画像を左辺
認識ステップ216−1で処理した結果を示す。最も頻
度の高い線分データにより線幅と線位置を認識し、凹凸
を修正した線分データにより直線画像を形成し表示して
いる。この認識により、直線の位置情報等を得ると共
に、表面に存在した凹凸を滑らかにした直線を生成する
ことができる。
FIGS. 18A and 18B are diagrams for specifically explaining the above-described left side recognition processing. In the figure, (A) shows the state of the left side of the original image. In the original image, a part of the black pixel is usually defective due to an input error of the image or an extra black pixel is generated, so that the edge of the straight line is generally uneven. FIG. 7B shows the result of processing the input image in the left side recognition step 216-1. The line width and the line position are recognized based on the line segment data with the highest frequency, and a straight line image is formed and displayed based on the line segment data with the unevenness corrected. With this recognition, it is possible to obtain position information of the straight line and the like, and to generate a straight line in which unevenness existing on the surface is smoothed.

【0047】図19は、上述した左辺を含めて、一般に座
標幅に平行な線分の認識結果を格納するためのテーブル
TBL1の構成を示す。本テーブルTBL1は、線分を
図18(B)のように矩形領域と捉えたときの、左上座標
(LX0,LY0)、および右下座標(LX1,LY
1)の各項目から構成される。本テーブルは帳票書式格
納領域982に用意され、後述する構成要素認識ステッ
プ218で認識された線分データも上記テーブルに格納
される。
FIG. 19 shows the configuration of a table TBL1 for storing the recognition result of a line segment generally parallel to the coordinate width, including the left side described above. The table TBL1 includes upper left coordinates (LX0, LY0) and lower right coordinates (LX1, LY) when a line segment is regarded as a rectangular area as shown in FIG.
It consists of each item of 1). This table is prepared in the form format storage area 982, and the line segment data recognized in the component recognition step 218 described later is also stored in the table.

【0048】次にステップ217で行なう非欄要素認識
処理について説明する。
Next, the non-column element recognition process performed in step 217 will be described.

【0049】図20(A)〜(F)は本実施例で対象とす
る非欄要素の代表的なパターンを示す。図(A)と
(B)は対角に斜線が施された欄に対応するパターンP
T1,PT2である。これらのパターンは、図13で説明
した領域分割ステップ214のステップ214cの直前
において、図中の破線で囲まれた部分がほぼ同サイズの
重畳した領域となる。図(C)−(F)は円弧に丸めら
れている表の角部分に対応するPT3〜PT6パターン
である。これらのパターンは領域分割ステップ214の
ステップ214cの直前において、図中破線で囲まれた
部分が、比較的大きな領域の内部に重畳した小さな領域
となる。何れにしても、これらのパターンは、前記領域
種別認識ステップ216で左,右,上,下の4辺として
検出できないため、非線領域と判定される。
FIGS. 20A to 20F show typical patterns of non-column elements to be handled in this embodiment. FIGS. 7A and 7B show patterns P corresponding to diagonally hatched columns.
T1 and PT2. In these patterns, immediately before step 214c of the area dividing step 214 described with reference to FIG. 13, a portion surrounded by a broken line in the drawing is a superimposed area of substantially the same size. Figures (C)-(F) are PT3-PT6 patterns corresponding to the corners of the table rounded into an arc. In these patterns, immediately before the step 214c of the area dividing step 214, a portion surrounded by a broken line in the figure is a small area superimposed inside a relatively large area. In any case, since these patterns cannot be detected as the left, right, upper, and lower four sides in the area type recognition step 216, they are determined to be non-linear areas.

【0050】次に、図21を用いて、入力画像から上述し
た円弧パターンを検出するための処理の一例を説明す
る。図において破線で囲まれた部分がステップ214で
検出された1つの領域であり、この領域に図20(A)〜
(F)のいずれかのパターンが位置する。まずこの領域
を図に示す6本の一点鎖線で16個の部分領域に分割す
る。3本の縦線V1〜V3は、領域境界x0,x1と所
定の小さな値をもつ定数αに基づいて、それぞれのx座
標がx0+α、(x0+x1)/2、x1−αとなるよ
うに設定される。3本の横線のH1〜H3は、領域境界
y0,y1と、上記所定の定数αに基づいて、それぞれ
のy座標がy0+α、(y0+y1)/2,y1−αと
なるように設定される。次に、これらの部分領域のう
ち、特に6本の一点鎖線のみによって囲まれる中央の4
つの領域の内部の黒画素の濃度を調べる。濃度は各部分
領域の全画素に対する黒画素の割合で定義する。この濃
度が所定の閾値より大きい場合には黒領域、小さい場合
には白領域と呼ぶことにすると、黒領域が左上と右下に
存在するものは図20のパターンPT1、以下同様に右
上、左下はPT2、左上、右上、左下はPT3、左上、
右上、右下はPT4、左上、左下、右下はPT5、右
上、左下、右下はPT6のパターンと判定することがで
きる。
Next, an example of a process for detecting the above-described arc pattern from an input image will be described with reference to FIG. In the figure, a portion surrounded by a broken line is one region detected in step 214, and this region is shown in FIGS.
One of the patterns (F) is located. First, this area is divided into 16 partial areas by six dashed lines shown in the figure. The three vertical lines V1 to V3 are set based on the area boundaries x0 and x1 and a constant α having a predetermined small value so that the respective x coordinates are x0 + α, (x0 + x1) / 2, and x1-α. You. The three horizontal lines H1 to H3 are set based on the area boundaries y0 and y1 and the predetermined constant α so that the respective y coordinates are y0 + α, (y0 + y1) / 2, and y1-α. Next, among these partial regions, in particular, the central 4 surrounded by only six dashed lines.
Check the density of black pixels inside the two areas. The density is defined by the ratio of black pixels to all pixels in each partial area. If this density is larger than a predetermined threshold, it is called a black area, and if it is smaller, it is called a white area. When the black area exists at the upper left and lower right, the pattern PT1 in FIG. Is PT2, upper left, upper right, lower left is PT3, upper left,
The upper right and lower right can be determined to be a pattern of PT4, the upper left and lower left, and the lower right can be determined to be a pattern of PT5, and the upper right, lower left and lower right can be determined to be a pattern of PT6.

【0051】上記の処理で、パターンPT1またはPT
2を含むと判定されたものについては、斜線情報を図22
に示すテーブルTBL2に格納する。本テーブルTBL
2は、斜線の最左端の画素座標(SX0,SY0)、最
右端の画素座標(SX1,SY1)、線幅SWの各項目
から構成される。最左端および最右端の座標は対象領域
の角点の座標または角点の近傍の黒画素を調べることに
よって容易に求めることができる。
In the above processing, the pattern PT1 or PT
2 are included in the information shown in FIG.
In the table TBL2 shown in FIG. This table TBL
Numeral 2 includes the leftmost pixel coordinates (SX0, SY0), the rightmost pixel coordinates (SX1, SY1), and the line width SW of the oblique lines. The leftmost and rightmost coordinates can be easily obtained by examining the coordinates of the corner point of the target area or the black pixels near the corner point.

【0052】線幅SWは、例えば、領域内の黒画素数B
Pと線分の長さSLA、即ち SLA=√(SX0−SX1)2+(SY0−SY1)
2 から、 SW=BP/SLA または、これを四捨五入等により整数化した値として計
算することができる。本テーブルは帳票書式格納領域9
82に用意される。
The line width SW is, for example, the number of black pixels B in the area.
P and the length SLA of the line segment, ie, SLA = √ (SX0−SX1) 2+ (SY0−SY1)
2 can be calculated as SW = BP / SLA or a value obtained by converting this to an integer by rounding or the like. This table is a form format storage area 9
82.

【0053】上記の処理でパターンPT3〜PT6と判
定されたものは、円弧情報を図23に示すテーブルTBL
3に格納する。本テーブルTBL3は、円弧の中心画素
座標(AX,AY)、半径AR、線幅AW、開始角度A
A0、終了角度AA1の各項目から構成される。開始角
度および終了角度は、前記の方法で求めたパターンの種
別PT3〜PT6に従って、それぞれ(90,18
0)、(0,90)、(180,270)、(270,
0)と定義する。半径、線幅は、例えば領域内の黒画素
数BP、領域の長辺の長さAL及び短辺の長さASを用
いて、次の方程式を解くことによって算出することがで
きる。
For the patterns determined to be patterns PT3 to PT6 in the above processing, the arc information is stored in the table TBL shown in FIG.
3 is stored. This table TBL3 includes the center pixel coordinates (AX, AY), radius AR, line width AW, and start angle A of the arc.
A0 and the end angle AA1. The start angle and the end angle are respectively (90, 18) according to the pattern types PT3 to PT6 obtained by the above method.
0), (0, 90), (180, 270), (270,
0). The radius and the line width can be calculated by solving the following equations using, for example, the number of black pixels BP in the region, the length AL of the long side of the region, and the length AS of the short side.

【0054】AS−AW/2=AR AW・(π・AR/2+AL−AS)=BP 中心画素座標はPT3〜PT6の各パターンに対して、
領域の長辺上の端から短辺の長さと同じ点に定義する。
本テーブルも帳票書式格納領域982に用意される。
AS−AW / 2 = AR AW · (π · AR / 2 + AL−AS) = BP The center pixel coordinates are as follows for each of the patterns PT3 to PT6.
The area is defined as the same point as the length of the short side from the end on the long side.
This table is also prepared in the form format storage area 982.

【0055】図24は構成要素認識ステップ218の一実
施例を示す。ここでは、先ず最初に帳票の構成要素の種
別が直線、破線、文字の何れであるか判定し、この判定
結果に基づいて直線認識ステップ2181、破線認識ス
テップ2182、または文字認識ステップ2183の何
れかの処理を実行する。
FIG. 24 shows an embodiment of the component recognition step 218. Here, first, it is determined whether the type of the component of the form is a straight line, a broken line, or a character, and any one of the straight line recognition step 2181, the broken line recognition step 2182, and the character recognition step 2183 is determined based on the determination result. The processing of is performed.

【0056】構成要素の種別判定方法の一例を図25を用
いて説明する。この例では、ブロック分割ステップ21
1で求めた各ブロックに外接する四角形の大きさと形状
によって、構成要素の種別を判別する。
An example of a method for determining the type of a component will be described with reference to FIG. In this example, the block dividing step 21
The type of the component is determined based on the size and shape of the rectangle circumscribing each block obtained in 1.

【0057】図において横軸および縦軸はブロックに外
接する四角形の、それぞれ横幅、即ちX1−X0+1お
よび高さ、即ちY1−Y0+1を表す。ここでは予め設
定した定数βおよびγを境界値として、図のように範囲
81〜83を定義し、対象とするブロックが範囲81に
属す場合は直線、範囲82に属するときは破線、範囲8
3に属するときは文字と判定するものとする。
In the figure, the horizontal axis and the vertical axis respectively represent the horizontal width, ie, X1-X0 + 1, and the height, ie, Y1-Y0 + 1, of the rectangle circumscribing the block. Here, ranges 81 to 83 are defined as shown in the drawing, using preset constants β and γ as boundary values. If the target block belongs to the range 81, a straight line;
If it belongs to 3, it is determined to be a character.

【0058】図26は直線認識ステップ2181のフロー
チャートを示す。本ステップでは、例えば前記図16で説
明した左辺認識ステップと全く同様の方法で、直線に関
する情報を求める。図において、線幅の決定ステップ2
181aは、図16のステップ216a−216cに対応
する。線位置の決定ステップ2181bは、同様にステ
ップ216dに対応する。さらにステップ2181cは
ステップ216eに対応し、これと全く同様に、帳票書
式格納領域に用意された線分テーブルTBL1に認識結
果を登録する。
FIG. 26 shows a flowchart of the straight line recognition step 2181. In this step, for example, information on a straight line is obtained in exactly the same manner as in the left side recognition step described with reference to FIG. In the figure, line width determination step 2
Step 181a corresponds to steps 216a to 216c in FIG. The line position determination step 2181b also corresponds to step 216d. Further, step 2181c corresponds to step 216e, and in exactly the same way, the recognition result is registered in the line segment table TBL1 prepared in the form format storage area.

【0059】次に、破線認識ステップ2182について
説明する。本ステップでは検出された破線要素が、すで
に検出されている破線を延長するものであるか否かを調
べる。まず、2つの破線要素が1本の破線を構成するた
めの条件を図27を用いて説明する。図において2つの破
線要素85と86の左上の画素座標をそれぞれ(x0,
y0),(x0′,y0′)とし、右下の画素座標をそ
れぞれ(x1,y1),(x1′,y1′)とすると
き、予め定めた定数d1およびd2に関して以下の不等
式を満足する破線要素の組を、同一の破線を構成する要
素と考えるものとする。
Next, the broken line recognition step 2182 will be described. In this step, it is checked whether or not the detected dashed line element extends the already detected dashed line. First, conditions for two dashed elements to form one dashed line will be described with reference to FIG. In the figure, the upper left pixel coordinates of the two dashed elements 85 and 86 are respectively (x0,
y0), (x0 ', y0'), and when the lower right pixel coordinates are (x1, y1), (x1 ', y1'), the following inequalities are satisfied with respect to the predetermined constants d1 and d2. Assume that a set of dashed line elements is an element constituting the same dashed line.

【0060】 Min(|y0−y0′|,|y1−y1′|)<d1 Min(|x1−x0′|,|x1−x1′|)<d2 ここに関数Minはパラメータで示される2つの式の値
のうち、小さい方の値をとる関数である。
Min (| y0-y0 '|, | y1-y1' |) <d1 Min (| x1-x0 '|, | x1-x1' |) <d2 This function takes the smaller value of the values of the expression.

【0061】図28は破線認識ステップ2182のフロー
チャートである。まずステップ2182zで、当該破線
要素が、後述するテーブルTBL4に格納されている既
に検出済みの破線を延長するものであるか否かを調べ、
延長するものである場合には、これらの要素をすべて含
むように破線範囲を拡張する。このようにして順次に結
合された破線要素の範囲について、図26で説明した直線
認識ステップと全く同様の方法で、以下の如く破線情報
を求めることができる。図において、線幅の決定ステッ
プ2182aは、図26のステップ2181aに対応す
る。ただし、値WIDの最大頻度を求める処理(前記ス
テップ216cの説明参照)では、破線の場合に破線要
素間に間隔が存在することを考慮して、値0の頻度を除
外する。線位置の決定ステップ2182bは、図26のス
テップ2181bに対応する。また、ステップ2182
cはステップ2181cに対応し、直線の場合と同様に
して帳票書式格納領域に用意された破線テーブルTBL
4に認識結果を格納する。
FIG. 28 is a flowchart of the broken line recognition step 2182. First, in step 2182z, it is determined whether or not the dashed line element extends a previously detected dashed line stored in a table TBL4 described later.
If so, the range of dashed lines is extended to include all of these elements. With respect to the range of the dashed line elements that are sequentially combined in this manner, dashed line information can be obtained as described below in exactly the same way as in the straight line recognition step described with reference to FIG. In the figure, a line width determination step 2182a corresponds to step 2181a in FIG. However, in the process of obtaining the maximum frequency of the value WID (see the description of the step 216c), the frequency of the value 0 is excluded in consideration of the existence of the interval between the broken line elements in the case of the broken line. The line position determination step 2182b corresponds to step 2181b in FIG. Step 2182
"c" corresponds to step 2181c, and is a broken line table TBL prepared in the form format storage area in the same manner as in the case of a straight line.
4 stores the recognition result.

【0062】図29は、破線テーブルTBL4の構成の1
例を示す。本テーブルTBL4は、1つの破線を構成す
る複数の破線要素の集合を矩形領域と捉えた場合の左上
座標(DX0,DY0)、および右下座標(DX1,D
Y1)を示すデータから構成される。本テーブルも帳票
書式格納領域982に用意される。
FIG. 29 is a diagram showing one example of the configuration of the broken line table TBL4.
Here is an example. The table TBL4 includes upper left coordinates (DX0, DY0) and lower right coordinates (DX1, D2) when a set of a plurality of broken line elements forming one broken line is regarded as a rectangular area.
Y1). This table is also prepared in the form format storage area 982.

【0063】図30は文字認識ステップ2183のフロー
チャートである。まず最初に、当該ブロックの近傍にま
だブロック種別が未判定で文字要素と判定される可能性
のあるブロックが存在するか否かを調べる。このような
ブロックが存在する場合には、ステップ2183dにお
いて当該ブロックを文字列要素として作業領域985に
登録する。近傍に文字要素と判定される可能性のあるブ
ロックが存在しない場合には、ステップ2183aで、
当該ブロックを含む文字列を生成する。本処理において
は、上記ステップ2183dで登録した文字列要素のう
ち、後述する文字構成条件を満たすブロックを集めて、
これらの全ブロックを含む1つの矩形範囲を文字列の範
囲として求める。ステップ2183bでは、上記文字列
の範囲から個別の文字領域を抽出する。個別の文字領域
は、例えば上記長方形の範囲の中で、短い辺に沿って黒
画素の投影データを作成し、長い辺に沿って現われる上
記投影データのギャップが予め定めた閾値を越える部分
で上記長方形範囲をサブ領域に分割することによって抽
出することができる。ステップ2183cでは、このよ
うな個別の文字領域に含まれる文字パターンを、公知の
文字認識方式により文字コードに変換する。文字認識方
式としては、例えば、尾上守夫氏編による「画像処理ハ
ンドブック」と題する文献(昭和62年、昭晃堂発行)
の468ページ以降に記されている方法を用いることが
できる。
FIG. 30 is a flowchart of the character recognition step 2183. First, it is checked whether or not there is a block near the block that may be determined as a character element with the block type not yet determined. If such a block exists, the block is registered in the work area 985 as a character string element in step 2183d. If there is no block that may be determined as a character element in the vicinity, in step 2183a,
Generate a character string containing the block. In this processing, among the character string elements registered in step 2183d, blocks satisfying a character configuration condition described later are collected, and
One rectangular range including all these blocks is obtained as a character string range. In step 2183b, individual character regions are extracted from the character string range. Individual character areas, for example, in the rectangular range, create projection data of black pixels along short sides, and in areas where gaps in the projection data appearing along long sides exceed predetermined thresholds, It can be extracted by dividing the rectangular range into sub-regions. In step 2183c, a character pattern included in such an individual character area is converted into a character code by a known character recognition method. As a character recognition method, for example, a document titled “Image Processing Handbook” edited by Morio Onoe (Showa 62, published by Shokodo)
The method described on page 468 and thereafter can be used.

【0064】隣接するブロックが同一文字列を構成する
要素か否かの判定は、例えば次のようにして行なう。図
31において、2つのブロック(文字要素)87,88の
左上の画素座標をそれぞれ(x0,y0),(x0′,
y0′)とし、右下の画素座標をそれぞれ(x1,y
1),(x1′,y1′)とするとき、予め定めた定数
D3およびD4に関して以下の4つの不等式、 y0−y1′<D3 y0′−y1<D3 x0−x1′<D4 x0′−x1<D4 を全て満足する場合、これらの文字要素は同一の文字列
を構成する要素とみなす。
The determination as to whether adjacent blocks are elements constituting the same character string is performed, for example, as follows. Figure
In FIG. 31, the upper left pixel coordinates of two blocks (character elements) 87 and 88 are (x0, y0), (x0 ′,
y0 ′), and the lower right pixel coordinates are (x1, y
1), (x1 ', y1'), the following four inequalities with respect to predetermined constants D3 and D4: y0-y1 '<D3 y0'-y1 <D3 x0-x1'<D4x0'-x1 When all of <D4 are satisfied, these character elements are regarded as elements constituting the same character string.

【0065】図32(A)〜(C)は以上説明した文字認
識ステップ2183の実際の処理の過程を示した図であ
る。図において(A)は上記条件に従って統合されると
判定されたブロックの集合を図示したものである。
(B)は、ステップ2183aにより実際に文字列が生
成された状態を図示したものである。(C)はこのよう
な文字列からステップ2183bにより個別の文字を抽
出した結果を図示したものである。
FIGS. 32A to 32C are views showing the process of the actual processing of the character recognition step 2183 described above. In the figure, (A) illustrates a set of blocks determined to be integrated according to the above conditions.
(B) illustrates a state where a character string is actually generated in step 2183a. (C) illustrates the result of extracting individual characters from such a character string in step 2183b.

【0066】本文字認識ステップ2183における認識
結果は、図33に示すテーブルTBL5の形式で帳票書式
格納領域982に記憶される。上記テーブルTBL5
は、1個の文字を囲む矩形左上点の画素座標(CX0,
CY0)、右下点の画素座標(CX1,CY1)、文字
コードCCの各項目から構成される。文字コードとして
は例えばJIS規格で定められた文字コードの体系を利
用する。
The recognition result in the character recognition step 2183 is stored in the form format storage area 982 in the form of a table TBL5 shown in FIG. The above table TBL5
Is the pixel coordinates (CX0,
CY0), the lower right pixel coordinates (CX1, CY1), and the character code CC. As the character code, for example, a character code system defined by the JIS standard is used.

【0067】以上、図8に示した帳票書式認識ステップ
2の基本的な動作について説明したが、上記ステップに
更に他の処理機能を付加することによって帳票認識精度
を更に向上することができる。
Although the basic operation of the form format recognition step 2 shown in FIG. 8 has been described above, the form recognition accuracy can be further improved by adding another processing function to the above step.

【0068】図34は、このように拡張した帳票書式認識
ステップ2の他の実施例を示す。この実施例では、前記
物理構造認識ステップ21に先立って入力画像の前処理
20を実行し、物理構造認識ステップ21の後に帳票デ
ータの後処理29を実行する。
FIG. 34 shows another embodiment of the form format recognizing step 2 thus extended. In this embodiment, preprocessing 20 of the input image is executed prior to the physical structure recognition step 21, and post processing 29 of the form data is executed after the physical structure recognition step 21.

【0069】図35は前処理ステップ20で呼び出される
サブルーチンプログラムのフローチャートの一例を示
す。ここでは、前処理として入力画像データの傾きの補
正を行っている。ステップ201a−201dでは、そ
れぞれ後述する画像の左辺,右辺,上辺,下辺を検出す
る。ステップ202では上記ステップで検出した4辺の
傾き情報から画像全体の傾きを計算する。これは、例え
ば左辺の傾き+90°、右辺の傾き+90°、上辺の傾
き、下辺の傾きの4つの値の平均値により計算すること
ができる。ステップ203では、上記ステップ202で
求めた角度を画像の回転処理を行う。ステップ204
で、必要に応じて、帳票画像として有効な領域の切り出
しを行い、ステップ205で、必要に応じて、画像のノ
イズ情報を除去する。
FIG. 35 shows an example of a flowchart of a subroutine program called in the preprocessing step 20. Here, the inclination of the input image data is corrected as preprocessing. In steps 201a to 201d, a left side, a right side, an upper side, and a lower side of an image described later are detected, respectively. In step 202, the inclination of the entire image is calculated from the inclination information of the four sides detected in the above step. This can be calculated by, for example, an average value of four values of the left side inclination + 90 °, the right side inclination + 90 °, the upper side inclination, and the lower side inclination. In step 203, the image obtained by the angle obtained in step 202 is rotated. Step 204
Then, an area effective as a form image is cut out as necessary, and in step 205, noise information of the image is removed as necessary.

【0070】上記前処理ステップ20で検出する画像の
「辺」について、図36(A),(B)を用いて説明す
る。
The "side" of the image detected in the preprocessing step 20 will be described with reference to FIGS. 36 (A) and (B).

【0071】図(A)、入力画像に含まれる紙面の境界
線を画像の傾き計算の基準線にできる場合を示す。これ
は、画像入力装置93において、紙面の地色(例えば白
色)に対して、これとは異なる背景色を使用して画像入
力できる場合に相当する。例えば、原稿を静止させ、紙
面からの反射光をセンサに入力する方式の画像入力装置
では、原稿カバーの色を黒色とすることによって実現で
きる。このような場合には、上,下,左,右の4辺は、
記号70a〜70dで示した紙面の各境界線に着目して
検出することができる。
FIG. 9A shows a case where the boundary of the paper included in the input image can be used as a reference line for calculating the inclination of the image. This corresponds to a case where the image input device 93 can input an image using a background color different from the background color (for example, white) of the paper surface. For example, in an image input apparatus of a system in which a document is stopped and light reflected from a paper surface is input to a sensor, this can be realized by setting the color of a document cover to black. In such a case, the top, bottom, left, and right sides are:
The detection can be performed by focusing on each boundary line of the paper surface indicated by the symbols 70a to 70d.

【0072】図(B)は入力画像71中で紙面の境界が
検出できないものの、帳票に記載された表の外枠を傾き
の計算の基準線として検出できる場合を示す。この場合
には、上記4辺として、記号71a〜71dで示した表
の境界を検出する。具体的には、白画素連続状態から黒
画素に変化する最も外側の境界を求め、これらの境界線
4本の直線を対応づけることによって求めることができ
る。
FIG. 9B shows a case where the boundary of the paper surface cannot be detected in the input image 71, but the outer frame of the table described in the form can be detected as a reference line for calculating the inclination. In this case, the boundaries of the table indicated by the symbols 71a to 71d are detected as the four sides. Specifically, the outermost boundary at which the white pixels change from the continuous state to the black pixels is determined, and the boundary can be determined by associating the four straight lines with these boundary lines.

【0073】図37は後処理ステップ29で呼び出される
サブルーチンプログラムのフローチャートの一例を示
す。ここでは、後処理の1例として、物理構造認識処理
により帳票書式格納領域982に記憶された画像データ
の修正を行う。ステップ291では、テーブルTBL1
〜TBL4に格納された線情報を修正し、ステップ29
2では、テーブルTBL5に格納された文字情報を修正
する。なお、上記実施例では、線の修正ステップ291
と文字の修正ステップ292をそれぞれ1回ずつ順次に
実行するようにしているが、通常のワードプロセッサや
CADシステムで行なわれているように、オペレータの
指示により、任意の時点で線または文字の修正を繰り返
すようにしてもよい。
FIG. 37 shows an example of a flowchart of a subroutine program called in the post-processing step 29. Here, as an example of the post-processing, the image data stored in the form format storage area 982 is corrected by the physical structure recognition processing. In step 291, the table TBL1
To the line information stored in TBL4.
In 2, the character information stored in the table TBL5 is corrected. In the above embodiment, the line correction step 291 is performed.
And the character correction step 292 are sequentially performed once each. However, as in a normal word processor or CAD system, a line or character correction can be performed at any time by an operator's instruction. You may make it repeat.

【0074】線の修正ステップ291では、ワードプロ
セッサやCADシステムの図形処理機能において行なわ
れているように、オペレータの指示による線の移動、削
除、伸縮等の処理を実行する。ここでは、線修正ステッ
プ291の特殊な機能の1例として、他の線との関係か
ら罫線データを自動的に修正する処理について、図38を
用いて説明する。ステップ2911では、帳票書式格納
領域に格納された全ての線の交点を求める。このとき、
各線の端点と他の線との距離を求め、この距離が予め定
めた閾値より小さいものも交点と扱う。ステップ291
2では、各線の端点と他の線の端点との距離を求め、こ
の距離が予め定めた閾値より小さい位置関係にある複数
の線の組を求める。ステップ2913では、上記線の組
の中で、線幅の差が予め定めた閾値より小さいものにつ
いて、各線の線幅データをいずれか一方の線幅、あるい
はそれらの平均値に置き換える。ステップ2914で
は、上記線の組について、各線の種類を最も多い線種類
に置換する。ステップ2915では上記線の組につい
て、線の位置を正規化する。横線については、各横線の
始点と終点の位置が外枠の縦線に一致するように、例え
ばx座標を各線の平均位置の値に置き換える。また、縦
線についても、各縦線の始点,終点の位置(y座標)が
外枠横線に一致するように各線の平均位置に揃える。ス
テップ2916では、複数の平行線の中から隣合う2本
の線の間隔が略等しいもの、すなわち予め定めた閾値の
誤差以内にあるものを検出し、ステップ2917で、上
記線間隔をそれらの平均値に等しくするように各線を必
要に応じて移動する。
In the line correction step 291, processing such as movement, deletion, expansion and contraction of a line according to an operator's instruction is performed as performed in the graphic processing function of a word processor or a CAD system. Here, as an example of the special function of the line correction step 291, a process of automatically correcting ruled line data from a relationship with another line will be described with reference to FIG. In step 2911, intersections of all the lines stored in the form format storage area are obtained. At this time,
The distance between the end point of each line and the other line is determined, and those whose distance is smaller than a predetermined threshold value are also treated as intersections. Step 291
In step 2, the distance between the end point of each line and the end point of another line is obtained, and a set of a plurality of lines having a distance smaller than a predetermined threshold value is obtained. In step 2913, the line width data of each line is replaced with one of the line widths or an average value of the line widths of the line pairs whose line width difference is smaller than a predetermined threshold value. In step 2914, the type of each line is replaced with the most common line type for the above-mentioned line set. In step 2915, the position of the line is normalized with respect to the line set. For the horizontal lines, for example, the x coordinate is replaced with the value of the average position of each line so that the positions of the start point and end point of each horizontal line coincide with the vertical lines of the outer frame. Also, the vertical lines are aligned to the average position of each line so that the start point and the end point (y coordinate) of each vertical line coincide with the horizontal line of the outer frame. In step 2916, a line in which the distance between two adjacent lines is substantially equal, that is, a line which is within an error of a predetermined threshold is detected from a plurality of parallel lines. In step 2917, the line interval is averaged. Move each line as needed to make it equal to the value.

【0075】文字の修正ステップ292では、ワードプ
ロセッサやCADシステムの文字処理機能において行な
われているように、オペレータからの指示による文字の
移動,変更,削除,追加,サイズ変換等の処理を実行す
る。ここでは、各文字を他の文字との関係から自動的に
修正する特殊な処理について、図39を用いて説明する。
ステップ2921では、互いに隣接する複数の文字から
なる組を文字列として求める。隣接文字は、例えば図31
で説明した方法を利用して見つけることができる。ステ
ップ2922では、このようにして求めた文字列につい
て、予め帳票書式認識部972に用意してある標準の単
語群との照合を行う。各単語を文字列の先頭に順次当て
はめ、例えば標準単語の文字のうち合致する文字数の割
合(一致率)が最も大きい単語を照合結果とする。さら
には発明者らが先に出願済みの特願平1−196586
号に記載の方法を利用することもできる。照合の結果、
上記一致率が予め定めた閾値より大きい場合には、ステ
ップ2923で標準単語と不一致の文字の文字コードを
修正し、文字列中の単語を標準単語に合致させる。ま
た、ステップ2924で、同一文字列中の文字位置と文
字サイズが互いに揃うように、テーブルTBL5に登録
されている矩形情報CX0,CY0,CX1,CY1の
値を修正する。修正方法としては、単に各文字列中の平
均値を採用する方法や、認識した文字コードを利用し
て、文字の形状情報からまず文字枠の大きさを求め、こ
の文字枠の位置と大きさに基づいて修正する方法などを
利用することができる。
In the character correction step 292, processing such as movement, change, deletion, addition, size conversion, etc. of a character according to an instruction from an operator is executed as performed in a character processing function of a word processor or a CAD system. Here, a special process for automatically correcting each character from the relationship with other characters will be described with reference to FIG.
In step 2921, a set of a plurality of adjacent characters is obtained as a character string. The adjacent character is, for example, FIG.
Can be found using the method described in. In step 2922, the character string obtained in this way is compared with a standard word group prepared in the form format recognition unit 972 in advance. Each word is sequentially applied to the head of the character string, and for example, a word having the largest ratio of the number of matching characters (matching rate) among the characters of the standard word is set as the matching result. Further, the inventors have filed a Japanese Patent Application No. 1-196586, which was filed earlier.
The method described in the item can also be used. As a result of matching,
If the match rate is larger than the predetermined threshold, the character code of the character that does not match the standard word is corrected in step 2923, and the word in the character string matches the standard word. In step 2924, the values of the rectangle information CX0, CY0, CX1, CY1 registered in the table TBL5 are corrected so that the character positions and the character sizes in the same character string are aligned with each other. As a correction method, simply use the average value in each character string, or use the recognized character code, first find the size of the character frame from the shape information of the character, and then determine the position and size of this character frame. For example, a method of correcting based on the information can be used.

【0076】このようにして求めた各文字列に含まれる
単語情報は、図40に示すテーブルTBL6として帳票書
式格納領域982に記憶する。上記テーブルTBL6
は、単語を構成する文字の数WNと、各文字に関する情
報として、テーブルTBL5へのポインタ情報WC1〜
WCpの各項目から構成される。ここで、pは単語当た
りの文字数WNの最大値である。上記テーブルTBL6
は以下に説明する帳票書式認識プログラム2の第2の実
施例において利用する。
The word information included in each character string thus obtained is stored in the form format storage area 982 as a table TBL6 shown in FIG. The above table TBL6
Are pointer information WC1 to WC1 to table TBL5 as information on the number WN of characters constituting a word and information on each character.
It consists of each item of WCP. Here, p is the maximum value of the number of characters WN per word. The above table TBL6
Is used in the second embodiment of the form format recognition program 2 described below.

【0077】図41は帳票書式認識ステップ2で実行され
るサブルーチンプログラムの第2の実施例を示すフロー
チャートである。第2の実施例では、以前に説明した帳
票の物理構造を認識するステップ21と、以下に説明す
る帳票の論理構造を認識するステップ22とから構成さ
れる。尚「帳票の論理構造」とは、本発明では、後述す
る帳票の欄の行桁構造、フィールドに関する情報等、帳
票の意味に及ぶ構造を意味する。
FIG. 41 is a flowchart showing a second embodiment of the subroutine program executed in the form format recognition step 2. The second embodiment includes a step 21 for recognizing the physical structure of a form described above and a step 22 for recognizing the logical structure of the form described below. In the present invention, the “logical structure of a form” refers to a structure that extends to the meaning of the form, such as a line / column structure of a field of a form described later and information on fields.

【0078】図42は論理構造認識ステップ22で呼び出
されるサブルーチンプログラムの第1の実施例を示す。
上記プログラム22は、帳票書式認識部972中の、プ
ログラム2とは異なる領域に用意される。この第1の実
施例では、サブルーチン22は、帳票に記入された文字
や罫線等の位置および大きさを行と桁の形に配列するよ
うに正規化するステップ221のみから構成されてい
る。
FIG. 42 shows a first embodiment of the subroutine program called in the logical structure recognition step 22.
The program 22 is prepared in an area different from the program 2 in the form format recognition unit 972. In the first embodiment, the subroutine 22 comprises only a step 221 for normalizing the positions and sizes of characters, ruled lines, and the like entered in the form so as to be arranged in rows and columns.

【0079】図43は上記行桁正規化ステップ221の詳
細なフローチャートを示す。ステップ2211では、テ
ーブルTBL5に格納されている各文字の基準位置、お
よびテーブルTBL1,TBL2,TBL4に格納され
ている各線分の全ての交点および端点の座標を求め、図
44に示すテーブルTBL7に格納する。文字パターンの
基準位置については、後に詳細に説明する。テーブルT
BL7は、これらの文字基準位置、および線分の交点、
端点について、それらの座標(MX,MY)と、情報コ
ードMCの各項目から構成される。情報コードMCは、
文字情報では文字パターンを示す文字コード、線情報で
は、、図45で後述するように、その端点または交点のパ
ターン(形状)を示す文字コードを意味する。ステップ
2212では、上記テーブルTBL7に格納されている
データを、X座標MXの値に従ってソーティングする。
ソーティングは昇順(小さいデータから順に配置するこ
と)に行うが、そのアルゴリズムについては公知であ
り、例えば前記のN.Wirth氏著の文献の62ペー
ジ以降に詳細に解説されているので説明を省略する。ス
テップ2213では、このソーティング後のテーブルT
BL7のデータを順に取り出し、先ず、そのデータにつ
いて正規化すべき量dを求める。この正規化量dは、正
規化すべき行および桁の幅をRC画素としたとき、RC
の整数倍で当該MXの値より大きく、かつ最も近いもの
を選択し、これと当該MX値の差として計算する。ステ
ップ2214では、全てのデータのMXの値に上記dを
加える。ステップ2215では、ステップ2212と同
様に、TBL7をMYの値に従ってソーティングする。
以下、ステップ2216と2217で、それぞれステッ
プ2213,2214と同様に、MYの値を順次正規化
する。すべての座標データの正規化が終了した後、ステ
ップ2218で線分の交点,または端点間の線分パター
ンを示す文字コードをその位置情報と共に発生する。最
後に、ステップ2219で、冗長に拡大した欄等を幾何
学的構造を保ったまま収縮する処理を行う。なお、以上
の実施例では、座標MX,MYの正規化量dを全て正の
値としたが、単にRCの倍数に最も近い値を採用するこ
とによって、負の値を許すこともできる。
FIG. 43 is a detailed flowchart of the line / column normalization step 221. In step 2211, the reference position of each character stored in the table TBL5 and the coordinates of all the intersections and endpoints of the line segments stored in the tables TBL1, TBL2, and TBL4 are determined.
This is stored in the table TBL7 shown in FIG. The reference position of the character pattern will be described later in detail. Table T
BL7 indicates the character reference position, the intersection of the line segment,
The end point is composed of the coordinates (MX, MY) and each item of the information code MC. The information code MC is
The character information indicates a character code indicating a character pattern, and the line information indicates a character code indicating a pattern (shape) of an end point or an intersection as described later with reference to FIG. In step 2212, the data stored in the table TBL7 is sorted according to the value of the X coordinate MX.
Sorting is performed in ascending order (arrangement in ascending order of data), and its algorithm is well-known. Since it is described in detail on page 62 and subsequent pages of the document by Mr. Wirth, the description is omitted. In step 2213, the table T after sorting
The data of BL7 is sequentially taken out, and first, an amount d to be normalized for the data is obtained. When the width of a row and a column to be normalized is defined as an RC pixel,
An integer multiple of and closest to the value of MX is selected and calculated as the difference between this and the MX value. In step 2214, the above d is added to the MX value of all data. In step 2215, as in step 2212, TBL7 is sorted according to the value of MY.
Thereafter, in steps 2216 and 2217, the values of MY are sequentially normalized as in steps 2213 and 2214, respectively. After normalization of all coordinate data is completed, in step 2218, a character code indicating a line segment intersection or a line segment pattern between end points is generated together with the position information. Finally, in step 2219, a process of contracting the redundantly expanded column or the like while maintaining the geometric structure is performed. In the above embodiment, the normalized values d of the coordinates MX and MY are all positive values, but a negative value can be allowed by simply adopting a value closest to a multiple of RC.

【0080】図45(A),(B)は文字、線分の交点、
端点パターンの位置基準点RP(黒丸)を示す図であ
る。図(A)は全角の文字パターン、図(B)は半角の
文字パターンの基準点の例を示す。
FIGS. 45A and 45B show characters, intersections of line segments,
It is a figure which shows the position reference point RP (black circle) of an end point pattern. FIG. 7A shows an example of a reference point of a full-width character pattern, and FIG. 7B shows an example of a reference point of a half-width character pattern.

【0081】図46は前記論理構造認識ステップ22で呼
び出されるサブルーチンプログラムの第2の実施例のフ
ローチャートである。この第2の実施例は、帳票のフィ
ールド位置を認識するステップ222を有しており、図
(A)のようにステップ222のみから構成される場合
と、図(B)のように前述した行桁正規化ステップ22
1を実行した後、このフィールド位置認識ステップ22
2を実行するように構成する場合とが存在する。
FIG. 46 is a flowchart of a second embodiment of the subroutine program called in the logical structure recognition step 22. The second embodiment has a step 222 for recognizing a field position of a form. The second embodiment includes only the step 222 as shown in FIG. Digit normalization step 22
1 is executed, the field position recognition step 22 is executed.
2 is executed.

【0082】図47は上記フィールド位置認識ステップ2
22の詳細なフローチャートを示す。ステップ2221
では、フィールド位置の認識を容易にするために、表形
状の正規化処理を行う。表形状の正規化処理の実例を図
48(A),(B)に示す。図において図(A)は罫線が
省略されている表41に罫線42A,42Bを付加する
処理の代表例である。本処理は例えば横線分の各端点に
接続する縦線分の有無を調べ、ない場合には、当該横線
分に交わる他の縦線分を水平方向に複写した線分を新た
に生成することによって容易に実現できる。またさらに
簡単に、平行する横線分の組に対して、最も上方に存在
する線分と最も下方に存在する線分の各始点間および各
終点間に新たに2本の縦線分を生成することによっても
実現できる。また、図(B)は外枠の各コーナーが円弧
状となっている表43を、外枠が直線で構成された表4
4に変換する処理の代表例である。本処理は例えば円弧
データを、それぞれ表の角を示す縦および横の2本の線
分データに置換することによって簡単に実現できる。よ
り具体的には格納したテーブルTBL3(図23)の各要
素について、例えばAA0=0のとき、LX0=AX+
AR、LY0=AY、LX1=LX0、LY1=AY−
ARなる縦線分と、LX0=AX+AR、LY0=AY
−AR、LX1=AX、LY1=LY0Rなる縦線分を
TBL1に生成する。AA0が90、180、270に
ついても全く同様の処理を行う。
FIG. 47 shows the above field position recognition step 2.
22 is a detailed flowchart of FIG. Step 2221
Then, in order to easily recognize the field position, the table shape is normalized. Figure shows an example of table shape normalization processing
48 (A) and (B). In the figure, (A) is a representative example of a process of adding ruled lines 42A and 42B to a table 41 in which ruled lines are omitted. This processing checks, for example, the presence or absence of a vertical line segment connected to each end point of the horizontal line segment, and if not, generates a new horizontal line segment of another vertical line segment intersecting the horizontal line segment. Can be easily realized. More simply, for a set of parallel horizontal line segments, two new vertical line segments are generated between the start point and the end point of the uppermost line segment and the lowermost line segment. It can also be realized by: FIG. 4B shows Table 43 in which each corner of the outer frame has an arc shape, and Table 4 in which the outer frame has a straight line.
4 is a representative example of a process of converting the data into a C.4. This processing can be easily realized by, for example, replacing the arc data with two pieces of vertical and horizontal line segment data indicating the corners of the table. More specifically, for each element of the stored table TBL3 (FIG. 23), for example, when AA0 = 0, LX0 = AX +
AR, LY0 = AY, LX1 = LX0, LY1 = AY−
AR vertical line segment, LX0 = AX + AR, LY0 = AY
-A vertical line segment of AR, LX1 = AX, LY1 = LY0R is generated in TBL1. The same processing is performed for AA0 of 90, 180, and 270.

【0083】図47のステップ2222では、標準フィー
ルド、即ち4本の線分で囲まれ、かつその内部に他のフ
ィールド含まない矩形領域(フィールド)を順次に抽出
する。本処理は、例えば横線分をその縦位置の順にソー
ティングし、その順序に従って先ず第1の横線を基準横
線として選択する。次に左側の縦線から順にチェックし
て上記基準横線と交わり下方に伸びる2本の縦線の組を
選択し、次にこれらの縦線の組と交わり上記基準横線に
最も近い位置にある横線を捜すことにより、上記基準横
線を上辺とした2本の横線と2本の縦線とを4辺とする
領域を見つける。上記動作を繰り返して、1つの基準横
線を上辺とする全てのフィールドを見つけたら、その次
の横線を基準横線に選んで同様の動作を繰り返すことに
より、罫線により形成される全てのフィールドを順次に
見つけることができる。このようにして検出された各四
辺形について、上述した標準フィールドの条件を満たす
か否かをチェックすることにより、標準フィールドのみ
を抽出することができる。
In step 2222 of FIG. 47, a standard field, that is, a rectangular area (field) surrounded by four line segments and containing no other field is sequentially extracted. In this process, for example, the horizontal line segments are sorted in the order of their vertical positions, and the first horizontal line is first selected as a reference horizontal line according to the order. Next, check in order from the left vertical line, select a set of two vertical lines that intersect with the reference horizontal line and extend downward, and then cross the set of these vertical lines and are the closest horizontal line to the reference horizontal line To find an area in which the two horizontal lines and the two vertical lines having the reference horizontal line as the upper side are four sides. When the above operation is repeated and all the fields having one reference horizontal line as the upper side are found, the next horizontal line is selected as the reference horizontal line, and the same operation is repeated, so that all the fields formed by the ruled lines are sequentially output. Can be found. By checking whether or not each of the quadrilaterals thus detected satisfies the standard field conditions described above, only the standard fields can be extracted.

【0084】ステップ2223では、前記ステップ29
21と全く同様にして、前記テーブルTBL5に格納さ
れた文字情報から文字列情報を作成し、以下各文字列に
対して、ステップ2224とステップ2225を繰り返
す。
In step 2223, step 29
In the same manner as in step 21, character string information is created from the character information stored in the table TBL5, and steps 2224 and 2225 are repeated for each character string.

【0085】ステップ2224では、上記抽出文字列
と、予め登録した特殊フィールドを生成し得る単語との
照合を行う。単語の照合は、前記ステップ2922と同
様にして処理する。照合の結果、前記所定の条件を満た
す単語が存在する場合には、ステップ2225におい
て、予め定めた手順に従って特殊フィールドの抽出処理
を行う。ここで特殊フィールドとは、必ずしも線分情報
によって囲まれていないが、帳票発行の際に内容データ
を印刷する位置を表す仮想的なフィールドである。例え
ば、後記の実例EX6,EX7に示すように、「年」に
対しては、その外接四角形、およびこれと同じ大きさで
その左隣に所定の距離離れた位置に特殊フィールドが定
義される。本処理は、特殊フィールドを生成し得る各単
語に対して、実際に特殊フィールドを生成するための条
件、および生成する位置、大きさなどの情報を、本ステ
ップ2225の処理として記述しておくことによって実
現できる。上記の、実際に特殊フィールドを生成するた
めの条件としては、例えば文字「年」と文字「月」の間
隔の各文字の大きさに対する比が、所定の値より大き
い、など単なる固定フィールドとの判別のための条件を
記述する。
In step 2224, the extracted character string is collated with a word which can generate a special field registered in advance. Word matching is performed in the same manner as in step 2922. If there is a word that satisfies the predetermined condition as a result of the comparison, in step 2225, a special field extraction process is performed according to a predetermined procedure. Here, the special field is a virtual field that is not necessarily surrounded by line segment information but indicates a position where content data is printed when a form is issued. For example, as shown in examples EX6 and EX7 described later, a special field is defined for "year" at a circumscribed rectangle and at a position the same size as this and a predetermined distance to the left of the rectangle. In this processing, for each word that can generate a special field, conditions for actually generating the special field, and information such as a position and a size to be generated are described as the processing of this step 2225. Can be realized by The above conditions for actually generating a special field include, for example, a case where the ratio of the interval between the characters "year" and "month" to the size of each character is larger than a predetermined value. Describe the conditions for determination.

【0086】ステップ2226では、上記ステップ22
22およびステップ2225で抽出した各フィールド
が、帳票発行の際にデータが記入される可能性がある入
出力フィールドであるか、新たにデータが記入される可
能性のない固定フィールドであるかの判別を行う。この
判別は、簡単には例えば、フィールド(領域範囲)に文
字列が存在するか否かをチェックすることによって行う
こともできるし、その文字列の単語としての意味を、予
めプログラムが保持している入出力フィールドに存在し
得る単語のリストと照合し、さらにフィールド内での文
字列位置が偏っているか否か等を参照することによって
判別を行うこともできる。
In step 2226, step 22
22 and whether each field extracted in step 2225 is an input / output field in which data may be entered at the time of form issuance or a fixed field in which no new data is entered. I do. This determination can be made simply by checking whether or not a character string exists in a field (area range), for example, and the program stores in advance the meaning of the character string as a word. It is also possible to make a determination by collating with a list of words that may exist in the input / output field and referring to whether or not the character string position in the field is biased.

【0087】ステップ2227では、入出力フィールド
と判定されたフィールドについて、フィールド定義情報
を後述するテーブルTBL8に登録する。ステップ22
28では、固定フィールドと判定されたフィールドにつ
いて、フィールド定義情報を上記テーブルTBL8に登
録する。
At step 2227, the field definition information of the field determined as the input / output field is registered in a table TBL8 described later. Step 22
At 28, the field definition information is registered in the table TBL8 for the field determined as the fixed field.

【0088】図49はフィールドテーブルTBL8の構成
を示す。上記テーブルTBL8は、フィールド領域の左
上座標(FX0,FY0)、右下座標(FX1,FY
1)およびフィールドの名称FNの各項目から構成され
る。フィールド名称は、固定フィールドについては、そ
の領域範囲に記載されている文字列をそのまま利用する
ことができ、入出力フィールドについては、入出力フィ
ールドであることを示す記号を登録する。上記テーブル
は帳票書式格納領域982に形成される。
FIG. 49 shows the structure of the field table TBL8. The table TBL8 includes upper left coordinates (FX0, FY0) and lower right coordinates (FX1, FY) of the field area.
1) and a field name FN. As for the field name, a character string described in the area range can be used as it is for a fixed field, and a symbol indicating an input / output field is registered for an input / output field. The table is formed in the form format storage area 982.

【0089】図50(A),(B)はフィールド位置認識
ステップ222の実行結果の実例を示す。図(A)に示
すEX6は、図3に示した原画像EX1から認識された
固定フィールドの位置、図(B)に示すEX7は、原画
像EX1から認識された入出力フィールドの位置をそれ
ぞれ図示したものである。
FIGS. 50A and 50B show an example of the execution result of the field position recognition step 222. FIG. EX6 shown in FIG. 7A shows the position of the fixed field recognized from the original image EX1 shown in FIG. 3, and EX7 shown in FIG. 7B shows the position of the input / output field recognized from the original image EX1. It was done.

【0090】図51(A),(B)は、前記録理構造認識
ステップ22で呼び出されるサブルーチンプログラムの
第3の実施例を示すフローチャートである。この第3の
実施例は前記のフィールド位置認識ステップ222と、
フィールド位置の認識結果を利用して複数のフィールド
間の関係を認識するステップ223と、各フィールドの
論理的に属性を認識するステップ224から構成され
る。フィールド位置認識ステップ222を直接実行する
か、行桁正規化ステップ221を行った後に実行するか
により図(A)の構成と図(B)の構成の実施例が存在
する。
FIGS. 51A and 51B are flowcharts showing a third embodiment of the subroutine program called in the pre-recording structure recognition step 22. FIG. This third embodiment includes the field position recognition step 222 described above,
The method includes a step 223 for recognizing a relationship between a plurality of fields using a recognition result of a field position, and a step 224 for logically recognizing an attribute of each field. Depending on whether the field position recognition step 222 is executed directly or after the row / digit normalization step 221 is executed, there are embodiments of the configuration shown in FIG.

【0091】図52は上記フィールド関係認識ステップ2
23の詳細なフローチャートを示す。ステップ2231
では、フィールドテーブルTBL8から固定フィールド
を1つ選択する。ステップ2232では、上記選択され
た固定フィールドに下方に接して入出力フィールドが存
在するか否かを調べる。入出力フィールドが存在する場
合には、そのさらに下方に接して別の入出力フィールド
が存在するか否かの判定を、下方に接する入出力フィー
ルドがなくなる迄、繰り返す(ステップ2233A〜2
233B)。最初に選択した固定フィールドの下方に入
出力フィールドが1個も存在しない場合には、その右方
に接して入出力フィールドが存在するか否かを調べ(ス
テップ2234)、右方に接する入出力フィールドが存
在しなくなるまで、上記固定フィールドの右方に位置す
る入出力フィールドの選択動作を繰り返す(ステップ2
235A〜2235B)。下方、および右方のいずれに
も入出力フィールドが存在しない場合にはステップ22
36で例外処理を行う。例外処理では例えば前記のステ
ップ2225で特殊フィールドとして抽出された入出力
フィールドを、特殊フィールド抽出のためのキーとなっ
た文字列である固定フィールドとを組にする等、前記の
単なる位置関係だけでは関連づけることができない処理
と、対応する入出力フィールドが存在しない固定文字列
の抽出処理を行う。ステップ2237では、最初に選択
した固定フィールドと、ステップ2233Aまたはステ
ップ2235Aで選択された入出力フィールドとを組に
してユニットを生成する。例外処理2236が行われた
場合には、特殊フィールドに対するユニット、固定フィ
ールド単独で構成するユニット、またはケイ線で囲まれ
ていないフィールドを含むユニットが生成される。以上
の処理をフィールドテーブルTBL8のすべての固定フ
ィールドについて繰り返す。
FIG. 52 shows the above-described field relationship recognition step 2.
23 shows a detailed flowchart of the embodiment. Step 2231
Then, one fixed field is selected from the field table TBL8. In step 2232, it is checked whether or not an input / output field exists below the selected fixed field. If there is an input / output field, the determination as to whether or not another input / output field is present further below the input / output field is repeated until there is no input / output field adjacent below (steps 2233A to 2233A).
233B). If there is no input / output field below the fixed field selected first, it is checked whether there is an input / output field in contact with the right side (step 2234). The operation of selecting the input / output field located to the right of the fixed field is repeated until the field no longer exists (step 2).
235A-2235B). If there is no input / output field on either the lower or right side, step 22
At 36, exception processing is performed. In the exception processing, for example, the input / output field extracted as a special field in step 2225 is combined with a fixed field which is a character string serving as a key for extracting the special field. A process that cannot be associated and a process of extracting a fixed character string having no corresponding input / output field are performed. In step 2237, a unit is generated by combining the fixed field selected first and the input / output field selected in step 2233A or 2235A. When the exception process 2236 is performed, a unit for a special field, a unit configured with a fixed field alone, or a unit including a field not surrounded by a dashed line is generated. The above processing is repeated for all fixed fields of the field table TBL8.

【0092】図53は、上記ユニット生成ステップ223
7で求めたユニット情報を格納するためのユニットテー
ブルT4の構造を示す。上記テーブルT4は、ユニット
に属する固定フィールドを指すフィールドテーブルTB
L8へのポインタFFと、ユニットに属する入出力フィ
ールド数PNと、ユニット属する各入出力フィールドを
指すフィールドテーブルTBL8へのポインタPF1〜
PFpの各項目から構成される。ここで、pは各ユニッ
トにおける入出力フィールド数PNの最大値を示す。上
記テーブルT4は作業領域985に用意される。図54
は、フィールド位置認識結果EX6およびEX7に対し
てフィールド関係認識ステップ223を実行して得られ
るユニットの状態の1例を図示している。ステップ22
33で選択された入出力フィールドからなるユニットU
V1〜UV4は縦ユニット,ステップ2235で選択さ
れた入出力フィールドからなるユニットUH1〜UH4
は横ユニット、ステップ2236で固定フィールドが孤
立していると認識されたユニットUI1は孤立ユニッ
ト、同じくステップ2236で罫線で囲まれていないフ
ィールドからなるユニットUE1〜UE3は例外ユニッ
トとして示されている。なお本例では文字「年」、
「月」、「日」の3つの文字(列)に対して、UE1−
UE3の3つのユニットを生成したが、前記ステップ2
225の処理の定義方法によって、文字列「年月日」に
対する1つのユニットを生成するようにすることもでき
る。
FIG. 53 shows the above-mentioned unit generation step 223.
7 shows the structure of a unit table T4 for storing the unit information obtained in step S7. The table T4 is a field table TB indicating fixed fields belonging to the unit.
A pointer FF to L8, the number of input / output fields PN belonging to the unit, and pointers PF1 to PF1 to field table TBL8 indicating each input / output field belonging to the unit
It consists of each item of PFp. Here, p indicates the maximum value of the number PN of input / output fields in each unit. The table T4 is prepared in the work area 985. Fig. 54
Shows an example of the state of the unit obtained by executing the field relation recognition step 223 on the field position recognition results EX6 and EX7. Step 22
Unit U consisting of the input / output field selected in 33
V1 to UV4 are vertical units, units UH1 to UH4 each consisting of the input / output field selected in step 2235.
Is a horizontal unit, the unit UI1 in which the fixed field is recognized as being isolated in step 2236 is an isolated unit, and the units UE1 to UE3, which are also composed of fields not surrounded by ruled lines in step 2236, are shown as exceptional units. In this example, the characters "year",
For three characters (string) of "month" and "day", UE1-
The three units of UE3 have been created,
One unit for the character string “year / month / day” may be generated by the method of defining the process of H.225.

【0093】図55はフィールド属性認識ステップ224
の詳細なフローチャートを示す。ステップ2241で
は、ユニットテーブルT4からユニットを1つ選択す
る。ステップ2242では、上記のユニットの固定フィ
ールドの名称を、予め帳票書式認識部972に登録して
あるユニット知識テーブルと照合し、そのユニットの機
能を求める。フィールド名称だけでは機能を決定できな
い場合には、ステップ2243で他ユニットとの意味関
係、帳票上のユニットの配置などの情報を所定のルール
と照合して、その機能を決定する。これらの処理で求め
たユニットの機能が、関数を呼び出して値を計算し、こ
の値を入出力フィールドに代入する関数入力ユニットで
ある場合には、上記関数入力属性を後述するテーブルT
BL9,TBL10に設定する(ステップ2244a〜
2245a)。ユニット機能が、ファイルを検索して値
を求め、それを入出力フィールドに代入するファイル入
力ユニットである場合には、ファイル入力属性を上記テ
ーブルTBL9,TBL11に設定する(ステップ22
44b〜2245b)。ユニットの機能が、他の入出力
フィールドに代入された値に基づいて計算によって求め
た値を入出力フィールドに代入する計算入力ユニットで
ある場合には、計算入力属性を上記テーブルTBL9,
TBL12に設定する(ステップ2244c〜2245
c)。上記ユニット機能が同一の項目の組を繰り返す意
味をもつユニット繰り返しユニットである場合には、繰
り返し属性を上記テーブルTBL9,TBL13に設定
する(ステップ2244d〜2245d)。上記ユニッ
ト機能が、上記の何れでもない場合には、入出力フィー
ルドにキーボードからの入力値を設定するキー入力ユニ
ットと判断し、キー入力属性を上記テーブルTBL9,
TBL14に設定する(ステップ2245e)。
FIG. 55 shows a field attribute recognition step 224.
3 is a detailed flowchart of the first embodiment. At step 2241, one unit is selected from the unit table T4. In step 2242, the name of the fixed field of the unit is compared with the unit knowledge table registered in the form format recognition unit 972 in advance, and the function of the unit is obtained. If the function cannot be determined only by the field name, in step 2243, information such as the semantic relationship with another unit and the arrangement of the unit on the form is collated with a predetermined rule to determine the function. If the function of the unit obtained by these processes is a function input unit that calls a function, calculates a value, and substitutes the value into an input / output field, the function input attribute is stored in a table T described later.
BL9 and TBL10 (Steps 2244a to 2244a).
2245a). If the unit function is a file input unit that searches for a file to obtain a value and substitutes it for an input / output field, the file input attribute is set in the tables TBL9 and TBL11 (step 22).
44b-2245b). When the function of the unit is a calculation input unit that substitutes a value obtained by calculation based on a value substituted into another input / output field into the input / output field, the computation input attribute is set in the table TBL9,
Set to TBL12 (steps 2244c to 2245)
c). If the unit function is a unit repeat unit having the meaning of repeating the same set of items, the repeat attribute is set in the tables TBL9 and TBL13 (steps 2244d to 2245d). If the unit function is not any of the above, it is determined that the key input unit sets an input value from the keyboard in the input / output field, and the key input attribute is set in the table TBL9,
It is set to TBL14 (step 2245e).

【0094】図56から図59は、上述した名称マッチング
ステップ2242において、ユニット機能を決定するた
めに参照される各種の知識テーブルの構成を示す。
FIGS. 56 to 59 show the structures of various knowledge tables referred to in determining the unit function in the name matching step 2242 described above.

【0095】図56に示す知識テーブルKNW1は、関数
入力属性をもつユニットの固定フィールドの名称UN
と、呼び出すべき関数の名称FUNをその項目として管
理する。
The knowledge table KNW1 shown in FIG. 56 has a name UN of a fixed field of a unit having a function input attribute.
And the name FUN of the function to be called is managed as the item.

【0096】図57に示す知識テーブルKNW2は、ファ
イル入力属性をもつユニットが検索すべきファイルの一
例を示す。この例では「品名」と「単価」とがその項目
として含まれており、特に品名から単価を一意に検索で
きるようにしてある。
The knowledge table KNW2 shown in FIG. 57 shows an example of a file to be searched by a unit having a file input attribute. In this example, "item name" and "unit price" are included as the items, and in particular, the unit price can be uniquely searched from the item name.

【0097】図58に示す知識テーブルKNW3は、計算
入力属性をもつユニットにおける固定フィールドの名称
UNと、計算の種別OPと、計算に用いるパラメータと
しての他のユニットの固定フィールド名称OP1〜OP
Nをその項目として管理する。ここで、計算に必要なパ
ラメータの種類は、計算の種別OPによって一意に決定
できるものとする。図59に示す知識テーブルKNW4
は、キー入力属性をもつユニットに設定すべき属性を管
理するテーブルであり、固定フィールドの名称UNと、
その属性として、例えばそれが数値情報か文字情報かを
示す記号ANを項目としてもつ。
The knowledge table KNW3 shown in FIG. 58 includes a fixed field name UN for a unit having a calculation input attribute, a calculation type OP, and fixed field names OP1 to OP of other units as parameters used for calculation.
N is managed as the item. Here, it is assumed that the type of parameter required for calculation can be uniquely determined by the type of calculation OP. Knowledge table KNW4 shown in FIG.
Is a table for managing attributes to be set in the unit having the key input attribute, and includes a fixed field name UN,
The attribute has, for example, a symbol AN indicating whether it is numerical information or character information as an item.

【0098】図60〜図65は、上述したフィールド属性認
識処理224のステップ2245a〜2245eで用い
られる属性設定のためのテーブル構造を示す。
FIGS. 60 to 65 show table structures for attribute setting used in steps 2245a to 2245e of the field attribute recognition processing 224 described above.

【0099】図60に示すテーブルTBL9は、ユニット
ワークテーブルT4を基に作成されるユニット全体を管
理するテーブルである。上記テーブルは、ユニットに属
する固定フィールドを指すフィールドテーブルTBL8
へのポインタFFと、ユニットに属する入出力フィール
ド数PNと、ユニットに属する入出力フィールドを指す
フィードテーブルTBL8へのポインタPF1−PFN
と、当該ユニットの機能種別UAと、その機能詳細情報
を格納するテーブルTBL10−TBL14へのポイン
タUAPの各項目から構成されている。ここで、Nはユ
ニットあたりの入出力フィールド数PNの最大値を示
す。上記テーブルT4は、以下のテーブルTBL10〜
TBL14と共に、帳票書式格納領域982に用意され
る。
The table TBL9 shown in FIG. 60 is a table for managing the entire unit created based on the unit work table T4. The above table is a field table TBL8 indicating fixed fields belonging to the unit.
FF, the number of input / output fields PN belonging to the unit, and the pointers PF1-PFN to the feed table TBL8 indicating the input / output fields belonging to the unit.
, A function type UA of the unit, and a pointer UAP to tables TBL10 to TBL14 storing detailed function information thereof. Here, N indicates the maximum value of the number PN of input / output fields per unit. The above table T4 has the following tables TBL10
Along with the TBL 14, it is prepared in the form format storage area 982.

【0100】図61に示すテーブルTBL10は、関数入
力属性ユニットの機能の詳細を示す情報を格納するため
のテーブルであり、例えば、呼び出すべき関数の名称F
UNN、関数を呼び出すのに必要なパラメータの数R
N、およびその実体であるPAR1〜PARNの各項目
から構成される。ここでNはパラメータ数RNの最大値
を示す。
A table TBL10 shown in FIG. 61 is a table for storing information indicating the details of the function of the function input attribute unit.
UNN, number of parameters required to call the function R
N and its items PAR1 to PARN. Here, N indicates the maximum value of the number of parameters RN.

【0101】図62に示すテーブルTBL11は、ファイ
ル入力属性ユニットの機能の詳細を示す情報を格納する
ためのテーブルであり、例えば、検索すべきファイルの
名称DBN、当該帳票の処理に関係のある項目の数D
N、およびその実体であるTM1〜TMNの各項目から
構成される。ここで、Nはパラメータ数DNの最大値を
示す。
The table TBL11 shown in FIG. 62 is a table for storing information indicating the details of the function of the file input attribute unit. Number D of
N and its items TM1 to TMN. Here, N indicates the maximum value of the number of parameters DN.

【0102】図63に示すテーブルTBL12は、計算入
力属性ユニットの機能の詳細を示す情報を格納するため
のテーブルであり、例えば、計算種別CALN、計算に
必要なパラメータの数CLN、およびその実態であるO
P1−OPCの各項目から構成される。ここで、Cはパ
ラメータ数CLNの最大値を示す。
The table TBL12 shown in FIG. 63 is a table for storing information indicating the details of the function of the calculation input attribute unit, and includes, for example, the calculation type CALN, the number CLN of parameters required for calculation, and the actual state thereof. An O
It consists of each item of P1-OPC. Here, C indicates the maximum value of the number CLN of parameters.

【0103】図64に示すテーブルTBL13は繰り返し
属性のユニットの機能の詳細を示す情報を格納するため
のテーブルであり、例えば、繰り返される固定フィール
ド数Nと、その実態であるTBL8へのポインタRFF
1〜RFFNと、繰り返されるユニット数Mと、その実
態であるTBL9へのポインタRU1−RUMの各項目
から構成される。
A table TBL13 shown in FIG. 64 is a table for storing information indicating details of the function of a unit having a repetition attribute.
1 to RFFN, the number M of units to be repeated, and pointers RU1 to RUM to the TBL 9 which are the actual items.

【0104】図65に示すTBL14は、キー入力属性ユ
ニットの機能の詳細を示す情報を格納するためのテーブ
ルであり、例えば、入力属性を示す記号DA、入力すべ
きデータの文字幅DW、文字高さDH、隣接する文字と
の間隔DD、左寄せ、中央寄せ、右寄せ等の区別を示す
書式情報DJの各項目から構成される。
The TBL 14 shown in FIG. 65 is a table for storing information indicating the details of the function of the key input attribute unit. DH, an interval DD between adjacent characters, and items of format information DJ indicating distinction such as left alignment, center alignment, and right alignment.

【0105】図66は、以上の処理によって原画像EX1
から生成される帳票論理構造認識結果の1例として、テ
ーブルTBL9〜TBL14の具体例をTBL9−EX
〜TBL14−EXとして示す。
FIG. 66 shows an original image EX1 obtained by the above processing.
As an example of the form logical structure recognition result generated from the table, a specific example of the tables TBL9 to TBL14 is described as TBL9-EX.
TTBL14-EX.

【0106】図67は、帳票書式認識ステップ2で実行さ
れるサブルーチンプログラムの第3の実施例を示すフロ
ーチャートである。この第3の実施例は、これまでに説
明した帳票の物理構造を認識するステップ21と、帳票
の論理構造を認識するステップ22と、以下に説明する
帳票作成プログラムを自動的に生成するためのステップ
23から構成される。尚、ここで言う帳票作成プログラ
ムとは、その後に帳票作成処理3で実行されるプログラ
ムを意味する。
FIG. 67 is a flowchart showing a third embodiment of the subroutine program executed in the form format recognition step 2. In the third embodiment, a step 21 for recognizing the physical structure of a form described above, a step 22 for recognizing a logical structure of the form, and a step for automatically generating a form creation program described below are performed. Step 23 is comprised. The form creation program referred to here means a program executed in the form creation processing 3 thereafter.

【0107】図68は帳票作成プログラム生成ステップ2
3で呼び出されるサブルーチンプログラムの1実施例を
示すフローチャートである。このサブルーチンプログラ
ムは、帳票書式認識部972内で上記プログラムとは異
なる領域に格納される。以下、上記サブルーチンの処理
内容を、図69に示す実際の処理結果EX9を参照して詳
細に説明する。
FIG. 68 shows a form creation program generation step 2
3 is a flowchart showing one embodiment of a subroutine program called in 3; This subroutine program is stored in an area different from the above program in the form format recognition unit 972. Hereinafter, the processing content of the above subroutine will be described in detail with reference to the actual processing result EX9 shown in FIG.

【0108】EX9は、図3に示した帳票の原画像EX
1に対する処理結果であり、実際には図66に示したテー
ブルTBL8−EX〜TBL14−EXを用いて作成さ
れる。本実施例では、生成されたプログラムの文法はプ
ログラミング言語pascalに則っている。
EX 9 is an original image EX of the form shown in FIG.
1 is actually generated using the tables TBL8-EX to TBL14-EX shown in FIG. In the present embodiment, the grammar of the generated program conforms to the programming language “pascal”.

【0109】まず最初に、ステップ231で、帳票の論
理構造認識結果に依存しないプログラムの固定部を生成
する。実例EX9では、l1,l2,l16,l32な
どのステートメントが上記プログラム固定部として生成
される。上記プログラムの生成は、実際には、サブルー
チンプログラム23の中で定義された所定のメモリ領域
に、上記実例で示されるような文字の列を定義していく
ことによって実現される。ステップ232では、上記プ
ログラムで使用する変数を宣言する部分を生成する。実
例EX9では、ステートメントl3−l5の生成がこれ
に対応する。上記プログラムで使用する変数は、論理構
造認識結果におけるユニット数、繰り返しユニット数な
どから決定される。次に、ステップ233で、実例EX
9におけるステートメントl6からl15に示されるよ
うな、上記プログラムで利用する関数または手続きを宣
言する部分を生成する。これらの関数、あるいは手続き
は、論理構造認識結果における関数入力属性の関数名等
から決定される。このプログラム部分の生成は、予めプ
ログラム23内に定義した幾つかの関数宣言文字列の中
から上記ステップで決定されたものの文字列を抽出し、
これをメモリ上の上記の作成プログラム格納領域に転記
することによって実現される。なお上記関数定義中、ス
テートメントl6〜l7で特に入力文字列を挿入すべき
位置にカーソルを表示する機能を設けることにより、後
の帳票発行処理をユーザが容易に行うことができる。ス
テップ234ではテーブルTBL13を参照することに
よって、繰り返し制御部を生成する。繰り返し制御部
は、判定ステップ230cにより終了が検出されるま
で、繰り返しユニットの数だけ生成される。これによっ
て、実例EX9では、ステートメントl17,l18,
l24が生成される。ステップ230aでは、上記繰り
返し部に属する入出力フィールドを1つずつ選択し、ス
テップ235で上記入出力フィールドの処理部を生成す
る。実例EX9では、これによってステートメントl1
9〜l23が生成される。
First, in step 231, a fixed part of a program that does not depend on the result of recognizing the logical structure of a form is generated. In the example EX9, statements such as l1, l2, l16, and l32 are generated as the program fixing unit. The generation of the program is actually realized by defining a character string as shown in the above example in a predetermined memory area defined in the subroutine program 23. In step 232, a part for declaring variables used in the program is generated. In the example EX9, the generation of the statements 13 to 15 corresponds to this. The variables used in the above program are determined from the number of units, the number of repeating units, and the like in the result of the logical structure recognition. Next, in step 233, the example EX
As shown in statements 16 to 115 in FIG. 9, a part that declares a function or procedure used in the above program is generated. These functions or procedures are determined from the function name of the function input attribute in the logical structure recognition result. This program portion is generated by extracting a character string determined in the above step from several function declaration strings defined in the program 23 in advance,
This is realized by transcribing this to the creation program storage area on the memory. In the above function definition, by providing a function of displaying a cursor at a position where an input character string is to be inserted particularly in the statements 16 to 17, the user can easily perform the following form issuance processing. In step 234, a repetition control unit is generated by referring to the table TBL13. The repetition control units are generated by the number of repetition units until the end is detected in the determination step 230c. As a result, in the example EX9, the statements 117, 118,
124 is generated. In step 230a, input / output fields belonging to the repetition unit are selected one by one, and in step 235, a processing unit for the input / output field is generated. In the example EX9, this causes the statement l1
9 to 123 are generated.

【0110】すべての繰り返し部の生成が終了する(ス
テップ230c)、次に非繰り返し部の生成が行なわれ
る。まず、ステップ230dで非繰り返し部の入力フィ
ールドの1つを選択した後、ステップ235でその入出
力フィールドの処理部を生成する。これを繰り返すこと
により、実例EX9のステートメントl25〜l31が
生成される。非繰り返し部の全ての入出力フィールドの
処理部生成が終ると(ステップ230d)、後処理ステ
ップ236でプログラム整形を行い、ステップ237
で、このようなソースプログラムと呼ばれる文字列をC
PU92が直接実行できる機械語に翻訳する。機械語へ
の翻訳処理は、予めメモリ97の一部に用意しておいた
公知の言語コンパイラ(プログラム)を起動することに
よって実現される。
The generation of all repetitive parts is completed (step 230c), and then the generation of non-repeated parts is performed. First, in step 230d, one of the input fields of the non-repeated part is selected, and then in step 235, a processing part for the input / output field is generated. By repeating this, statements 125 to 131 of the example EX9 are generated. When the processing units have been generated for all the input / output fields of the non-repeating unit (step 230d), the program is shaped in post-processing step 236, and step 237 is performed.
Then, a character string called such a source program is represented by C
It is translated into a machine language that can be directly executed by the PU 92. The translation processing into the machine language is realized by activating a known language compiler (program) prepared in a part of the memory 97 in advance.

【0111】図70は前記の入出力フィールド処理部生成
ステップ235の詳細な処理内容を示すフローチャート
である。本処理は、まずステップ2350aで、テーブ
ルTBL9を参照することにより、与えられた入出力フ
ィールドの属性を判定する。判定の結果が関数属性の場
合には、ステップ2351でテーブルTBL10を参照
することにより、与すられた入出力フィールドの属性を
判定する。判定の結果が関数属性の場合には、ステップ
2351でテーブルTBL10を参照することにより関
数属性の処理部を生成する。実例EX9では、l29,
l30,l31の3行が本ステップにより生成される。
判定の結果がファイル入力属性の場合には、ステップ2
352でテーブルTBL11を参照することによりファ
イル入力属性の処理部を生成する。実例EX9では、l
21の1行が本ステップにより生成される。判定の結果
がキー入力属性の場合には、ステップ2353でテーブ
ルTBL14を参照することによりキー入力属性の処理
部を生成する。実例EX9では、l19,l20の2行
が本ステップにより生成される。判定の結果が計算入力
属性の場合には、さらにステップ2350bでテーブル
TBL12を参照することにより、その演算種別を求め
る。演算種別が積の場合には、ステップ2354で再度
テーブルTBL12を参照することにより積演算の処理
部を生成する。実例EX9では、l22の1行が本ステ
ップにより生成される。演算種別が総和の場合には、ス
テップ2355で再度テーブルTBL12を参照するこ
とにより総和演算の処理部を生成する。実例EX9で
は、l25−l28の4行が本ステップにより生成され
る。
FIG. 70 is a flowchart showing the detailed processing contents of the input / output field processing unit generation step 235. In this processing, first, in step 2350a, the attribute of the given input / output field is determined by referring to the table TBL9. If the result of the determination is a function attribute, the attribute of the given input / output field is determined by referring to the table TBL10 in step 2351. If the result of the determination is a function attribute, a processing unit for the function attribute is generated by referring to the table TBL10 in step 2351. In the example EX9, l29,
Three rows of l30 and l31 are generated by this step.
If the result of the determination is the file input attribute, step 2
At 352, a processing unit for the file input attribute is generated by referring to the table TBL11. In the example EX9, l
21 lines are generated by this step. If the result of the determination is a key input attribute, a key input attribute processing unit is generated by referring to the table TBL14 in step 2353. In the example EX9, two rows of 119 and 120 are generated by this step. If the result of the determination is the calculation input attribute, the type of operation is obtained by referring to the table TBL12 in step 2350b. If the operation type is a product, a processing unit for the product operation is generated in step 2354 by referring to the table TBL12 again. In the example EX9, one line of 122 is generated by this step. When the operation type is the sum, in step 2355, the processing unit of the sum operation is generated by referring to the table TBL12 again. In the example EX9, four lines 125-128 are generated by this step.

【0112】なお、以上の帳票書式認識ステップの説明
では、説明の簡単化のため、概ね自動的に認識を行なう
ように述べたが、実際の応用においては、例えば画像入
力の状態等により誤認識が発生することがある。このよ
うなケースに対応するためには、例えば認識の各段階
に、オペレータによる確認操作と、必要に応じて上記自
動認識結果をマニュアルで修正するための処理ステップ
を挿入しておくとよい。特に物理構造認識ステップ2
1、論理構造認識ステップ22における行桁正規化ステ
ップ221、フィールド位置認識ステップ222、フィ
ールド関係認識ステップ223、フィールド属性認識ス
テップ224、および帳票作成プログラム生成ステップ
23のそれぞれの直後に、上述した処理結果の確認と修
正のための処理ステップを挿入すると都合がよい。
In the above description of the form format recognition step, for simplicity, it has been described that recognition is generally performed automatically. However, in actual applications, erroneous recognition is performed depending on, for example, the state of image input. May occur. In order to cope with such a case, for example, a confirmation operation by an operator and a processing step for manually correcting the automatic recognition result as needed may be inserted at each stage of the recognition. Especially physical structure recognition step 2
1. Immediately after each of the line digit normalization step 221, the field position recognition step 222, the field relation recognition step 223, the field attribute recognition step 224, and the form creation program generation step 23 in the logical structure recognition step 22, the above-described processing results It is convenient to insert a processing step for confirmation and correction.

【0113】以上で帳票書式認識ステップ2の説明を終
え、次に帳票作成ステップ3の実施例について説明す
る。
The form format recognition step 2 has been described above, and an embodiment of the form creation step 3 will now be described.

【0114】図71は帳票作成ステップ3の第1の実施例
を示すフローチャートである。この実施例では、帳票作
成ステップ3が帳票書式のうち図8のステップ21で求
めた物理構造(即ち、テーブルTBL1〜TBL5に登
録された情報)を用いて出力(例えば印刷)すべき書式
データを生成するステップ39だけで構成されている。
生成された出力帳票書式データは、出力帳票格納領域9
84に格納される。
FIG. 71 is a flowchart showing a first embodiment of the form creation step 3. In this embodiment, the form creation step 3 uses the physical structure (that is, the information registered in the tables TBL1 to TBL5) obtained in step 21 in FIG. It consists only of the generating step 39.
The generated output form format data is stored in the output form storage area 9.
84.

【0115】図72は、上記出力書式データ生成ステップ
39で呼び出されるサブルーチンプログラムのフローチ
ャートを示す。このサブルーチンプログラムは、帳票作
成部973内で上記プログラム3とは異なるメモリ領域
に用意される。最初のステップ391では、線分(直
線)の認識結果が登録されているテーブルTBL1を順
次に参照することによって、これらの線分を例えばプリ
ンタ95で印刷するための書式データを生成する。ステ
ップ392では、斜線の認識結果が登録されているテー
ブルTBL2を順次に参照することによって、これらの
斜線をプリンタ95で印刷するために必要な書式データ
を生成する。ステップ393では、円弧の認識結果が登
録されているテーブルTBL3を順次に参照することに
よって、これらの円弧をプリンタ95で印刷するための
書式データを生成する。ステップ394では、破線の認
識結果が登録されているテーブルTBL4を順次に参照
することによって、これらの破線をプリンタ95で印刷
するための書式データを生成する。ステップ395で
は、文字の認識結果が登録されているテーブルTBL5
を順次に参照することによって、これらの文字をプリン
タ95で印刷するための書式データを生成する。
FIG. 72 shows a flowchart of a subroutine program called in the output format data generating step 39. This subroutine program is prepared in a memory area different from the program 3 in the form creation unit 973. In the first step 391, format data for printing these line segments by, for example, the printer 95 is generated by sequentially referring to the table TBL1 in which the recognition results of the line segments (straight lines) are registered. In step 392, the format data necessary for printing these oblique lines by the printer 95 is generated by sequentially referring to the table TBL2 in which the oblique line recognition results are registered. In step 393, format data for printing these arcs with the printer 95 is generated by sequentially referring to the table TBL3 in which the recognition results of the arcs are registered. At step 394, format data for printing these broken lines by the printer 95 is generated by sequentially referring to the table TBL4 in which the recognition results of the broken lines are registered. In step 395, a table TBL5 in which the character recognition result is registered
Are sequentially referred to to generate format data for printing these characters by the printer 95.

【0116】上記のステップ39では、最終的に印刷帳
票格納領域984に得られる印刷書式データが、接続す
るプリンタ95の仕様に合わせたデータ形式で生成され
る。上記データ形式は、例えば通常のプリンタが外部イ
ンタフェースとして有しているビットマップ形式であっ
てもよいし、コマンドシーケンス形式であってもよい。
In the above step 39, print format data finally obtained in the print form storage area 984 is generated in a data format conforming to the specification of the printer 95 to be connected. The data format may be, for example, a bitmap format that a normal printer has as an external interface, or a command sequence format.

【0117】図73(A),(B)は、ステップ391に
おいてビットマップ形式で印刷書式データを生成する場
合の説明図である。図(A)はテーブルTBL1に格納
された1本の線分データを示し、図(B)はこれに対応
するビットマップの印刷書式データを示す。図(B)の
データは、印刷されるビットと1対1に対応した白画素
の配列をメモリ上に用意しておき、テーブルTBL1で
定義された線分に対応する部分、即ち図(B)に斜線で
示した矩形領域5に黒画素を代入することによって容易
に得ることができる。斜線,円弧,破線データについて
も上記線分の場合と同様にして印刷書式データを作成す
ることができる。尚、文字データは、予め別に用意され
た文字フォントパターンを直接、または必要に応じて拡
大縮小等の変形を施した後、上記白画素配列の上の所定
の位置に複写する形で作成することができる。
FIGS. 73 (A) and 73 (B) are explanatory diagrams in the case where print format data is generated in the bitmap format in step 391. FIG. FIG. 7A shows one piece of line segment data stored in the table TBL1, and FIG. 7B shows the corresponding bitmap print format data. In the data of FIG. 6B, an array of white pixels corresponding to the bits to be printed in one-to-one correspondence is prepared in the memory, and a portion corresponding to the line segment defined in the table TBL1, ie, FIG. Can be easily obtained by substituting black pixels into the rectangular area 5 indicated by oblique lines. With respect to oblique lines, arcs, and broken line data, print format data can be created in the same manner as in the case of the above line segments. Note that the character data should be created in such a manner that a character font pattern prepared separately in advance is directly or after modification such as enlargement / reduction as necessary, and copied to a predetermined position on the white pixel array. Can be.

【0118】一方、図74は、ステップ391においてコ
マンドシーケンス形式で印刷書式データを生成する場合
の説明図である。図(A)はテーブルTBL1に格納さ
れた1本の線分データを示し、図(B)はこれに対応す
る線分を描くためのコマンドシーケンス形式の印刷書式
データを示す。図(B)のデータは、テーブルTBL1
の各項目の値に応じて所定のコマンドシーケンスを発生
するための規則を予めステップ391の中に定義してお
くことによって、容易に得ることができる。斜線,円
弧,破線,文字データについても、上記線分の場合と同
様にして作成することができる。尚、プリンタ95がT
BL1〜TBL5の内容をそのままの図形種別や精度で
出力できない場合は、印刷書式データからプリンタに合
せた近似データを得るための手順も上記印刷書式データ
生成ステップ39に定義しておくことになる。
On the other hand, FIG. 74 is an explanatory diagram in the case where print format data is generated in the command sequence format in step 391. (A) shows one line segment data stored in the table TBL1, and (B) shows print format data in a command sequence format for drawing a corresponding line segment. The data in FIG. (B) is stored in the table TBL1.
Can be easily obtained by defining in advance in step 391 a rule for generating a predetermined command sequence according to the value of each item. Oblique lines, arcs, dashed lines, and character data can be created in the same manner as in the case of the above line segments. Note that the printer 95 is
If the contents of BL1 to TBL5 cannot be output with the graphic type and precision as they are, the procedure for obtaining approximate data suitable for the printer from the print format data is also defined in the print format data generation step 39.

【0119】図75は帳票作成ステップ3の第2の実施例
を示すフローチャートである。本実施例では、上述した
印刷書式データ生成ステップ39に先だって、まずテー
ブルTBL1〜TBL5に格納された帳票書式データを
コンソール91に表示し(ステップ31)、オペレータ
の指示により上記書式データを編集、即ちデータの追
加、更新、削除等の処理を行なう(ステップ32)よう
にしている。帳票書式データのコンソール91への表示
(ステップ31)は、例えば上記印刷書式データ生成ス
テップ39と同様の方法で、印刷書式データをコンソー
ル91のビットマップメモリに展開することによって実
現できる。ステップ32で行なう編集処理は、図37で説
明した後処理ステップ29における線の修正ステップ2
91および文字の修正ステップ292と同様、ワードプ
ロセッサやCADシステムで広く知られた技術を適用で
きるので、ここでは説明を省略する。
FIG. 75 is a flowchart showing a second embodiment of the form creation step 3. In the present embodiment, prior to the above-described print format data generation step 39, first, the form format data stored in the tables TBL1 to TBL5 is displayed on the console 91 (step 31), and the format data is edited according to the instruction of the operator, ie, Processing such as addition, update, and deletion of data is performed (step 32). The display of the form data on the console 91 (step 31) can be realized by, for example, expanding the print format data in the bitmap memory of the console 91 in the same manner as in the print format data generating step 39. The editing process performed in step 32 is the line correction step 2 in the post-processing step 29 described with reference to FIG.
As in the case of 91 and the character correction step 292, techniques widely known in word processors and CAD systems can be applied, and a description thereof will be omitted.

【0120】上記実施例によれば、表示された帳票EX
1に対して編集を加え、例えば図76に示す如くレイアウ
ト変更された帳票EX10の印刷書式データを生成する
ことも可能である。また、上記第2の実施例によれば、
例えば図77に示すような帳票EX11を作成し、その印
刷書式データを生成することも可能である。この場合、
帳票の内容データは書式として印刷されている。印刷の
みを目的とする場合には、書式データと内容データを区
別する必要はなく、このような利用方法が可能である。
上記処理によって最終的に得られる印刷書式データは、
前述した第1の実施例と同様、印刷帳票格納領域984
に登録される。
According to the above embodiment, the displayed form EX is displayed.
It is also possible to add the edit to 1 to generate the print format data of the form EX10 whose layout has been changed as shown in FIG. 76, for example. According to the second embodiment,
For example, it is also possible to create a form EX11 as shown in FIG. 77 and generate its print format data. in this case,
The form data is printed as a format. When only printing is intended, there is no need to distinguish between format data and content data, and such a usage method is possible.
The print format data finally obtained by the above processing is
As in the first embodiment, the print form storage area 984
Registered in.

【0121】以上述べた2つの実施例は、帳票書式認識
ステップ2における物理構造認識結果を利用することを
前提として説明したが、論理構造認識結果の一部である
テーブルTBL7、即ち行桁正規化ステップ221の結
果の情報をもとに、同様の処理を行なうことも可能であ
る。この場合の処理は、以上の実施例で文字コードを扱
う処理と同様の方法で実現できる。このとき印刷される
書式データは、幾何学的には必ずしも入力した帳票の書
式とは一致しないが、文字や罫線の素片がすべて格子状
に配列されているため、上記の帳票書式編集処理22が
オペレータにとっては極めて容易となる。
The above two embodiments have been described on the premise that the physical structure recognition result in the form format recognition step 2 is used. However, the table TBL7 which is a part of the logical structure recognition result, that is, the row digit normalization, is used. Similar processing can be performed based on the information on the result of step 221. The processing in this case can be realized by the same method as the processing for handling the character code in the above embodiment. The format data to be printed at this time does not necessarily match the format of the input form geometrically, but since all the elements of characters and ruled lines are arranged in a lattice, the form format editing processing 22 Is very easy for the operator.

【0122】図78は帳票作成ステップ3の第3の実施例
を示すフローチャートである。この実施例では、まずス
テップ33において前述の帳票書式認識結果を利用し
て、これに適合する帳票内容データを作成し、帳票内容
格納領域983に格納する。帳票内容データは、例えば
テーブルTBL5と同様の形式で格納することができ
る。次にステップ34で、前の実施例における帳票書式
データと同様にして、印刷(出力)用のデータに変換
し、出力帳票格納領域984に格納する。
FIG. 78 is a flowchart showing a third embodiment of the form creation step 3. In this embodiment, first, in step 33, form content data conforming to the form format recognition result is created using the form format recognition result described above, and stored in the form content storage area 983. The form content data can be stored, for example, in the same format as the table TBL5. Next, in step 34, the data is converted into data for printing (output) in the same manner as the form format data in the previous embodiment, and stored in the output form storage area 984.

【0123】図79は帳票内容データ作成ステップ33の
第1の実施例を示すフローチャートである。ステップ3
1では、前記第2の実施例と同様にして、帳票の書式デ
ータをコンソール91に表示する。ステップ331で
は、オペレータがコンソール91から入力したキー情報
を読取る。キー情報としては、例えばカーソル移動、帳
票に記入すべき内容データ、諸機能を指示するコマンド
などが含まれる。この情報が終了コマンド以外のとき
は、ステップ332において、入力されたキー情報に従
って帳票の内容データの入力処理を行なう。上記入力処
理では、例えばカーソル位置に指定した文字または文字
列を新たに定義する処理の他、その後にこれらの入力デ
ータを変更、削除する処理などの処理が可能である。上
記入力処理により、帳票内容格納領域983に、例えば
文字テーブルTBL5と同様の形式の内容データが新た
に定義される。
FIG. 79 is a flowchart showing a first embodiment of the form content data creation step 33. Step 3
In step 1, similar to the second embodiment, the form data of the form is displayed on the console 91. In step 331, the key information input by the operator from the console 91 is read. The key information includes, for example, cursor movement, content data to be entered in a form, commands for instructing various functions, and the like. If the information is other than the end command, in step 332, input processing of form content data is performed according to the input key information. In the input process, for example, a process of newly defining a character or a character string specified at a cursor position, and a process of changing or deleting such input data thereafter can be performed. Through the above input processing, for example, content data in the same format as the character table TBL5 is newly defined in the form content storage area 983.

【0124】上記帳票内容データ作成ステップ33によ
れば、例えば帳票書式EX1,EX10、または図80に
示す書式EX12をもとにして、それぞれ発行帳票EX
2,EX11、および図81に示すEX13のような内容
データを作成することができる。
According to the form content data creation step 33, for example, based on the form formats EX1 and EX10 or the format EX12 shown in FIG.
Content data such as EX2, EX11, and EX13 shown in FIG. 81 can be created.

【0125】図82は帳票内容データ作成ステップ34の
第2の実施例を示すフローチャートである。ステップ3
33では、当該帳票書式のうち任意の入出力フィールド
を選択する。上記選択は、自動的に行なってもよいし、
オペレータからの指示で行なってもよい。ステップ33
4では、上記選択された入出力フィールドに対応する内
容データを、ファイル等から検索する。この処理は、選
択された入出力フィールドが属するユニットの名称等に
基づいて、対応するファイルを自動的に検索することも
できるし、オペレータの指示で行なってもよい。上記検
索の結果、入出力フィールドに対応するデータが存在す
る場合には、ステップ332で上記データを上記入出力
フィールドに入力する。すなわち、図79における入力処
理332と同様にして、帳票内容格納領域983に、例
えば文字テーブルTBL5と同様の形式と内容データを
新たに定義する。
FIG. 82 is a flowchart showing a second embodiment of the form content data creation step. Step 3
At 33, an arbitrary input / output field is selected from the form. The above selection may be made automatically,
It may be performed by an instruction from the operator. Step 33
In step 4, content data corresponding to the selected input / output field is searched from a file or the like. This processing can be performed by automatically searching for the corresponding file based on the name of the unit to which the selected input / output field belongs, or by the instruction of the operator. As a result of the search, if there is data corresponding to the input / output field, the data is input to the input / output field in step 332. That is, in the same manner as in the input process 332 in FIG. 79, for example, a format and content data similar to the character table TBL5 are newly defined in the form content storage area 983.

【0126】上記第2の実施例による処理の実例を、図
80に示す帳票書式EX12を例にして説明する。尚、ス
テップ334で検索するファイルは、例えば図83に示す
ような構成とする。本ファイルはファイル全体の管理情
報F1と、題名ファイルF2、氏名ファイルF3,要旨
ファイルF4,本文ファイルF5から構成される。
An example of the processing according to the second embodiment is shown in FIG.
This will be described by taking the form EX12 shown in FIG. 80 as an example. The file searched in step 334 has, for example, a configuration as shown in FIG. This file is composed of management information F1 of the entire file, a title file F2, a name file F3, a summary file F4, and a body file F5.

【0127】まず、書式EX12の題名に関する入出力
フィールドが自動的選択されると、これに対応するデー
タが題名ファイルF2から読みだされ、帳票EX13に
示すように、入出力フィールドと対応する位置に内容デ
ータとして定義される。以下同様にして、氏名、要旨の
入出力フィールドの内容を定義することができる。上記
実施例によれば、EX12のような書式データを画像入
力するだけで、基本となるファイルから自動的にその内
容データを生成し、EX13のような帳票を容易に作成
することができる。
First, when the input / output field relating to the title of the format EX12 is automatically selected, the corresponding data is read out from the title file F2, and as shown in the form EX13, the data corresponding to the input / output field is located at the position corresponding to the input / output field. Defined as content data. In the same manner, the contents of the input and output fields of the name and the gist can be defined in the same manner. According to the above-described embodiment, simply by inputting format data such as EX12 as an image, the content data can be automatically generated from a basic file, and a form such as EX13 can be easily created.

【0128】図84は帳票内容データ作成ステップ33の
第3の実施例である。本実施例では帳票の作成に、図51
と図55で説明したステップ224のフィールド属性認識
結果を用いる。最初のステップ31では、帳票の書式を
コンソール91に表示する。次のステップ333では、
当該帳票の入出力フィールドのうち、処理済のフラグが
付加されていないフィールドを1つ選択する。処理済の
フラグは、各フィールドに対して1個からなる配列であ
る。選択した入出力フィールドの属性が関数入力属性の
ときは、以下ステップ335で、関数の計算を行ないこ
れを内容データとして新たに定義すると共に、処理済の
フラグを付加する。選択した入出力フィールドの属性が
ファイル入力属性のときは、まず当該フィールドのファ
イルを検索するために必要なパラメータ、即ちテーブル
TBL11におけるTM1〜TM(DN−1)がすべて
入力済か否かを確認する。入力済の場合には、ステップ
334でファイルから内容データを検索し、これを新た
な内容データとして定義すると共に、処理済のフラグを
付加する。選択した入出力フィールドの属性が計算入力
属性のときは、まず当該フィールドの計算式を実行する
ために必要なパラメータ、即ちテーブルTBL12にお
けるOP1〜OP(N−1)がすべて入力済か否かを確
認する。入力済の場合には、ステップ336で対応する
計算式を実行し、その結果を新たな内容データとして定
義すると共に、処理済のフラグを付加する。選択した入
出力フィールドの属性がキー入力属性のときは、以下ス
テップ331で、キーボードからのデータ入力処理を行
い、結果を内容データとして新たに定義すると共に、処
理済のフラグを付加する。1回の入出力フィールドの処
理が終了すると、ステップ31で書式および更新された
内容データをコンソール91に表示する。以下前記の処
理済フラグがすべてのフィールドに付加されるまで上記
処理を繰り返す。
FIG. 84 shows a third embodiment of the form content data creation step 33. In the present embodiment, a form is created as shown in FIG.
And the field attribute recognition result of step 224 described in FIG. In the first step 31, the form of the form is displayed on the console 91. In the next step 333,
One of the input / output fields of the form to which the processed flag is not added is selected. The processed flag is an array of one for each field. If the attribute of the selected input / output field is a function input attribute, a function is calculated in step 335 to newly define the function as content data and add a processed flag. When the attribute of the selected input / output field is the file input attribute, first, it is checked whether or not all the parameters necessary for searching the file of the field, that is, TM1 to TM (DN-1) in the table TBL11 have been input. I do. If input has been completed, the content data is retrieved from the file in step 334, this is defined as new content data, and a processed flag is added. When the attribute of the selected input / output field is the calculation input attribute, first, it is determined whether or not all the parameters necessary for executing the calculation formula of the field, that is, all of OP1 to OP (N-1) in the table TBL12 have been input. Confirm. If input has been completed, the corresponding calculation formula is executed in step 336, the result is defined as new content data, and a processed flag is added. If the attribute of the selected input / output field is the key input attribute, data input processing from the keyboard is performed in step 331, the result is newly defined as content data, and a processed flag is added. When one input / output field process is completed, the format and updated content data are displayed on the console 91 in step 31. Thereafter, the above processing is repeated until the above-mentioned processed flag is added to all the fields.

【0129】図85は帳票内容データ作成ステップ33の
第4の実施例である。本実施例では帳票の作成に、ステ
ップ23の帳票作成プログラム生成処理の結果を用い
る。ステップ337では、ステップ23で求めた帳票作
成プログラムの編集を行なう。本処理により、オペレー
タは認識誤りを修正したり、必要に応じて認識したプロ
グラムを拡張することができる。ステップ338では、
上記帳票処理プログラムを起動する。以下このプログラ
ムの制御のもとで帳票が作成されるので、本プログラム
はその終了を監視すればよい。
FIG. 85 is a fourth embodiment of the form content data creation step 33. In the present embodiment, the result of the form creation program generation processing in step 23 is used to create the form. In step 337, the form creation program obtained in step 23 is edited. With this processing, the operator can correct a recognition error or extend the recognized program as necessary. In step 338,
Activate the form processing program. In the following, since a form is created under the control of this program, the program may monitor the end thereof.

【0130】以上の実施例においては、行桁の正規化処
理を物理構造認識結果に対して行ない、その後のフィー
ルド位置認識等の他の論理構造認識処理を実行したが、
図51(A)の如く上記フィールド位置認識などの論理認
識処理を物理構造認識結果に引き続いて行ない、論理認
識結果を示すデータの行桁正規化を行なうようにするこ
ともできる。
In the above embodiment, the normalization process of the row digits is performed on the result of the physical structure recognition, and the other logical structure recognition processes such as the field position recognition are executed.
As shown in FIG. 51A, a logic recognition process such as the above-described field position recognition may be performed subsequently to the result of the physical structure recognition, and line digit normalization of data indicating the result of the logic recognition may be performed.

【0131】以上で本発明の基本的実施例の説明を終了
するが、以下この実施例の動作例を中心に、さらに補足
説明を行う。
The description of the basic embodiment of the present invention is completed above, and a supplementary explanation will be given below mainly on the operation example of this embodiment.

【0132】図86は本発明におけるオペレータの操作手
順と代表的な画面の遷移を示す図である。図において、
A201は、帳票用紙の例である。このような用紙を、
ステップA202で画像入力装置93(例えばOCRの
読取り装置、FAX等)に入力する。上記ステップA2
02では、読み込んだ用紙に記載してある罫線、文字、
画像などの情報が画像データから認識され、前記実施例
で詳述した文書の物理構造データが生成され、この物理
構造データに基づく文書情報が画面A203のようにデ
ィスプレイ画面に表示される。オペレータは、このディ
スプレイ画面上の表示された形式と読み込んだ用紙の内
容との比較確認をステップA204で行う。
FIG. 86 is a diagram showing the operation procedure of the operator and typical screen transitions according to the present invention. In the figure,
A201 is an example of a form sheet. Such paper,
In step A202, the image is input to the image input device 93 (for example, an OCR reading device, a facsimile, etc.). Step A2 above
In 02, ruled lines, characters,
Information such as an image is recognized from the image data, physical structure data of the document described in detail in the above embodiment is generated, and document information based on the physical structure data is displayed on the display screen as a screen A203. The operator compares and confirms the format displayed on the display screen with the content of the read sheet in step A204.

【0133】ここで修正、追加があれば、ディスプレイ
画面上でカーソルをその修正、追加位置にセットし、修
正、追加の結果を見ながら修正、追加作業を行う。確
認、修正が終れば、続行キーをコンソール91(キーボ
ード等)から入力し、論理認識処理に入る。論理認識処
理では、知識ベースを使いながら罫線の形、文字列等を
切り出し、その内容、意味によって入出力フィールドの
位置、大きさ、属性等を決定する。その結果を、A20
3のディスプレイ画面で表示したデータと対応づけ、決
定した入出力フィールドを例えば他の部分とは白と黒を
反転したリバース形でA205のディスプレイ画面に表
示する。表示された内容をA206で確認し、入出力フ
ィールドの位置、大きさ、属性に対して修正、追加があ
れば、結果を見ながら対話処理にて修正、追加を行う。
このとき、必要に応じて、試行印刷を行い入出力フィー
ルドの位置の微調整を行う。確認修正終了後、続行キー
をコンソール91のキーボード等から入力し、次の処理
プログラム作成処理に移行する。
If there is a correction or addition, the cursor is set at the correction or addition position on the display screen, and the correction and addition work is performed while observing the result of the correction and addition. When confirmation and correction are completed, a continuation key is input from the console 91 (keyboard or the like), and the logic recognition process is started. In the logic recognition processing, the shape of a ruled line, a character string, and the like are cut out using a knowledge base, and the position, size, attributes, and the like of the input / output field are determined based on the content and meaning. The result is A20
The input / output field determined is associated with the data displayed on the display screen of No. 3 and the determined input / output field is displayed on the display screen of A205 in a reverse form in which white and black are inverted with respect to other parts, for example. The displayed contents are checked in A206, and if there are corrections and additions to the position, size, and attributes of the input / output fields, the corrections and additions are performed by interactive processing while observing the results.
At this time, if necessary, trial printing is performed, and the position of the input / output field is finely adjusted. After the confirmation and correction are completed, the continuation key is input from the keyboard or the like of the console 91, and the processing shifts to the next processing program creation processing.

【0134】まず、入出力フィールドの性質、位置、知
識ベース340を利用し、各入出力フィールドごとに処
理ロジックを生成する。
First, processing logic is generated for each input / output field using the nature, position, and knowledge base 340 of the input / output field.

【0135】例えば本データ処理システムで取扱うデー
タが、ファイル800に品番、品名、単価なる項目で整
理されて格納され、一方、知識ベース340に、品番と
品名と単価が互いに関連付けられるものであることを示
す情報が予め蓄えられているものとする。また、上記関
連付けにおいては、品番がキーになること、および金額
=単価×数量、合計=金額+金額+…+金額である旨の
知識も知識ベースに格納してあるものとする。
For example, the data handled by the data processing system is stored in the file 800 in the order of item number, item name and unit price, while the knowledge base 340 associates the item number, item name and unit price with each other. Is stored in advance. Further, in the above association, it is assumed that the knowledge base stores the knowledge that the product number is a key, and that the amount = unit price × quantity and the total = amount + amount +... + Amount.

【0136】帳票用紙から認識された品番、品名、単価
等の文字群を、知識ベース340と照合すると、これら
の内、品番を入力することにより、他の値がファイル検
索により得られることが判る。これにより、品番を入力
する処理手続き、次にファイル800を検索して品名と
単価を得る処理手続きを生成することができる。しか
し、実際には用語がぴったり一致せずに、品番でなく商
品番号の如く異なる場合もある。そこで、知識ベースに
品番だけでなく、品番、商品番号、品名番号、品名No
などの類似語を予め登録しておくことにより、帳票から
読み取った項目名称とぴったり一致しない場合にも、処
理手続きの生成が可能になる。
When the character group such as the product number, product name, unit price and the like recognized from the form paper is compared with the knowledge base 340, it can be seen that by inputting the product number, other values can be obtained by file search. . As a result, it is possible to generate a processing procedure for inputting a product number and then a processing procedure for searching the file 800 to obtain a product name and a unit price. However, in practice, the terms may not exactly match and may differ from each other, such as a product number instead of a product number. Therefore, in the knowledge base, not only the product number but also the product number, product number, product name number, product name No.
By registering such similar words in advance, it is possible to generate a processing procedure even when the item name does not exactly match the item name read from the form.

【0137】また、数量、金額という文字群について知
識ベースを参照すると、数量を入力することにより、金
額の値は単価×数量を計算することにより得られること
が判る。このことから、数量を入力する処理手続き、次
に金額を計算する処理手続きを生成することができる。
Referring to the knowledge base for the character group of quantity and amount, it can be seen that by inputting the amount, the value of the amount can be obtained by calculating unit price × quantity. From this, it is possible to generate a processing procedure for inputting the quantity and then a processing procedure for calculating the amount.

【0138】更に、品番などの項目欄が複数個あること
により、前述した品番と数量を入力し、品名、単価及び
金額を得る処理手続きをくり返し、最後に各金額の合計
を計算する処理手続きを生成することもできる。これら
の手法により、帳票フォーマットA201に示された、
各々の出力すべき値を得るための処理手続き(プログラ
ム)が生成される。作成したプログラムは、A207の
ようにディスク等に格納される。作成されたプログラム
は、ステップA208ですぐに実行出来る。A209
は、作成されたプログラムの実行中の画面を示してい
る。
Further, since there are a plurality of item columns such as a product number, the above-described process of inputting the product number and quantity, repeating the process of obtaining the product name, unit price and price, and finally calculating the total of each price is performed. It can also be generated. By these methods, the form format A201 indicated
A processing procedure (program) for obtaining each value to be output is generated. The created program is stored on a disk or the like as in A207. The created program can be immediately executed in step A208. A209
Shows a screen during execution of the created program.

【0139】オペレータは、例えば、キーボードから商
品の品番(コード)と、その商品の数量との組み合せを
複数組入力する。上記プログラムは、オペレータが入力
した品番を検索キーとして、上記商品に該当する品名と
単価をあらかじめ用意してあるファイル800から検索
し、品番毎に単価と数量を乗算して金額を算出し、更に
複数組からなる取引での金額の合計を算出する。これら
の実行結果は、認識情報として入っている入出力フィー
ルドの微調整された位置にA210に示すように印刷す
ることが出来る。
The operator inputs, for example, a plurality of combinations of the product number (code) of the product and the quantity of the product from the keyboard. The program searches the file 800 prepared in advance for the product name and unit price corresponding to the product using the product number input by the operator as a search key, calculates the price by multiplying the unit price and quantity for each product number, Calculate the total amount of money in a transaction consisting of multiple sets. These execution results can be printed at the finely adjusted positions of the input / output fields contained as recognition information, as indicated by A210.

【0140】図87は、図86の動作シーケンスと対応する
主たるプログラムモジュールの実行シーケンスを示す。
以下、図87に沿って処理とデータの流れを補足する。
FIG. 87 shows an execution sequence of a main program module corresponding to the operation sequence of FIG. 86.
Hereinafter, the processing and the flow of data will be supplemented with reference to FIG.

【0141】図88(A)は、認識処理A303の流れを
示している。また、図88(B)は、認識処理で扱う伝票
の様式例を示している。ここで、例えば記号CE1,C
E2で示す部分のように三方、又は、四方が罫線100
で囲まれた領域をセルと呼ぶことにする。まずステップ
A401で入力した罫線の情報からセル群を認識する。
ステップA402では、セル内の文字やセル外の文字か
ら意味のある文字列を探し出し認識する。次にステップ
A403でセルの種類や文字列の意味から入出力フィー
ルドとなるセル内の入出力フィールド、セル外の入出力
フィールドなどを決定する。その後、文字列の意味から
入出力フィールドの属性、性質を決定し、入出力フィー
ルドの位置や大きさの情報と一緒に認識情報としてステ
ップA404でデータファイル99(ディスク、等)に
格納する。
FIG. 88A shows the flow of the recognition process A303. FIG. 88 (B) shows an example of a form of a slip handled in the recognition processing. Here, for example, the symbols CE1, C
As shown by E2, three sides or four sides are ruled lines 100
The area surrounded by is referred to as a cell. First, in step A401, a cell group is recognized from the ruled line information input.
In step A402, a meaningful character string is searched for and recognized from characters in the cell and characters outside the cell. Next, in step A403, an input / output field in the cell, an input / output field outside the cell, and the like, which are input / output fields, are determined from the type of the cell and the meaning of the character string. Thereafter, the attribute and property of the input / output field are determined from the meaning of the character string, and stored in the data file 99 (disk, etc.) in step A404 together with information on the position and size of the input / output field as recognition information.

【0142】図89は、セルの認識ステップA401の流
れを示す図である。ステップA501で、まず線分の補
正を行う。図90(A)〜(F)は補正する線分の例を示
す。図(A)〜(C)は、それぞれ表の角部分の補正の
例である。角の補正は、縦線分、横線分を伸ばし、図
(A),(B)に示す円弧や図(C)に示す切り込み形
状のものを縦横の直線が直交して結び付いた形に補正す
る。また、図(D)〜(F)のように完全には接触して
いない線分は、交点誤差を補正する。
FIG. 89 is a diagram showing the flow of the cell recognition step A401. In step A501, first, a line segment is corrected. FIGS. 90A to 90F show examples of line segments to be corrected. FIGS. 7A to 7C are examples of correction of the corners of the table. The angle is corrected by extending the vertical and horizontal line segments and correcting the arcs shown in FIGS. (A) and (B) and the cut shapes shown in FIG. (C) into shapes in which vertical and horizontal straight lines are orthogonally connected. . Line segments that are not completely in contact with each other, as shown in FIGS.

【0143】次に、ステップA502で線分の開始座標
(X、Y)を(Y、X)順に並びかえ、1本づつ置きな
がら領域を分割し、セルを作成していく。この領域分割
処理の動作例を図91で説明する。この例では状態A70
8の中に記号a〜gで示すように、表は7本の線分から
成り立っているものとする。
Next, in step A502, the start coordinates (X, Y) of the line segments are rearranged in the order of (Y, X), the area is divided one by one, and cells are created. An operation example of this region division processing will be described with reference to FIG. In this example, state A70
As shown by symbols a to g in 8, the table is assumed to be composed of seven line segments.

【0144】まず、状態A701で一番上にある横方向
の線分aを選択し、次に、状態A702で上記線分と交
わる縦方向の線分bを置くと、記号アとイで示す2つの
領域に分かれる。状態A703で縦方向の次の線分cを
置くと、記号イで示す領域が分割されて、記号ア、イ、
ウで示す3つの領域となる。状態A704で縦方向の次
の線分dを置くと、記号ウで示す領域が分割されて、記
号ア、イ、ウ、エで示す4つの領域となる。このように
して、例えば横方向の線分は上から下、縦方向の線分は
左から右に順に選択しながら、互いに交わる線分を次々
と置いていくと、状態A707のように、記号アからケ
で示す9個の領域に分割される。ここで、三方、又は、
四方が囲まれていないとセルと見なさないため、後処理
で、ア、エ、ケの3つの領域を落し、結果として状態A
708に示す6つの領域がセルとして認識される。
First, in the state A701, the top horizontal line segment a is selected, and then in the state A702, the vertical line segment b intersecting with the above line segment is placed. Divided into two areas. When the next vertical line segment c is placed in the state A703, the region indicated by the symbol A is divided, and the symbols A, A,
There are three areas shown by c. When the next vertical line segment d is placed in the state A704, the area indicated by the symbol c is divided into four areas indicated by the symbols a, a, c, and d. In this way, for example, while the horizontal line segment is selected from top to bottom, and the vertical line segment is selected from left to right, line segments that intersect each other are placed one after another. It is divided into nine areas indicated by A to K. Where:
Since the cell is not considered unless surrounded on all sides, the three regions A, D, and K are dropped in the post-processing, and as a result, the state A
The six regions 708 are recognized as cells.

【0145】セルの認識後は、ステップA402でセル
内やセル外にある文字列の認識処理を行う。入力された
文字情報から意味のある文字列を切り出し、左から右方
向を基本とし、先頭の文字の幅に少しでも重複する文字
は、同一の行、又は、列の文字列とみなす。
After the recognition of the cell, in step A402, a character string inside or outside the cell is recognized. A meaningful character string is cut out from the input character information, and characters that slightly overlap the width of the first character on the basis of the left-to-right direction are regarded as a character string in the same row or column.

【0146】図92(A)〜(D)は、この処理の動作例
を示したものである。即ち、本来例図(A)のように文
字の行の開始位置が揃っているべきものが、図(B)の
ように各文字の行開始位置が不揃いとなって認識された
場合でも、先頭の文字「ご」の文字幅にかかっている後
続文字「利」「物」「件」は、全て同一行にあるものと
みなす。また、図(C)のように一つの文字が、2つの
行に掛っている場合は、上の行の文字とみなす。従って
この例では、「店」は、「本」と同じ行にある文字と判
断する。図(D)のように列開始位置が揃っているべき
文字列で各文字の列開始位置が不揃いであっても、上記
と同様に1文字幅以内のものは同一の文字列にあるもの
と判断する。
FIGS. 92 (A) to 92 (D) show an operation example of this processing. In other words, even if the line start positions of the characters should be originally aligned as shown in FIG. 7A, but the line start positions of the characters are not aligned as shown in FIG. The subsequent characters “R”, “thing”, and “item” over the character width of the character “” are regarded as being all on the same line. If one character extends over two lines as shown in FIG. 3C, it is regarded as a character on the upper line. Therefore, in this example, “store” is determined to be a character on the same line as “book”. As shown in FIG. 4D, even if the character string has a line start position that should be aligned, but the character line start position is not uniform, a character string within one character width is considered to be in the same character string. to decide.

【0147】次に、図93(A)〜(C)によって、同一
行、同一列の文字を対象に、意味のある文字列の切り出
す処理の動作例を説明する。切り出し処理は、文字間隔
の変換と知識ベース340中の用語、単語とのマッチン
グで行う。例えば、図(A)の「所」と「氏」の間隔イ
のように、文字間隔が途中で広くなった場合は、そこを
文字列の境界と判断し、間隔が広く変化するまでの文字
「住所」を1つの文字列として切り出す。逆に、図
(B)の如く、文字間隔アから狭い文字間隔イに変化し
た場合、変化する前までの文字「電話」を1つの文字列
として切り出す。図(C)の例では、間隔アとイが同じ
であり、ウでは、狭く変化し、エで広くしている。この
例の場合には、間隔が変化したところを文字列の境界と
判断すると、「商品単」が切り出される。ウとエのよう
に間隔が一旦狭くなって次に広くなっている場合は、一
旦変化したところを境界として文字列を切り出し、切り
出された文字列を知識ベース340中の用語又は単語と
突き合わせる。知識ベース340にその文字列が存在す
れば、そこまで文字列の切り出しは正しかったと判断す
る。該当する用語又は単語が存在しなければ、最後の文
字が次の文字と結びついていると判断し、狭い間隔ウを
もつ文字「単」の前で区切って、「商品」を1つの文字
列として切り出す。このように文字間隔と知識ベースの
照合とを利用することにより、図(C)のような場合で
も正しい文字列「商品」「単価」「売上」を切り出すこ
とができる。文字が縦に並んでいる場合も同じである。
Next, with reference to FIGS. 93A to 93C, an operation example of a process of extracting a meaningful character string from characters in the same row and the same column will be described. The cutout processing is performed by converting the character spacing and matching with terms and words in the knowledge base 340. For example, if the character space is widened in the middle, as in the case of the space between “place” and “Mr.” in FIG. "Address" is cut out as one character string. Conversely, when the character spacing changes from the character spacing A to the narrow character spacing A as shown in FIG. 8B, the character "telephone" before the change is cut out as one character string. In the example shown in FIG. 9C, the intervals A and B are the same, and the interval C changes narrowly, and the interval A increases. In the case of this example, if it is determined that the change in the interval is the boundary of the character string, “commodity unit” is cut out. If the interval is once narrowed and then widened as in (c) and (d), a character string is cut out at the once changed boundary, and the cut out character string is matched with a term or word in the knowledge base 340. . If the character string exists in the knowledge base 340, it is determined that the extraction of the character string has been correct up to that point. If the corresponding term or word does not exist, it is determined that the last character is connected to the next character, and it is delimited before the character “Single” with a narrow space between “U” and “Product” as one character string. cut. By using the character spacing and the collation of the knowledge base in this way, it is possible to cut out the correct character strings “product”, “unit price”, and “sales” even in the case of FIG. The same applies when characters are arranged vertically.

【0148】行、又は、列ごとの切り出し処理が終る
と、次に、同一セル内で隣接する、複数行、複数列の文
字列について、組み合せて一つの意味を持つ文字列とな
っているか否かを判断する。図94(A)〜(E)にその
処理の動作例を示す。図(A)の例では、「取引先」と
「コード」が切り出されているが実は、「取引先」と
「コード」は、一つの文字列「取引先コード」となるべ
きものである。このように2つ以上の文字列を統合して
一つの文字列とする処理は、行と行の間隔が、標準文字
CHの縦幅α以内で、かつ各々の先頭又は最終の位置
が、揃っている場合に行う。ただし、位置ずれ量が標準
文字の横幅β以内の場合は、誤差の扱いとする。図
(A)の場合、各文字列の先頭文字「取」と「コ」の縦
方向の間隔をWα、横方向の誤差をWβ、最終文字
「先」と「ド」の横方向の誤差をW´βとすると、Wα
<αかつWβ<βまたは、W´β<βの場合、これらを
一つに統合すべき文字列として認識し「取引先コード」
とする。
When the cutout processing for each row or column is completed, it is determined whether adjacent character strings in a plurality of rows and columns in the same cell are combined into a character string having one meaning. Judge. FIGS. 94A to 94E show an operation example of the processing. In the example of FIG. 9A, “customer” and “code” are cut out, but in fact, “customer” and “code” should be one character string “customer code”. As described above, in a process of integrating two or more character strings into one character string, the interval between lines is within the vertical width α of the standard character CH, and the first or last position of each is aligned. If you do. However, if the displacement is within the width β of the standard character, the error is treated. In the case of FIG. 7A, the vertical interval between the first characters "T" and "U" of each character string is Wα, the horizontal error is Wβ, and the horizontal error between the last characters "First" and "D" is W. If W'β, then Wα
If <α and Wβ <β or W′β <β, these are recognized as a character string to be integrated into one, and “customer code”
And

【0149】文字列の切り出しは、基本的には上記方法
で行うが、図(B),(C)に示すように、セルが、縦
長で2列n行(n>2)のものや、図(D)に示すよう
に2行、2列のものに対しては、以下のような方法を取
る。すなわち、セルが縦長で2列n行の場合、各行の先
頭の文字間の間隔W1,W2,…が、図(C)のように
標準文字の縦サイズαより大きい場合は横方向で切り出
し、図(B)のように小さい場合は縦方向に文字を切り
出す。これにより図(B)の場合、文字列「ご使用期間
日」が切り出される。図(D)のように2行、2列の場
合、特別に縦、横の両方向から切り出し、知識ベースA
340とのマッチングにより、決定する。図(D)の場
合は、横読みにすると「都府道県」となり、縦読みにす
ると「都道府県」となる。この場合、知識ベースとの照
合により縦読みの「都道府県」が採用される。知識ベー
ス340のマッチングで決定できない場合は、横読みを
基準とする。
The character string is cut out basically by the above method. As shown in FIGS. (B) and (C), the cell is vertically long and has two columns and n rows (n> 2). As shown in FIG. 4D, the following method is used for the one having two rows and two columns. That is, when the cell is vertically long and has 2 columns and n rows, if the intervals W1, W2,... Between the first characters of each row are larger than the vertical size α of the standard character as shown in FIG. If it is small as shown in FIG. 7B, characters are cut out in the vertical direction. Thus, in the case of FIG. 9B, the character string “use period date” is cut out. In the case of two rows and two columns, as shown in FIG.
340 is determined by matching. In the case of FIG. 3D, the horizontal reading is "prefecture" and the vertical reading is "prefecture". In this case, "prefecture" of vertical reading is adopted by collation with the knowledge base. If it cannot be determined by matching the knowledge base 340, the horizontal reading is used as a reference.

【0150】以上述べたケースの他に、文字列の文字に
よって複数行で一つの意味をなす場合がある。切り出し
た文字列の最終もしくは、次の行の先頭に「の」「と」
「又は」「及び」「および」等の継続文字がある場合、
間隔とは無関係に、一つの文字列とする。図(E)で
は、先頭の行が「取扱者の」で終っており、継続を表す
文字「の」が付いていることから次の行と一つにし「取
扱者の住所」として切り出しを行う。
In addition to the cases described above, there is a case where a character in a character string has one meaning in a plurality of lines. "No" and "to" at the end of the extracted character string or at the beginning of the next line
If there are continuation characters such as "or""and""and"
Regardless of the interval, it is one character string. In FIG. (E), the first line ends with "handler's" and the character "no" indicating continuation is attached, so that the next line is combined with "handler's address" and cut out. .

【0151】以上説明したセルの認識ステップA40
1、文字列の認識切り出しステップA402の後は、こ
れらの情報からデータの入出力に使用する入出力フィー
ルドを設定する処理ステップA403を行う。セルは、
文字列の位置関係により、例えば95図(A)〜(C)
に示す3種類のセルに分類される。図(A)は、セルの
中が文字列だけで出来ており、フィールドの作成できる
余地のないセルであり、項目セルあるいは見出しセルと
呼ぶ。これは、入出力フィールドの見出しとなるもので
ある。図(B)は、セルの中に文字列はあるが、面積の
半分以下であり、セルの中に入出力フィールドが出来る
と判断される見出し付きセルである。図(C)は、セル
の中に「円」「kg」などの単位を表す単語以外は入っ
ておらず、そのセル自身が、入出力フィールドになる入
出力フィールドセルである。
The cell recognition step A40 described above.
1. After the character string recognition cutout step A402, a processing step A403 for setting an input / output field to be used for inputting / outputting data from these pieces of information is performed. The cell is
For example, FIG. 95 (A) to (C) of FIG.
Are classified into three types of cells. FIG. 1A shows a cell in which a cell is made of only a character string and has no room for creating a field, and is called an item cell or a heading cell. This is the heading of the input / output field. FIG. 6B shows a cell with a heading in which a character string is present in the cell but is less than half the area, and it is determined that an input / output field is formed in the cell. FIG. (C) shows an input / output field cell which does not include any word other than a word representing a unit such as "circle" or "kg" in the cell, and the cell itself becomes an input / output field.

【0152】図96は図88(A)のステップA403で
実行される上述の3種類のセルに分類するための処理ル
ーチンを示す。ステップA1202で見出しのセルとフ
ィールドとなるセルの結び付けを行う。次にステップA
1203で見出し付きフィールドセル内の入出力フィー
ルド設定を行い、ステップA1204で最後に見出しの
セルと結び付かなかったフィールドセルの見出しを文字
列に捜して結び付けると共に、ステップA1205で罫
線で囲まれていないセル外の文字列から入出力フィール
ドを設定する。見出しのセルと入出力フィールドとの結
び付けは、見出しのセルを基点として右方向および下方
向に結び付ける。
FIG. 96 shows a processing routine for classifying into the above three types of cells, which is executed in step A403 of FIG. 88 (A). In step A1202, the cell of the heading and the cell to be the field are linked. Next, step A
In step 1203, input / output fields in the field cell with a heading are set. In step A1204, the heading of the field cell which was not finally connected to the heading cell is searched for and connected to the character string, and in step A1205, the cell is not surrounded by a ruled line. Set input / output fields from the character string outside the cell. The link between the heading cell and the input / output field is made rightward and downward from the heading cell.

【0153】本処理の動作例を図97(A)〜(F)に示
す。図(A),(B)の場合、見出しセル「CE1」は
フィールドセルCE2に結び付く。図(C),(D)の
ようにフィールドセルが複数の領域に分割されている場
合は、見出しセルCE1に対しフィールドセルの全体部
分CE2が結び付く。図(E)の例のようにセル間の結
び付きが重複する場合、見出しセルCE1に対してはフ
ィールドセルCE2が結び付く。見出しセルCE3の場
合は、フィールドセルCE4とのフィールドセルCE6
が結び付く。見出しセルCE5は、下方にあるフィール
ドセルCE6が結び付く。ここでフィールドセルCE6
は、2つの見出しセルCE3とCE5から結び付けられ
ている。このような重複の場合には、結び付いているフ
ィールドセルの数の少ない方を優先する。従って、この
例の場合は、セルCE3に結び付いているフィールドセ
ルの数が多い為、フィールドセルCE6は見出しセルC
E5に結び付くことになる。
FIGS. 97 (A) to 97 (F) show an operation example of this processing. In the case of FIGS. (A) and (B), the heading cell “CE1” is linked to the field cell CE2. When the field cell is divided into a plurality of areas as shown in FIGS. (C) and (D), the entire part CE2 of the field cell is connected to the heading cell CE1. In the case where the connection between cells overlaps as in the example of FIG. 10E, the field cell CE2 is connected to the heading cell CE1. In the case of the heading cell CE3, the field cell CE4 and the field cell CE6
Is tied. The heading cell CE5 is linked to the field cell CE6 below. Here, field cell CE6
Are linked from the two header cells CE3 and CE5. In the case of such an overlap, priority is given to the one with the smaller number of connected field cells. Therefore, in this example, since the number of field cells connected to the cell CE3 is large, the field cell CE6 is
It will be linked to E5.

【0154】ただし、この規則は、図(F)のようなマ
トリックス型の例には適用しない。この場合は、各入出
力フィールドに対し、左側にある見出しが種類を表わ
し、上にある見出しが内容を表わすことから、左と上と
両方向からの結び付けをしておく必要がある。図(F)
の例では、入出力フィールドCE5に対しては、見出し
セルCE1とCE3が、入出力フィールドCE7に対し
ては、見出しセルCE2とCE3が、入出力フィールド
CE6に対しては見出しセルCE1とCE4が、又、入
出力フィールドCE8に対しては見出しセルCE2とC
E4が結び付く。
However, this rule is not applied to a matrix type example as shown in FIG. In this case, for each input / output field, the heading on the left side indicates the type, and the heading on the upper side indicates the content. Therefore, it is necessary to link the left and upper directions from both directions. Figure (F)
In the example, the header cells CE1 and CE3 are provided for the input / output field CE5, the header cells CE2 and CE3 are provided for the input / output field CE7, and the header cells CE1 and CE4 are provided for the input / output field CE6. , And for the input / output field CE8, the header cells CE2 and C2
E4 binds.

【0155】見出し付きフィールドセル内への入出力フ
ィールドの設定は、空白領域の位置とセル内にある文字
列の内容によって決定する。
The setting of the input / output field in the heading field cell is determined by the position of the blank area and the contents of the character string in the cell.

【0156】図98は処理されるフィールドの典型的例で
ある。図(A)は右半分が空いている例、図(B)は、
下半分が空いている例である。ただし、図(C)のよう
に面積としては、半分以上残っていても、セルを4分割
すると、文字列が3つ以上の分割したセルにまたがる場
合は、見出しのセルとして扱い、フィールド領域の生成
は行わない。フィールドの位置の設定は、中の文字列の
内容によって左、上、下を決定するが、内容が決定出来
ない場合は、空いている領域を設定する。
FIG. 98 is a typical example of a field to be processed. FIG. (A) shows an example in which the right half is empty, and FIG.
In this example, the lower half is empty. However, as shown in FIG. 9C, even if the area is left more than half, if the cell is divided into four and the character string extends over three or more divided cells, it is treated as a heading cell and No generation is performed. When setting the position of the field, the left, top, and bottom are determined according to the content of the middle character string. If the content cannot be determined, an empty area is set.

【0157】文字列の内容の確認は、知識ベースA34
0とのマッチングによって行う。図99は本処理の簡単な
例、図100はその動作例を説明したものである。知識ベ
ース340には、文字列に対応してフィールド位置情報
を格納している。例えば、「様」には「左」、「万円」
には「左」、「一」には「左右」といった情報が入って
おり、この文字列とフィールド位置の対応情報に従いフ
ィールドの作成位置を決定する。図100の(A),
(B),(D)の場合は左に、図(C),(E)の場合
は右に作られる。知識ベース340に対応する文字列が
ない場合には、空いている部分の右か下を入出力フィー
ルドとして設定する。
The confirmation of the contents of the character string is performed in the knowledge base A34.
This is performed by matching with 0. FIG. 99 illustrates a simple example of this processing, and FIG. 100 illustrates an operation example thereof. The knowledge base 340 stores field position information corresponding to character strings. For example, "sama" means "left", "10,000 yen"
Contains information such as "left" and "one" as "left and right". The field creation position is determined according to the correspondence information between the character string and the field position. FIG. 100 (A),
In (B) and (D), it is made on the left, and in (C) and (E), it is made on the right. If there is no character string corresponding to the knowledge base 340, the right or lower part of the empty part is set as the input / output field.

【0158】以上述べた結び付けの結果まだ結び付かな
い入出力フィールドセルが存在する。この入出力フィー
ルドセルには、その回りに存在する見出しとなるべき文
字列を捜し、これをフィールドセルと結び付ける。本処
理の動作の例を図101(A)〜(E)を用いて説明す
る。基本的には、図(A)に示す如く、入出力フィール
ドCEに対して上、下間隔αと左右間隔βの範囲Sにあ
る文字列を捜す。図(B)の例では、「金額」が、探索
範囲S内にある文字列であり、フィールドCE1に対し
「金額」が見出し(項目名)となる。図(C)のように
見出しとなる文字列が複数ある場合は、左、右、下の優
先順位で結び付ける。上記例の場合は、「技術科」が見
出しとなる。ただし、図(D),(E)のように入出力
フィールドの回りに「円」「kg」など単位となりうる
文字が付加されている場合は、単位の付加されている方
向と逆の方向の文字列を見出しとする。図(D)の場合
は、「技術科」が見出しとなり、図(E)の場合は「金
額」が見出しとなる。
As a result of the above-described connection, there are input / output field cells that have not been connected yet. The input / output field cell is searched for a character string serving as a heading existing therearound, and this is linked with the field cell. An example of the operation of this processing will be described with reference to FIGS. Basically, as shown in FIG. 9A, a character string in a range S between an upper and lower interval α and a horizontal interval β is searched for the input / output field CE. In the example of FIG. 7B, “money” is a character string within the search range S, and “money” is a heading (item name) for the field CE1. When there are a plurality of character strings serving as headings as shown in FIG. 3C, the character strings are linked in the order of left, right, and bottom. In the case of the above example, the heading is “Technical Department”. However, when a character that can be a unit such as "circle" or "kg" is added around the input / output field as shown in FIGS. (D) and (E), a direction opposite to the direction in which the unit is added is used. Use a character string as a heading. In the case of FIG. (D), the heading is “Technical Department”, and in the case of FIG. (E), the heading is “Amount”.

【0159】最後に罫線で囲まれていない文字列から入
出力フィールドを設定する。本処理を動作させて得られ
た結果の例を図102に示す。図において、記号ア、イ、
ウ、エの示す文字は、罫線で囲まれておらず、これらの
文字列に対して知識ベース340との付き合わせによ
り、入出力フィールドを設定する。以上述べてきたよう
に、入出力フィールドの設定とそれに対する見出しが結
び付けられる。
Finally, an input / output field is set from a character string not surrounded by ruled lines. FIG. 102 shows an example of a result obtained by operating this processing. In the figure, the symbols a, a,
The characters indicated by c and d are not surrounded by ruled lines, and input / output fields are set by matching these character strings with the knowledge base 340. As described above, the setting of the input / output field and the heading for the setting are linked.

【0160】設定した入出力フィールドに対し、結び付
いている見出しの文字列の内容をもとに属性を決定し認
識情報を生成しながら認識情報ファイルに格納する。図
103は認識情報の内容の例を説明したものである。各入
出力フィールド(ア〜オ…)ごとに位置a、長さb、幅
c、入出力領域内の文字数d、フィールドの領域名称
e、属性fを設定する。a〜cは、例えば1/10mm
単位で設定する。dのフィールド内文字数は、そのフィ
ールド内に入れる文字数のことであり、フィールドの大
きさと標準文字サイズから計算し、設定する。
For the set input / output field, the attribute is determined based on the contents of the character string of the linked heading, and the information is stored in the recognition information file while generating the recognition information. Figure
103 describes an example of the content of the recognition information. A position a, a length b, a width c, the number of characters d in the input / output area, a field area name e, and an attribute f are set for each input / output field (A to O ...). a to c are, for example, 1/10 mm
Set in units. The number of characters in the field of d is the number of characters to be put in the field, and is calculated and set from the size of the field and the standard character size.

【0161】図104(A)〜(C)は、文字数の求め方
を説明するものである。図(A)において、フィールド
CEに付された記号lとmは、フィールドの縦横の長さ
であり、α、βは、文字の標準間隔を表わす。標準文字
サイズを図(B)のようにQ、Pで表わすと、文字数は
次の式で求められる。
FIGS. 104A to 104C illustrate how to determine the number of characters. In FIG. 7A, the symbols l and m added to the field CE are the vertical and horizontal lengths of the field, and α and β represent the standard spacing of characters. When the standard character size is represented by Q and P as shown in FIG. 3B, the number of characters is obtained by the following equation.

【0162】図(C)に示すように、フィールドが細か
なセルの連続で成り立っている場合は、このセルの数
が、文字数となる。求めた文字数は、あくまで標準文字
サイズの場合であり、オペレータは、後で、この文字数
を変更することが出来る。数を多くすると印刷する文字
の大きさは小さくなり、数を少なくすると大きな文字を
印刷する。
As shown in FIG. (C), when the field is composed of a series of fine cells, the number of cells is the number of characters. The obtained number of characters is a case of the standard character size, and the operator can change the number of characters later. The larger the number, the smaller the size of the characters to be printed, and the smaller the number, the larger the characters to be printed.

【0163】フィールドの名称は、見出しの文字列を設
定する。例えば図105に示すようなマトリックス型の場
合は、左と上のセルが、入出力フィールドと結び付いて
いる。一般的にこういう形の場合、左の文字列が種類を
表わし、上の文字列が性質を表わしているので、項目名
称としては、「左の見出し+上の見出し」を設定する。
従って、記号CE1で示す入出力フィールド名称は「ボ
ールペン仕入単価」となり、記号CE2で示すフィール
ド名称は「ボールペン小売単価」となる。同様に記号C
E3で示すフィールド名称は「万年筆仕入単価」、記号
CE4で示すフィールド名称は「万年筆小売単価」とな
る。これら設定したフィールド名称は、そのフィールド
の属性や性質、処理手続の組み立てに使われる。
As the field name, a character string of a heading is set. For example, in the case of a matrix type as shown in FIG. 105, the left and upper cells are associated with input / output fields. In general, in such a case, the character string on the left represents the type, and the character string on the upper side represents the property. Therefore, “left heading + upper heading” is set as the item name.
Therefore, the input / output field name indicated by the symbol CE1 is “ballpoint pen purchase unit price”, and the field name indicated by the symbol CE2 is “ballpoint pen retail unit price”. Similarly, the symbol C
The field name indicated by E3 is “fountain pen purchase unit price”, and the field name indicated by symbol CE4 is “fountain pen retail unit price”. These set field names are used for assembling the attributes and properties of the field and the processing procedure.

【0164】上記方法で決定したフィールド名称をもと
にして、知識ベース340から合致するものを捜し、そ
の属性を認識情報として設定する。ここで知識ベース3
40について図106を用いて説明する。知識ベース34
0は、用語部340Aと常識単語部340Bに分かれて
いる。用語部340Aは、一般的な用語が入っている。
常識単語部340Bは、業務用語のうち基本となる語尾
単語を集めたものである。一般に業務の用語は、語尾の
単語ほどその用語の意味、内容を表わしている。例え
ば、「前記売上金額」という用語は、語尾の「金額」と
いう単語で性質を表わしている。常識単語部340B
は、性質を持っている単語を集めたものである。また、
これらの用語部と常識単語部のデータ構造は同一形式で
あり、検索キーとなる用語や単語341の他、同意語3
42、入力や出力、英数、漢字などの属性343、演算
式(実行処理ルール)344等の情報から成り立ってい
る。知識ベースに登録されるその他の情報については、
追って説明する。
Based on the field name determined by the above method, a match is searched from the knowledge base 340, and its attribute is set as recognition information. Here is the knowledge base 3
40 will be described with reference to FIG. Knowledge base 34
0 is divided into a term part 340A and a common sense word part 340B. The term part 340A contains general terms.
The common sense word part 340B is a collection of basic ending words in business terms. In general, the term at the end of a job indicates the meaning and content of the term at the end of the term. For example, the term “sales amount” expresses the property by the word “amount” at the end. Common sense word part 340B
Is a collection of words with properties. Also,
The data structure of these term part and common sense word part is the same format, and in addition to the search key term or word 341, the synonym 3
42, information such as inputs and outputs, attributes 343 such as alphanumeric characters and kanji, and arithmetic expressions (execution processing rules) 344. For other information registered in the knowledge base,
I will explain later.

【0165】この知識ベース340を使い、文字列の内
容と用語、単語とのマッチングにより処理を進めてい
く。このマッチングの方法は、次の3つの方法を順次行
っていく。まず文字列と用語部340Aとの1:1マッ
チングを行う。次に文字列と常識単語部340Bの単語
との1:1マッチングをし、さらに常識単語部を使って
文字列の語尾単語を切り出し、該当のものを見つけてい
く。入出力フィールドの属性は、このフィールド名称を
使って該当のものを捜し、設定していく。
Using this knowledge base 340, the process proceeds by matching the contents of the character string with terms and words. As the matching method, the following three methods are sequentially performed. First, 1: 1 matching between the character string and the term part 340A is performed. Next, 1: 1 matching between the character string and the word of the common sense word part 340B is performed, and the ending word of the character string is cut out using the common sense word part, and the corresponding word is found. The attribute of the input / output field is searched and set using the field name.

【0166】図107は、知識データとのマッチング処理
を動作例を中心に説明した図である。図においてステッ
プA2201でフィールド名称が知識ベースの用語部3
40Aに登録されている用語と一致するかチェックす
る。あれば、上記フィールド名称に対して該当知識ベー
ス中の属性343を設定する。なければ、ステップA2
202でフィールド名称が常識単語部340Bに登録さ
れている単語と一致するかチェックする。なければ、ス
テップA2203で常識単語部340Bの単語が、フィ
ールド名称中に含まれているかをチェックし、含まれて
いる常識単語を選択する。ステップA2260で選ばれ
た単語からなるべく語尾にあって、文字数の多いものを
採用し、採用した単語の属性を上記フィールド名称に設
定する。例えば、ステップA2201とステップA22
02の処理で、フィールド名称を売上商品名とすると、
「売上商品名」は、知識ベースの用語部にも、常識単語
部にもない。従って、3つめのステップA2203の処
理が行なわれ、「品名」、「商品名」、「商品」の3つ
が候補にあがる。この中でもっとも語尾にあり、文字数
が多い「商品名」が、選ばれ、「売上商品名」と言うフ
ィールドには、常識単語部340Aの「商品名」を単語
とするレコードに含まれる属性343が設定される。
FIG. 107 is a diagram for explaining the matching processing with the knowledge data mainly on an operation example. In the figure, in step A2201, the field name is the term part 3 of the knowledge base.
It is checked whether it matches the term registered in 40A. If so, the attribute 343 in the corresponding knowledge base is set for the field name. If not, step A2
In 202, it is checked whether or not the field name matches a word registered in the common word unit 340B. If not, it is checked in step A2203 whether the word of the common sense word part 340B is included in the field name, and the included common sense word is selected. At the end of the word selected in step A2260, a word having as many characters as possible is adopted, and the attribute of the adopted word is set in the field name. For example, Step A2201 and Step A22
In the process of 02, if the field name is the sales product name,
The “sales product name” is neither in the term part of the knowledge base nor in the common sense word part. Therefore, the process of the third step A2203 is performed, and three of “article name”, “article name”, and “article” are candidates. The “product name” having the most ending and the number of characters is selected, and the field “sales product name” is included in the attribute 343 included in the record having the “product name” in the common sense word part 340A as a word. Is set.

【0167】以上、全入出力フィールドの位置から属性
までを求めた後、これらの情報を認識情報としてファイ
ルA350に書込む。上記ファイルA350は、例えば
図1のデータファイル99(ディスク等)上に形成でき
る。それと同時に、ディスプレイ上に形式と一緒に設定
した入出力フィールドをリバースし、図85のA205の
画面が表示されて認識処理が終了する。
As described above, after obtaining from the positions of all the input / output fields to the attributes, these information are written in the file A 350 as recognition information. The file A350 can be formed, for example, on the data file 99 (disk or the like) in FIG. At the same time, the input / output fields set together with the format are reversed on the display, the screen of A205 in FIG. 85 is displayed, and the recognition processing ends.

【0168】次に認識処理の結果作成した認識情報をも
とにプログラムの作成を行う。作成したプログラムは、
その場で実行することが出来る形で出力される。プログ
ラムの作成において使用するファイルの名称は、作成開
始後にオペレータが指定するか、又は、知識ベース34
0の中の用語又は常識単語対応に指定されている。ここ
で、入出力フィールドのうち、知識ベースの検索キー3
41となるものを、プログラム作成処理では、以降「検
索項目」と呼ぶことにする。
Next, a program is created based on the recognition information created as a result of the recognition processing. The created program is
It is output in a form that can be executed on the spot. The name of the file used in the creation of the program is specified by the operator after the creation is started, or the
It is specified to correspond to the term in 0 or common sense word. Here, of the input / output fields, the search key 3 of the knowledge base
The item 41 will be referred to as “search item” hereinafter in the program creation processing.

【0169】一般に伝票や、帳票を使った処理プログラ
ムは、この伝票や帳票の各項目ごとの処理から成り立っ
ている。そしてこの項目処理は、大別すると図110の、
記号アや記号キで示す部分に入力されたデータをもとに
ファイル検索し、該当するレコードを選んで来てレコー
ドの内容を記号イ,ク,ケ,で示す部分に代入したり、
記号サや記号シのように演算により求めた値を代入する
処理に分かれる。前者を検索項目処理、後者を演算処理
と呼ぶものとする。
In general, a processing program using a slip or a form is made up of processing for each item of the slip or the form. This item processing is roughly divided into FIG.
A file search is performed based on the data input in the portion indicated by the symbol A or the symbol K, the corresponding record is selected, and the contents of the record are substituted into the portion indicated by the symbol A, C, K,
The process is divided into the processes of substituting the value obtained by the operation, such as the symbol や and the symbol シ. The former is referred to as search item processing, and the latter is referred to as arithmetic processing.

【0170】プログラムの作成は、図108のように、ま
ずステップA2301で検索項目の処理ロジックを組み
立てる。次にステップA2302で演算項目の処理ロジ
ックを組み立てる。その後、ステップA2303で同一
ファイルのオープン回数の最適化や冗長な処理の最適化
を図る。
To create a program, first, in step A2301, the processing logic of the retrieval item is assembled. Next, in step A2302, the processing logic of the operation item is assembled. Thereafter, in step A2303, optimization of the number of times of opening the same file and optimization of redundant processing are attempted.

【0171】図109に検索項目A2301の処理の手続
きの流れを示す。まず、ステップA2401で検索項目
となりうるものを全項目選びだす。次に、ステップA2
402で選び出した各検索項目対応に検索対象となるフ
ァイルと検索するファイル内の項目を捜し出す。これら
を使用してステップA2403で処理ロジックを組み立
てる。
FIG. 109 shows the flow of the procedure for processing the search item A2301. First, in step A2401, all items that can be search items are selected. Next, step A2
A file to be searched and an item in the file to be searched are searched for for each search item selected in 402. Using these, the processing logic is assembled in step A2403.

【0172】検索項目の選択は、知識ベース340の情
報をもとに行う。知識ベース340には、図106に示し
た項目の他に、図112に示す如く、各用語、常識単語対
応にこの用語、単語が検索項目となるか否かを示す情報
345が入っており、各フィールド名称は、この知識ベ
ースとのマッチングによって検索項目になるか否かを判
断する。図111は検索項目選択処理A2401のフロー
チャート、図112はその動作を説明するための知識ベー
スの内容の1例を示す。ステップA2601とステップ
A2602で項目名称(フィールド名称)と知識ベース
340の用語、あるいは常識単語341とのマッチング
を行う。マッチングする用語あるいは単語が知識ベース
340中に有れば、ステップA2605で検索情報34
5をみて検索項目と成り得るかチェックする。マッチン
グする用語あるいは単語が知識ベース中になければ、ス
テップA2603で常識単語を使い項目名称の語尾単語
をチェックし、該当の常識単語をみつけ検索項目と成り
得るかチェックを行う。例えば図112に示す如く、項目
名称が記号103で示され、知識ベースの用語部と常識
単語部が記号341で示される内容となっていた場合、
検索項目は、「顧客コード」、「部品コード」の2つと
なる。次に選出してきた検索項目に対し、検索するファ
イルとファイルの上の検索項目を選び出し、ロジックを
生成する(ステップA2403)。
Selection of a search item is performed based on information in the knowledge base 340. In addition to the items shown in FIG. 106, the knowledge base 340 contains information 345 indicating whether or not each term and common word correspond to each term and common word as shown in FIG. It is determined whether each field name becomes a search item by matching with this knowledge base. FIG. 111 is a flowchart of the search item selection process A2401, and FIG. 112 shows an example of the contents of a knowledge base for explaining the operation. In step A2601 and step A2602, matching between the item name (field name) and the term in the knowledge base 340 or the common sense word 341 is performed. If there is a matching term or word in the knowledge base 340, the search information 34 in step A2605.
Check if it can be a search item by looking at 5. If the matching term or word is not in the knowledge base, the ending word of the item name is checked using common sense words in step A2603, and it is checked whether the corresponding common sense word can be found and becomes a search item. For example, as shown in FIG. 112, when the item name is indicated by the symbol 103 and the term part and common sense word part of the knowledge base have the contents indicated by the symbol 341.
The search items are “customer code” and “part code”. Next, for the selected search item, a file to be searched and a search item on the file are selected, and logic is generated (step A2403).

【0173】検索するファイルと項目のサーチ処理は、
指定された全ファイルの項目と検索項目名称とのマッチ
ング処理、検索項目名称を同意語に変換して全ファイル
の項目とのマッチング処理、常識単語を使って項目名称
を切り出し、切り出した単語を多く持つファイルの項目
を選択する処理という3段階で行う。
The search processing for the file and item to be searched is as follows.
Matching processing of all specified file items and search item names, conversion of search item names to synonyms and matching processing of all file items, extraction of item names using common sense words, many words extracted This is performed in three stages, ie, a process of selecting an item of the file to be held.

【0174】図113(A)、図113(B)は上記サーチ処
理の流れを説明する図である。ステップA2701で項
目名称をデータ項目の1として含むファイルを指定ファ
イル800〜800Cの中から捜す。あれば、そのファ
イルと項目が求めるものである。なければ、ステップA
2702で、項目名称を知識ベース340を使い同意語
変換する。ステップA2703で上記変換した同意語を
データ項目として含むファイルをサーチする。なけれ
ば、ステップA2704で常識単語を使い項目名称から
語尾単語を常識単語を使い切り出す。ステップA270
5では、上記切り出した単語をデータ項目として持つフ
ァイルを捜す。見つかったファイルが一つの場合は、そ
れが求めるものである。ない場合は、ファイル名と項目
を「?」マークとしてロジックの組み立てを行う。2つ
以上のファイルが候補として選択された場合、ステップ
A2706で項目名称から知識ベースにある常識単語を
見つける。次のステップA2707で、候補としてあが
ったファイル中のデータ項目の名称中で、上記ステップ
A2706でに切り出した単語が一番多く含まれている
ものを見つける。2つ以上の候補が未だ絞り切れない場
合、ステップA2708で、上記切り出した単語を同意
語に変換し、これらの同意語を用いて上記候補となった
データ項目の名称を再度チェックし、ステップA270
9で絞り込む。このようにして最終的に一つの検索項目
に対し、一つの検索ファイルと一つの検索項目が決定さ
れる。
FIG. 113 (A) and FIG. 113 (B) are diagrams for explaining the flow of the search processing. In step A2701, a file containing the item name as a data item 1 is searched from the designated files 800 to 800C. If so, that file and item are what you want. If not, step A
At 2702, the item names are converted into synonyms using the knowledge base 340. In step A2703, a file containing the converted synonym as a data item is searched. If not, in step A2704, common words are used and the ending word is extracted from the item name using common words. Step A270
In step 5, a file having the extracted word as a data item is searched for. If only one file is found, it is what you want. If not, assemble the logic using the file name and item as the "?" Mark. If two or more files are selected as candidates, a common word in the knowledge base is found from the item name in step A2706. In the next step A2707, the name of the data item in the file which has been selected as a candidate and which contains the most words cut out in the above step A2706 is found. If two or more candidates cannot be narrowed down yet, in step A2708, the extracted words are converted into synonyms, and the names of the candidate data items are checked again using these synonyms.
9 to narrow down. In this way, one search file and one search item are finally determined for one search item.

【0175】図114(A)、図114(B)は、上述のサー
チ処理の動作例である。ここでは記号700で示される
値をもつ商品コードが検索項目である。記号810はデ
ータファイル800A,800B中のデータ項目を示
す。記号341と342は、知識ベースの常識単語に登
録されている単語とその同意語を示す。まずステップA
2801で検索項目名称「商品コード」とファイルの項
目とをマッチングする。一致するものがないため、次に
「商品コード」の同意語変換を試みるが、この場合、知
識データベースに「商品コード」がない為、同意語での
マッチングは行なわない。次にステップA2803で検
索項目名称の語尾単語を常識単語を用いて切り出す。こ
の例では文字列「コード」が切り出される。上記語尾単
語をもとにステップA2804でファイルのデータ項目
810を捜すと「品コード」と「コード」が候補として
選択される。ステップA2805で、「商品コード」を
常識単語を使って「商品」と「コード」に分ける。「コ
ード」は既に、語尾単語として処理済みである為、ステ
ップA2806では候補となったデータ項目の中から
「商品」を含んでいるデータ項目をサーチする。この場
合「品コード」も「コード」も「商品」は含んでいな
い。そこでステップA2807で、「商品」を常識単語
部に登録してある同意語342を用いて同意語「品」に
変換する。ステップA2808で上記候補データ項目の
中から同意語の「品」を含むものを選択する。これによ
って「品コード」が選択される。この例では、以上の処
理方式によって、検索項目「商品コード」に対応する検
索ファイル名は「A」、検索に用いるファイル中の項目
名は「品コード」と決定される。
FIGS. 114 (A) and 114 (B) are operation examples of the above-described search processing. Here, the product code having the value indicated by the symbol 700 is the search item. A symbol 810 indicates a data item in the data files 800A and 800B. Symbols 341 and 342 indicate words registered as common sense words in the knowledge base and their synonyms. Step A
At 2801, the search item name "product code" is matched with the item of the file. Since there is no match, the synonym conversion of the "product code" is tried next, but in this case, since there is no "product code" in the knowledge database, matching with the synonym is not performed. Next, in step A2803, the ending word of the search item name is cut out using common sense words. In this example, a character string “code” is cut out. When the data item 810 of the file is searched for in step A2804 based on the above ending word, “article code” and “code” are selected as candidates. In step A2805, the “product code” is divided into “product” and “code” using common sense words. Since “code” has already been processed as an end word, in step A2806, a data item including “product” is searched from among the candidate data items. In this case, neither “article code” nor “code” includes “article”. Therefore, in step A2807, "product" is converted into a synonym "product" using the synonym 342 registered in the common sense word part. In step A2808, a candidate data item including the synonym “product” is selected from the candidate data items. As a result, the "article code" is selected. In this example, the search file name corresponding to the search item “product code” is determined to be “A”, and the item name in the file used for the search is determined to be “article code” by the above processing method.

【0176】決定された検索ファイル名とデータ項目名
をもとに図109のステップA2403でロジックを組み
立てる。組み立てられたロジックの1例を図115に示
す。図においてステップA2901はファイルのオープ
ン処理、ステップA2902はオペレータにより入力さ
れたデータをもとに該当レコードをファイルから読み出
す処理である。ステップA2903で該当レコードがな
ければ、ステップA2903でエラーメッセージを出力
し、ステップA2904で再入力待ちとなる。該当レコ
ードが有れば、ステップA2905で検索ファイルをク
ローズするというロジックを組み立てる。尚、ファイル
からの読出しコードは、メモリ上の作業領域に記憶され
る。
The logic is assembled at step A2403 in FIG. 109 based on the determined search file name and data item name. FIG. 115 shows an example of the assembled logic. In the figure, step A2901 is a file open process, and step A2902 is a process of reading a corresponding record from a file based on data input by an operator. If there is no corresponding record in step A2903, an error message is output in step A2903, and the process waits for re-input in step A2904. If there is a corresponding record, logic is assembled to close the search file in step A2905. The code read from the file is stored in a work area on the memory.

【0177】図108の演算項目処理手続の作成ステップ
A2302では、合計の項目を除き基本的に知識ベース
340の用語、単語対応に予め登録されている実行処理
ルール344に従って作成する。知識ベース340にル
ールが記述されていない場合は、先の検索項目処理でデ
ータファイルから検索して来たレコードの中から該当の
項目を設定し画面に表示するというロジックを組み込
む。知識ベース340の演算ルールには、図116に示す
ように範囲ルール344Aと実行処理ルール344Bが
ある。演算項目は、その名称と知識データベースに登録
されている用語または単語との1:1マッチング、同意
語と用語または単語との1:1マッチング、常識単語部
の単語をもとにした名称の切り出しによるサーチを行
い、該当するルールを捜してくる。
In step A2302 of creating the calculation item processing procedure in FIG. 108, the calculation items are basically created in accordance with the execution processing rules 344 registered in advance in the knowledge base 340 corresponding to the terms and words except for the total items. If the rule is not described in the knowledge base 340, a logic for setting the corresponding item from among the records retrieved from the data file in the previous retrieval item processing and displaying it on the screen is incorporated. The calculation rules of the knowledge base 340 include a range rule 344A and an execution processing rule 344B as shown in FIG. The calculation items are 1: 1 matching between the name and the term or word registered in the knowledge database, 1: 1 matching between the synonym and the term or word, and extraction of the name based on the word in the common sense word part To search for the applicable rule.

【0178】知識データのこの実行処理ルールには、日
付や時刻のルールと、項目名や性質を使った演算ルール
とがある。日付時刻のルールは、暦を表示したり、時刻
を求めて表示するための関数処理ルールである。項目名
を使った演算ルールは、ファイル中の項目名を用いて項
算式が記入してあるので、この記述されている項目名を
捜し、記述通りにロジックを組み立てて行く。性質を使
った演算のルールは、伝票や帳票、ファイル中の項目
で、指定される性質を持つものの合計を一つとして演算
が行えるものである。図116には、1例として、「単
価」という性質をもつ項目の全ての和と「数量」という
性質を持つ項目の和を乗算する例が示されている。知識
ベースに登録されている性質340は、用語又は単語対
応に、その用語、単語の特色を表わしている。上記性質
は、例えば346´に示す8種類のものがあり、オペレ
ータの追加、変更が可能である。この性質を伴った演算
ルールは、「Σ性質」で表現する。
The execution processing rules for knowledge data include date and time rules and operation rules using item names and properties. The date / time rule is a function processing rule for displaying a calendar or obtaining and displaying a time. In an operation rule using an item name, a term expression is entered using an item name in a file, so the item name described is searched for, and logic is assembled as described. The rule of the calculation using the property is that the calculation can be performed with the sum of the items in the slip, the form, and the file having the specified property as one. FIG. 116 shows an example in which the sum of all the items having the property of “unit price” is multiplied by the sum of the items having the property of “quantity”. The property 340 registered in the knowledge base indicates the characteristic of the term or word corresponding to the term or word. The above properties include, for example, eight types shown at 346 ', and an operator can be added or changed. An operation rule with this property is expressed by “Σ property”.

【0179】範囲ルールは、その項目の入力された値の
範囲をチェックするルールであり、生成するロジックの
1例を図117に示す。図において、ステップA3101
は範囲内であるか否かのチェック処理、ステップA31
02はエラーメッセージを出力する処理、ステップA3
103は再入力待ちの処理である。
The range rule is a rule for checking the range of the input value of the item, and an example of the generated logic is shown in FIG. In the figure, step A3101
Is a check process of whether or not it is within the range, step A31
02 is a process for outputting an error message, step A3
Reference numeral 103 denotes a process of waiting for re-input.

【0180】演算項目の1つである「合計」の項目は、
知識データベースに演算式がなくてもロジックを生成す
ることができる。「合計」は、一般的にその位置で何の
項目の合計を取るのかが理解出来る。例えば図118
(A)に示す表の記号アで示す欄は、合計欄の上の位置
にある金額の合計を取れば良い。又、図(B)に示す表
の記号イで示す合計は、上記(A)と同様に上にある金
額の合計を、記号エで示す総計は、上にある記号ウの税
額と記号イの合計の総計を取れば良い。このように合計
は、上に位置する項目で「合計の性質を持つ項目」まで
の和を取るロジックを生成する。図(C)に示す表の記
号オのように、明細の項目の一つとして合計が有る場合
は、実行処理ルールに従ってロジックを生成する。ま
た、図(D)に示す表の記号カのように合計の欄が離れ
ている場合は、合計の項目名称から処理する項目を捜し
出し、その項目の和を取るロジックを生成する。以上、
述べた方式によって認識情報から業務プログラムの生成
が行なわれる。
The item of “total” which is one of the operation items is
Logic can be generated without an arithmetic expression in the knowledge database. "Sum" generally indicates what items are summed at that position. For example, FIG.
In the column indicated by the symbol a in the table shown in FIG. 7A, the sum of the amounts of money at the position above the total column may be calculated. Further, the sum indicated by the symbol a in the table shown in FIG. 2B is the sum of the amount of money above the same as in the above (A), and the total indicated by the symbol D is the sum of the tax amount of the symbol c above and the symbol You only need to take the total sum. In this way, the sum generates logic that takes the sum of the items located above and “the items having the properties of the sum”. When there is a total as one of the items of the specification as in the symbol o in the table shown in FIG. 9C, the logic is generated according to the execution processing rule. Further, when the total column is distant as indicated by the symbol F in the table shown in FIG. 4D, the item to be processed is searched for from the total item name, and logic for obtaining the sum of the items is generated. that's all,
The business program is generated from the recognition information by the method described above.

【0181】印刷ステップA307では、図119で示す
ように、認識情報中の入出力フィールドの位置、幅、長
さを使用してプログラムの実行結果を指定の用紙に指の
位置に印刷することができる。記号EX100で示す伝
票を入力し、認識し、記号A305で示す認識情報が出
来る。記号A209´に示す画面を表示してプログラム
を実行させ、実行結果は、項目名と一緒にデータファイ
ルA370に格納される。印刷は、上記実行結果として
記憶されている各項目と一致する認識情報を認識情報フ
ァイルA350から捜し出し、その領域位置に結果デー
タを印刷する。このとき認識情報中の領域に入る文字数
から印刷すべき文字フォントの大きさを求め、その文字
の大きさで結果データを印刷することが出来る。この方
式により、オペレータは、印刷用のデータストリームを
組み立てる必要なく、すきな位置に、すきな文字の大き
さで印刷を行うことが出来る。
In the printing step A307, as shown in FIG. 119, the execution result of the program is printed on the designated sheet at the finger position using the position, width and length of the input / output field in the recognition information. it can. A slip indicated by the symbol EX100 is input and recognized, and recognition information indicated by the symbol A305 is generated. The screen indicated by the symbol A209 'is displayed to execute the program, and the execution result is stored in the data file A370 together with the item name. In printing, the recognition information that matches each item stored as the execution result is searched from the recognition information file A350, and the result data is printed at the area position. At this time, the size of the character font to be printed is obtained from the number of characters included in the area in the recognition information, and the result data can be printed in the size of the character. According to this method, the operator can print at a desired position with a desired character size without having to assemble a data stream for printing.

【0182】次に、本発明による帳票処理システムの装
置構成の変形例について説明する。
Next, a description will be given of a modification of the device configuration of the form processing system according to the present invention.

【0183】図120は、システムを1台のデータ処理装
置92を用いて構成した場合のブロック構成図を示す。
データ処理装置92には、文書構造認識機構921、プ
ログラム生成機構922及び実行機構923が含まれて
いる。画像入力を行なう画像入力装置93、プリント出
力を行なう出力装置95、データの入力あるいは修正を
行なうためのディスプレイ911とキーボード912を
備えたディスプレイ端末装置(コンソール)91がデー
タ処理装置60に接続されている。
FIG. 120 is a block diagram showing a case where the system is configured using one data processing device 92.
The data processing device 92 includes a document structure recognition mechanism 921, a program generation mechanism 922, and an execution mechanism 923. An image input device 93 for inputting an image, an output device 95 for print output, and a display terminal device (console) 91 having a display 911 and a keyboard 912 for inputting or correcting data are connected to the data processing device 60. I have.

【0184】このような構成とすることによって、1台
の処理装置によってプログラムの開発、変更を行うこと
ができる。
With such a configuration, the program can be developed and changed by one processing device.

【0185】図121は、本発明による帳票処理システム
を1台のデータ処理装置92と複数台のディスプレイ端
末装置91A、91Bによって構成した例である。
FIG. 121 shows an example in which the form processing system according to the present invention is constituted by one data processing device 92 and a plurality of display terminal devices 91A and 91B.

【0186】データ処理装置92には、文書構造認識機
構921、プログラム生成機構922及び実行機構92
3が含まれている。端末装置91A、91Bは、それぞ
れデータ伝送路40A、40Bによってデータ処理装置
92に接続されており、データ入力あるいは修正を行な
うためのディスプレイとキーボードを有している。さら
に、画像入力装置93は端末装置91Aに接続されてお
り、入力された画像データは端末装置91Aおよびデー
タ伝送路40Aを介してデータ処理装置92に伝えられ
るようになっている。また、プリント出力を行なう出力
装置95は端末装置91Bに接続されており、データ処
理装置92からの出力データは、データ伝送路40Bお
よび端末装置91Bを介して出力されるようになってい
る。
The data processing device 92 includes a document structure recognition mechanism 921, a program generation mechanism 922, and an execution mechanism 92.
3 are included. The terminal devices 91A and 91B are connected to the data processing device 92 by data transmission paths 40A and 40B, respectively, and have a display and a keyboard for performing data input or correction. Further, the image input device 93 is connected to the terminal device 91A, and the input image data is transmitted to the data processing device 92 via the terminal device 91A and the data transmission path 40A. An output device 95 for performing print output is connected to the terminal device 91B, and output data from the data processing device 92 is output via the data transmission path 40B and the terminal device 91B.

【0187】このような構成とすることによって、1台
の端末装置から開発作業を行ない、他方の端末装置から
処理の実行や変更作業を行なうといった使い分けが可能
になる。また、データ伝送路40A、40Bの距離を長
くすることによって、離れた場所での開発、実行や変更
が可能になる。
By adopting such a configuration, it is possible to use one terminal device for development work and the other terminal device for executing or changing processing. In addition, by increasing the distance between the data transmission paths 40A and 40B, development, execution, and change at a remote location become possible.

【0188】図122は、本発明による帳票処理システム
を複数台のデータ処理装置から構成した例である。
FIG. 122 is an example in which the form processing system according to the present invention is composed of a plurality of data processing devices.

【0189】データ処理装置92Aには、画像入力装置
93が接続されており、画像入力を行なう。
An image input device 93 is connected to the data processing device 92A to input an image.

【0190】データ処理装置92Bには認識機構921
が含まれており、データ処理装置92Aからの画像デー
タをコード形式のデータ及び属性データに変換する。
The data processor 92B has a recognition mechanism 921.
And converts the image data from the data processing device 92A into code format data and attribute data.

【0191】データ処理装置92Cには生成機構922
が含まれており、コード形式のデータ及び属性データに
基づいて生成機構922で処理手続き(プログラム)の
生成を行なう。
The data processing device 92C includes a generation mechanism 922.
Are generated, and the generation mechanism 922 generates a processing procedure (program) based on the data in the code format and the attribute data.

【0192】データ処理装置92Dは、実行機構923
を含んでおり処理手続きを実行する。このためデータを
入力する入力装置912Dとプリント出力する出力装置
95が接続されている。
The data processing device 92D includes an execution mechanism 923
And execute the processing procedure. Therefore, an input device 912D for inputting data and an output device 95 for printing out are connected.

【0193】データ処理装置92Eは、ディスプレイ9
11Eとキーボード912Eを備えており、認識機構9
21の出力情報の修正を行なう。
The data processing device 92E includes a display 9
11E and a keyboard 912E.
21 output information is corrected.

【0194】データ処理装置92Fは、ディスプレイ9
11Eとキーボード912Eを備えており、生成機構9
22の出力した処理手続きの修正を行なう。
The data processing device 92F is connected to the display 9
11E and a keyboard 912E.
The processing procedure output from 22 is corrected.

【0195】これらのデータ処理装置は、ローカルエリ
アネットワークのような伝送路41により結合されてい
る。尚、データ処理装置間のデータの伝送には、出力デ
ータを一旦フロッピーディスク媒体に入れてデータを持
ち運ぶといった方法を採用することも可能である。
These data processing devices are connected by a transmission line 41 such as a local area network. For data transmission between the data processing devices, it is also possible to adopt a method in which output data is temporarily stored in a floppy disk medium to carry the data.

【0196】このような構成とすることによって、負荷
の分散が可能となる。また、各データ処理装置の代り
に、より低価格な代用機を利用することが可能になる。
例えば、データ処理装置92Aに代りにファクシミリ装
置を用いてもよいし、データ処理装置92Eとして安価
なパーソナルコンピュータを用いることも可能である。
With this configuration, the load can be distributed. Further, it is possible to use a lower-cost substitute machine instead of each data processing device.
For example, a facsimile device may be used instead of the data processing device 92A, or an inexpensive personal computer may be used as the data processing device 92E.

【0197】[0197]

【発明の効果】以上述べたように、本発明によれば、帳
票の書式が記載された用紙を画像として入力するだけ
で、データ入力あるいは帳票発行のための書式情報(罫
線,円弧,斜線,破線,文字,フィールド位置,フィー
ルド属性など)、あるいは帳票作成プログラムなどを、
自動的に定義することができるため、新たなデータ入力
フォーマットや帳票発行処理を容易にできるという効果
がある。また画像として入力された書式情報を図形コー
ド情報や文字コード情報に自動的に変換できるため、こ
の書式を高画質で表示あるいは印刷ことができる。
As described above, according to the present invention, the format information (ruled line, arc, oblique line, Dashed lines, characters, field positions, field attributes, etc.)
Since it can be automatically defined, there is an effect that a new data input format and a form issuing process can be easily performed. Also, since format information input as an image can be automatically converted into graphic code information and character code information, this format can be displayed or printed with high image quality.

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

【図1】本発明による帳票処理システムの全体構成を示
すシステム構成図
FIG. 1 is a system configuration diagram showing an overall configuration of a form processing system according to the present invention.

【図2】図1に示したシステムで実行する帳票処理プロ
グラムの基本的な動作を示すフローチャート
FIG. 2 is a flowchart showing a basic operation of a form processing program executed by the system shown in FIG. 1;

【図3】画像として入力される帳票の1例を示す図FIG. 3 is a diagram showing an example of a form input as an image

【図4】本発明のシステムから出力される帳票の1例を
示す図
FIG. 4 is a diagram showing an example of a form output from the system of the present invention.

【図5】帳票処理プログラムの実用的なフローチャート
の1例を示す図
FIG. 5 is a diagram showing an example of a practical flowchart of a form processing program.

【図6】画像入力ステップ1で実行されるサブルーチン
のフローチャート
FIG. 6 is a flowchart of a subroutine executed in an image input step 1;

【図7】入力画像と入力画像メモリとの関係を説明する
ための図
FIG. 7 is a diagram for explaining a relationship between an input image and an input image memory;

【図8】帳票書式認識ステップ2で実行されるサブルー
チンの第1の実施例を示すフローチャート
FIG. 8 is a flowchart showing a first embodiment of a subroutine executed in a form format recognition step 2;

【図9】図8の物理構造認識ステップ21で実行される
サブルーチンの詳細を示すフローチャート
FIG. 9 is a flowchart showing details of a subroutine executed in a physical structure recognition step 21 of FIG. 8;

【図10】図9のブロック分割ステップ211の詳細を
示すフローチャート
FIG. 10 is a flowchart showing details of a block dividing step 211 in FIG. 9;

【図11】ブロック分割ステップで用いるテーブルT1
とT2の構成を示す図
FIG. 11 is a table T1 used in a block dividing step;
Showing the configuration of T2 and T2

【図12】ブロック分割を具体的に説明するための画像
の1例を示す図
FIG. 12 is a diagram showing an example of an image for specifically explaining block division;

【図13】図9の領域分割ステップ214の詳細を示す
フローチャート
FIG. 13 is a flowchart showing details of an area dividing step 214 in FIG. 9;

【図14】物理構造認識ステップ21の実行過程を具体
的に説明するための図
FIG. 14 is a diagram for specifically explaining an execution process of a physical structure recognition step 21;

【図15】図9の領域種別認だ識ステップ216の詳細
を示すフローチャート
FIG. 15 is a flowchart showing details of an area type recognition step 216 in FIG. 9;

【図16】図15における左辺認識ステップ216−1の
詳細を示すフローチャート
16 is a flowchart showing details of a left side recognition step 216-1 in FIG.

【図17】左辺認識ステップ216−1で用いられるテ
ーブルT3の構成を示す図
FIG. 17 is a diagram showing a configuration of a table T3 used in a left side recognition step 216-1.

【図18】左辺認識ステップで処理する原画像と認識結
果との具体例を示す図
FIG. 18 is a diagram showing a specific example of an original image processed in the left side recognition step and a recognition result.

【図19】線分の認識結果を格納するために用いるテー
ブルTBL1の構成を示す図
FIG. 19 is a diagram showing a configuration of a table TBL1 used to store a recognition result of a line segment;

【図20】非欄要素の代表的なパターンを示す図FIG. 20 is a diagram showing a typical pattern of a non-column element.

【図21】入力画像から円弧パターンを検出するため処
理の説明図
FIG. 21 is an explanatory diagram of a process for detecting an arc pattern from an input image.

【図22】斜線情報を格納するためのテーブルTBL2
の構成図
FIG. 22 is a table TBL2 for storing oblique line information.
Configuration diagram

【図23】円弧情報を格納するためのテーブルTBL3
の構成図
FIG. 23 is a table TBL3 for storing arc information.
Configuration diagram

【図24】図9の構成要素認識ステップ213の詳細を
示すフローチャート
FIG. 24 is a flowchart showing details of a component recognition step 213 in FIG. 9;

【図25】構成要素の種別判定を説明するための図FIG. 25 is a diagram for explaining the type determination of a component;

【図26】図24における直線認識ステップ2181の詳
細を示すフローチャート
FIG. 26 is a flowchart showing details of a straight line recognition step 2181 in FIG. 24;

【図27】破線の構成要素の条件に関する説明図FIG. 27 is an explanatory diagram related to the condition of a component indicated by a broken line.

【図28】図24における破線認識ステップ2182の詳
細を示すフローチャート
FIG. 28 is a flowchart showing details of a broken line recognition step 2182 in FIG. 24;

【図29】破線テーブルTBL4の構成図FIG. 29 is a configuration diagram of a broken line table TBL4.

【図30】図24における文字認識ステップ2183の詳
細を示すフローチャート
FIG. 30 is a flowchart showing details of a character recognition step 2183 in FIG. 24;

【図31】文字列の構成要素の条件に関する説明図FIG. 31 is an explanatory diagram relating to conditions of components of a character string.

【図32】文字認識ステップの処理過程を説明するため
の図
FIG. 32 is a view for explaining a processing procedure of a character recognition step;

【図33】文字認識結果を格納するためのテーブルTB
L5の構成図
FIG. 33 is a table TB for storing character recognition results;
Configuration diagram of L5

【図34】帳票書式認識ステップ2の他の実施例を示す
フローチャート
FIG. 34 is a flowchart showing another embodiment of the form format recognition step 2;

【図35】図34における前処理ステップ20の詳細を示
すフローチャート
FIG. 35 is a flowchart showing details of preprocessing step 20 in FIG. 34;

【図36】前処理ステップで処理される入力画像の1例
を示す図
FIG. 36 is a diagram showing an example of an input image processed in a preprocessing step

【図37】図34における後処理ステップ29の詳細を示
すフローチャート
FIG. 37 is a flowchart showing details of post-processing step 29 in FIG. 34;

【図38】図37における線の修正処理ステップ291の
詳細を示すフローチャート
FIG. 38 is a flowchart showing details of a line correction processing step 291 in FIG. 37;

【図39】図37における文字の修正処理ステップ292
の詳細を示すフローチャート
FIG. 39 shows a character correction processing step 292 in FIG. 37.
Flow chart showing details of

【図40】単語情報を格納するためのテーブルTBL6
の構成図
FIG. 40 is a table TBL6 for storing word information.
Configuration diagram

【図41】帳票書式認識ステップ2の他の実施例を示す
フローチャート
FIG. 41 is a flowchart showing another embodiment of the form format recognition step 2;

【図42】図41における論理構造認識ステップ22の第
1の実施例を示すフローチャート
FIG. 42 is a flowchart showing a first embodiment of a logical structure recognition step 22 in FIG. 41;

【図43】図42における行桁正規化ステップの詳細を示
すフローチャート
FIG. 43 is a flowchart showing details of a row / column normalization step in FIG. 42;

【図44】行桁正規化ステップで用いるテーブルTBL
7の構成図
FIG. 44 is a table TBL used in a row / column normalization step;
Configuration diagram of 7

【図45】文字等のパターンの基準点を説明するための
FIG. 45 is a view for explaining reference points of a pattern such as a character;

【図46】論理構造認識ステップの他の実施例を示すフ
ローチャート
FIG. 46 is a flowchart showing another embodiment of the logical structure recognition step.

【図47】図46におけるフィールド位置認識ステップ2
22の詳細を示すフローチャート
FIG. 47: Field position recognition step 2 in FIG. 46
Flowchart showing details of 22

【図48】フィールド位置認識を容易にするために行な
われる表形式正規化処理を説明するための図
FIG. 48 is an exemplary view for explaining tabular normalization processing performed to facilitate field position recognition;

【図49】フィールドテーブルTBL8の構成図FIG. 49 is a configuration diagram of a field table TBL8.

【図50】フィールド位置認識の実行結果の1例を説明
するための図
FIG. 50 is a view for explaining an example of an execution result of field position recognition;

【図51】図41における論理構造認識ステップ22の他
の実施例を示すフローチャート
FIG. 51 is a flowchart showing another embodiment of the logical structure recognition step 22 in FIG. 41;

【図52】図51におけるフィールド関係認識ステップ2
23の詳細を示すフローチャート
FIG. 52: Field relation recognition step 2 in FIG. 51
Flowchart showing details of 23

【図53】ユニット情報を格納するためのテーブルT4
の構成図
FIG. 53 is a table T4 for storing unit information.
Configuration diagram

【図54】フィールド関係認識結果の1例を示す図FIG. 54 is a view showing an example of a field relationship recognition result;

【図55】図51におけるフィールド属性認識ステップ2
24の詳細を示すフローチャート
FIG. 55: Field attribute recognition step 2 in FIG. 51
24 is a flowchart showing the details of

【図56】図55の名称マッチングステップ2242で参
照される各種のテーブルにKNW1の構成図
FIG. 56 is a view showing the configuration of KNW1 in various tables referred to in the name matching step 2242 in FIG. 55;

【図57】図55の名称マッチングステップ2242で参
照される各種のテーブルにKNW2の構成図
FIG. 57 is a configuration diagram of KNW2 in various tables referred to in the name matching step 2242 of FIG. 55;

【図58】図55の名称マッチングステップ2242で参
照される各種のテーブルにKNW3の構成図
FIG. 58 is a view showing the configuration of KNW3 in various tables referred to in the name matching step 2242 in FIG. 55;

【図59】図55の名称マッチングステップ2242で参
照される各種のテーブルにKNW4の構成図
FIG. 59 is a configuration diagram of KNW4 in various tables referred to in the name matching step 2242 in FIG. 55;

【図60】フィールド属性認識ステップ224で参照さ
れる各種の属性情報設定テーブルTBL9の構成図
FIG. 60 is a configuration diagram of various attribute information setting tables TBL9 referred to in a field attribute recognition step 224.

【図61】フィールド属性認識ステップ224で参照さ
れる各種の属性情報設定テーブルTBL10の構成図
FIG. 61 is a configuration diagram of various attribute information setting tables TBL10 referred to in a field attribute recognition step 224.

【図62】フィールド属性認識ステップ224で参照さ
れる各種の属性情報設定テーブルTBL11の構成図
FIG. 62 is a configuration diagram of various attribute information setting tables TBL11 referred to in a field attribute recognition step 224.

【図63】フィールド属性認識ステップ224で参照さ
れる各種の属性情報設定テーブルTBL12の構成図
FIG. 63 is a configuration diagram of various attribute information setting tables TBL12 referred to in a field attribute recognition step 224.

【図64】フィールド属性認識ステップ224で参照さ
れる各種の属性情報設定テーブルTBL13の構成図
FIG. 64 is a configuration diagram of various attribute information setting tables TBL13 referred to in a field attribute recognition step 224.

【図65】フィールド属性認識ステップ224で参照さ
れる各種の属性情報設定テーブルTBL14の構成図
FIG. 65 is a configuration diagram of various attribute information setting tables TBL14 referred to in a field attribute recognition step 224.

【図66】帳票論理構造認識により形成されるテーブル
TBL9〜TBL14の内容の具体例を示す図
FIG. 66 is a diagram showing a specific example of the contents of tables TBL9 to TBL14 formed by form logical structure recognition;

【図67】帳票書式認識ステップ2の第3の実施例を示
すフローチャート
FIG. 67 is a flowchart showing a third embodiment of the form format recognition step 2;

【図68】図67における帳票作成プログラム生成ステッ
プ23の詳細を示すフローチャート
68 is a flowchart showing details of a form creation program generation step 23 in FIG. 67.

【図69】生成ステップ23で生成されるプログラムの
1例を示す図
FIG. 69 is a view showing an example of a program generated in a generation step 23;

【図70】図68における入出力フィールド処理生成ステ
ップ235の詳細を示すフローチャート
70 is a flowchart showing details of an input / output field processing generation step 235 in FIG. 68.

【図71】図2における帳票作成ステップ3の1実施例
を示すフローチャート
FIG. 71 is a flowchart showing one embodiment of a form creation step 3 in FIG. 2;

【図72】図71における印刷書式データ生成ステップ3
9の詳細を示すフローチャート
72 is a print format data generation step 3 in FIG. 71.
9 is a flowchart showing details of

【図73】ビットマップ形式の印刷書式データの生成に
ついての詳細図
FIG. 73 is a detailed diagram of generation of print format data in a bitmap format.

【図74】コマンドシーケンス形式の印刷書式データの
生成についての説明図
FIG. 74 is an explanatory diagram of generation of print format data in a command sequence format.

【図75】帳票作成ステップ3の他の実施例を示すフロ
ーチャート
FIG. 75 is a flowchart showing another embodiment of form creation step 3;

【図76】印刷して出力される帳票の1例を示す図FIG. 76 is a view showing an example of a form printed and output;

【図77】印刷して出力される帳票の1例を示す図FIG. 77 is a view showing an example of a form printed and output;

【図78】帳票作成ステップ3の更に他の実施例を示す
フローチャート
FIG. 78 is a flowchart showing still another embodiment of the form creation step 3;

【図79】図78における帳票内容データ作成ステップの
実施例を示すフローチャート
FIG. 79 is a flowchart showing an embodiment of a form content data creation step in FIG. 78;

【図80】原稿となる帳票の1例を示す図FIG. 80 is a diagram showing an example of a form serving as a manuscript

【図81】内容の追加された発行帳票の1例を示す図FIG. 81 is a diagram showing an example of an issue form to which contents have been added;

【図82】帳票内容データ作成ステップ33の第2の実
施例を示すフローチャート
FIG. 82 is a flowchart showing a second embodiment of the form content data creation step 33;

【図83】図82のステップ334で検索されるファイル
の1例を示す図
FIG. 83 is a view showing an example of a file searched in step 334 of FIG. 82;

【図84】帳票内容データ作成ステップ33の第3の実
施例を示すフローチャート
FIG. 84 is a flowchart showing a third embodiment of the form content data creation step 33;

【図85】帳票内容データ作成ステップ33の第4の実
施例を示すフローチャート
FIG. 85 is a flowchart showing a fourth embodiment of the form content data creation step 33;

【図86】本発明システムの動作の1例を説明するため
の帳票と画面のフロー図
FIG. 86 is a flowchart of a form and a screen for explaining an example of the operation of the system of the present invention.

【図87】図86の動作と対応するデータのフロー図FIG. 87 is a data flow diagram corresponding to the operation in FIG. 86;

【図88】認識処理の流れを示すフローチャートおよび
認識処理で扱う伝票の様式例を示す図
FIG. 88 is a flowchart showing the flow of recognition processing and a diagram showing an example of a form of a slip handled in the recognition processing.

【図89】セルの認識処理の流れを示すフローチャートFIG. 89 is a flowchart showing the flow of a cell recognition process;

【図90】補正する線分の例を示す図FIG. 90 is a diagram showing an example of a line segment to be corrected;

【図91】領域分割処理の中間状態を示す模式図FIG. 91 is a schematic view showing an intermediate state of the area division processing;

【図92】認識する文字列の例を示す図FIG. 92 is a diagram showing an example of a character string to be recognized;

【図93】同一行列の文字を対象に意味のある文字列の
切り出し処理を説明するための説明図
FIG. 93 is an explanatory diagram for explaining a process of extracting a meaningful character string from characters in the same matrix;

【図94】複数行列で一つの意味を持つ場合の文字列を
切り出す処理を説明するための説明図
FIG. 94 is an explanatory diagram for describing a process of cutting out a character string when a plurality of matrices have one meaning

【図95】セルと文字列の位置関係の例を示す例示図FIG. 95 is an exemplary view showing an example of a positional relationship between a cell and a character string.

【図96】入出力フィールドの設定処理を示すフローチ
ャート
FIG. 96 is a flowchart showing input / output field setting processing;

【図97】見出しのセルと入出力フィールドとの結び付
け処理を説明するための説明図
FIG. 97 is an explanatory diagram for describing a process of linking a heading cell to an input / output field;

【図98】見出しつきセルにおけるフィールドの設定例
を示す例示図
FIG. 98 is an exemplary view showing an example of setting fields in a cell with a heading.

【図99】文字列の意味によるフィールドの設定処理を
説明するための説明図
FIG. 99 is an explanatory diagram for describing field setting processing based on the meaning of a character string;

【図100】文字列の意味により設定されるフィールド
の例示図
FIG. 100 is an exemplary view of a field set according to the meaning of a character string;

【図101】見出し文字とフィールドセルの結び付け処
理を説明するための説明図
FIG. 101 is an explanatory diagram for explaining a linking process between a heading character and a field cell;

【図102】セルで囲まれていない文字列により作成さ
れたフィールドの1例を示す図
FIG. 102 is a diagram showing an example of a field created by a character string not surrounded by cells

【図103】認識情報の内容を示す例示図FIG. 103 is an exemplary view showing contents of recognition information.

【図104】文字数の求め方を説明するための説明図FIG. 104 is an explanatory diagram for explaining how to obtain the number of characters;

【図105】マトリックス型の場合のフィールド名称の
付け方を示す説明図
FIG. 105 is an explanatory view showing how to assign field names in the case of a matrix type.

【図106】知識ベースの内容の1例を示す図FIG. 106 is a diagram showing an example of the contents of a knowledge base.

【図107】知識ベースとのマッチング処理を説明する
ための図
FIG. 107 is a view for explaining a matching process with a knowledge base.

【図108】処理プログラム作成処理を示すフローチャ
ート
FIG. 108 is a flowchart showing processing program creation processing;

【図109】ファイル検索項目の処理手続き作成処理を
示すフローチャート
FIG. 109 is a flowchart showing a file search item processing procedure creation process;

【図110】ファイル検索項目と処理項目の1例を示す
FIG. 110 shows an example of a file search item and a processing item.

【図111】検索項目の選択処理の流れを示すフローチ
ャート
FIG. 111 is a flowchart showing the flow of a search item selection process;

【図112】検索項目の選択処理を説明するための説明
FIG. 112 is an explanatory diagram for explaining search item selection processing;

【図113】検索するファイルと検索項目となる項目の
サーチ処理の流れを示すフローチャート
FIG. 113 is a flowchart showing the flow of a search process for a file to be searched and an item to be a search item;

【図114】検索項目のサーチ処理を説明するための説
明図および検索項目のサーチ処理の流れを示すフローチ
ャート、
FIG. 114 is an explanatory diagram for explaining search processing of a search item and a flowchart showing the flow of search processing for a search item;

【図115】決定された検索ファイルと項目に基づくロ
ジック組み立て結果のフローチャートの1例を示す図
FIG. 115 is a diagram showing an example of a flowchart of a logic assembly result based on the determined search file and item.

【図116】知識ベースの演算ルールの記述を説明する
ための説明図
FIG. 116 is an explanatory diagram for describing the description of a knowledge-based calculation rule;

【図117】範囲チェックロジック組み立て処理の結果
を示すフローチャートの1例を示す図
FIG. 117 is a view showing an example of a flowchart showing a result of the range check logic assembling process;

【図118】「合計」の求め方を説明するための図FIG. 118 is a view for explaining how to calculate “total”;

【図119】印刷処理の流れを説明するための図FIG. 119 is an exemplary view for explaining the flow of print processing;

【図120】本発明による帳票処理システムの変形例の
構成例を示す図
FIG. 120 is a diagram showing a configuration example of a modification of the form processing system according to the present invention;

【図121】本発明による帳票処理システムの変形例の
構成例を示す図
FIG. 121 is a diagram showing a configuration example of a modification of the form processing system according to the present invention.

【図122】本発明による帳票処理システムの変形例の
構成例を示す図
FIG. 122 is a diagram showing a configuration example of a modification of the form processing system according to the present invention;

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

91…コンソール、92…プロセッサ、93…画像入力
装置、95…プリンタ、1…画像入力プログラム、2…
帳票書式認識プログラム、3…帳票作成プログラム、4
…帳票出力プログラム。
91 console, 92 processor, 93 image input device, 95 printer, 1 image input program, 2
Form format recognition program, 3 ... form creation program, 4
… Form output program.

─────────────────────────────────────────────────────
────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成11年10月18日(1999.10.
18)
[Submission date] October 18, 1999 (1999.10.
18)

【手続補正1】[Procedure amendment 1]

【補正対象書類名】図面[Document name to be amended] Drawing

【補正対象項目名】全図[Correction target item name] All figures

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【図2】 FIG. 2

【図3】 FIG. 3

【図4】 FIG. 4

【図8】 FIG. 8

【図1】 FIG.

【図6】 FIG. 6

【図7】 FIG. 7

【図11】 FIG. 11

【図12】 FIG.

【図15】 FIG.

【図17】 FIG.

【図5】 FIG. 5

【図14】 FIG. 14

【図18】 FIG.

【図19】 FIG.

【図20】 FIG.

【図41】 FIG. 41

【図59】 FIG. 59

【図9】 FIG. 9

【図22】 FIG.

【図27】 FIG. 27

【図28】 FIG. 28

【図29】 FIG. 29

【図10】 FIG. 10

【図21】 FIG. 21

【図23】 FIG. 23

【図24】 FIG. 24

【図25】 FIG. 25

【図26】 FIG. 26

【図13】 FIG. 13

【図31】 FIG. 31

【図32】 FIG. 32

【図33】 FIG. 33

【図34】 FIG. 34

【図35】 FIG. 35

【図36】 FIG. 36

【図78】 FIG. 78

【図16】 FIG. 16

【図37】 FIG. 37

【図38】 FIG. 38

【図39】 FIG. 39

【図40】 FIG. 40

【図42】 FIG. 42

【図44】 FIG. 44

【図45】 FIG. 45

【図30】 FIG.

【図46】 FIG. 46

【図48】 FIG. 48

【図49】 FIG. 49

【図50】 FIG. 50

【図51】 FIG. 51

【図53】 FIG. 53

【図56】 FIG. 56

【図57】 FIG. 57

【図65】 FIG. 65

【図80】 FIG. 80

【図43】 FIG. 43

【図58】 FIG. 58

【図60】 FIG. 60

【図61】 FIG. 61

【図62】 FIG. 62

【図63】 FIG. 63

【図67】 FIG. 67

【図47】 FIG. 47

【図54】 FIG. 54

【図64】 FIG. 64

【図71】 FIG. 71

【図73】 FIG. 73

【図52】 FIG. 52

【図74】 FIG. 74

【図75】 FIG. 75

【図76】 FIG. 76

【図79】 FIG. 79

【図81】 FIG. 81

【図55】 FIG. 55

【図66】 FIG. 66

【図70】 FIG. 70

【図77】 FIG. 77

【図83】 FIG. 83

【図89】 FIG. 89

【図68】 FIG. 68

【図72】 FIG. 72

【図90】 FIG. 90

【図69】 FIG. 69

【図92】 FIG. 92

【図95】 FIG. 95

【図96】 FIG. 96

【図100】 FIG. 100

【図82】 FIG. 82

【図85】 FIG. 85

【図86】 FIG. 86

【図99】 FIG. 99

【図102】 FIG. 102

【図108】 FIG. 108

【図84】 FIG. 84

【図87】 FIG. 87

【図91】 FIG. 91

【図93】 FIG. 93

【図97】 FIG. 97

【図88】 FIG. 88

【図98】 FIG. 98

【図101】 FIG. 101

【図105】 FIG. 105

【図120】 FIG. 120

【図94】 FIG. 94

【図103】 FIG. 103

【図104】 FIG. 104

【図106】 FIG. 106

【図107】 FIG. 107

【図109】 FIG. 109

【図110】 FIG. 110

【図112】 FIG. 112

【図116】 FIG. 116

【図111】 FIG. 111

【図113】 FIG. 113

【図114】 FIG. 114

【図115】 FIG. 115

【図117】 FIG. 117

【図118】 FIG. 118

【図119】 FIG. 119

【図121】 FIG. 121

【図122】 FIG. 122

───────────────────────────────────────────────────── フロントページの続き (72)発明者 鈴木 仁 愛知県尾張旭市晴丘町池上1番地 株式会 社日立製作所旭工場内 (72)発明者 山田 昇司 神奈川県川崎市幸区鹿島田890番地の12 株式会社日立製作所情報システム工場内 (72)発明者 松田 敏彦 愛知県尾張旭市晴丘町池上1番地 株式会 社日立製作所旭工場内 (72)発明者 藤瀬 洋 神奈川県横浜市戸塚区戸塚町5030番地 株 式会社日立製作所ソフトウェア工場内 (72)発明者 久野 恵章 神奈川県川崎市幸区鹿島田890番地の12 株式会社日立製作所情報システム工場内 (72)発明者 小合 一太郎 東京都千代田区神田駿河台四丁目6番地 株式会社日立製作所内 ──────────────────────────────────────────────────続 き Continuing on the front page (72) Inventor Jin Suzuki 1 Ikegami, Haruoka-cho, Owariasahi-shi, Aichi Prefecture Inside the Asahi Plant of Hitachi, Ltd. (72) Inventor Toshihiko Matsuda 1 in Ikegami, Haruoka-cho, Owariasahi-shi, Aichi Prefecture In-house Hitachi, Ltd. (72) Inventor Hiroshi Fujise 5030 Totsuka-cho, Totsuka-ku, Yokohama-shi, Kanagawa Japan Stock Company (72) Inventor Keisho Kuno 890 Kashimada, Saiwai-ku, Kawasaki-shi, Kanagawa Prefecture 12 Inside Hitachi Information Systems Factory (72) Inventor Ichitaro Koai 4-6-6-1 Kanda Surugadai, Chiyoda-ku, Tokyo Hitachi, Ltd.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】原文書に記載された帳票を含む画像を入力
し、 入力された画像中の帳票の種類に対応したプログラムを
実行することを特徴とする帳票認識方法。
1. A form recognition method comprising: inputting an image including a form described in an original document; and executing a program corresponding to the type of the form in the input image.
【請求項2】原文書に記載された帳票を含む画像を入力
する入力手段と、 入力された画像中の帳票の種類に対応したプログラムを
実行する制御手段を有することを特徴とする帳票認識装
置。
2. A form recognition apparatus comprising: input means for inputting an image including a form described in an original document; and control means for executing a program corresponding to the type of form in the input image. .
JP11271784A 1989-07-10 1999-09-27 Slip recognizing method and its device Pending JP2000076370A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11271784A JP2000076370A (en) 1989-07-10 1999-09-27 Slip recognizing method and its device

Applications Claiming Priority (7)

Application Number Priority Date Filing Date Title
JP1-175469 1989-07-10
JP17546989 1989-07-10
JP20279489 1989-08-07
JP1-202794 1989-08-07
JP1-246290 1989-09-25
JP24629089 1989-09-25
JP11271784A JP2000076370A (en) 1989-07-10 1999-09-27 Slip recognizing method and its device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2-175246A Division JP3028833B2 (en) 1989-09-25 1990-07-04 Document processing method and program automatic generation method

Publications (1)

Publication Number Publication Date
JP2000076370A true JP2000076370A (en) 2000-03-14

Family

ID=27474644

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11271784A Pending JP2000076370A (en) 1989-07-10 1999-09-27 Slip recognizing method and its device

Country Status (1)

Country Link
JP (1) JP2000076370A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789647A (en) * 2011-05-16 2012-11-21 虹光精密工业股份有限公司 Method and computer program for adding scanned image data to arbitrary work area
JP2019174887A (en) * 2018-03-27 2019-10-10 京セラドキュメントソリューションズ株式会社 Image processing device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102789647A (en) * 2011-05-16 2012-11-21 虹光精密工业股份有限公司 Method and computer program for adding scanned image data to arbitrary work area
JP2019174887A (en) * 2018-03-27 2019-10-10 京セラドキュメントソリューションズ株式会社 Image processing device

Similar Documents

Publication Publication Date Title
JP2000155795A (en) Method and device for document recognition
US4195338A (en) Computer typesetting
KR950006410B1 (en) Image display and processing method of formatted and document and apparatus therefor
US7853869B2 (en) Creation of semantic objects for providing logical structure to markup language representations of documents
KR860001071B1 (en) Method for editing document
JP3425408B2 (en) Document reading device
JPH05113879A (en) Program creation and data processing method
JP2021043478A (en) Information processing device, control method thereof and program
JPH0581473A (en) Method for generating program
JP2000076370A (en) Slip recognizing method and its device
JP3028833B2 (en) Document processing method and program automatic generation method
JPH10301922A (en) Command input method, command input method in the case of inputting character by using software for kana/kanji conversion, and computer readable recording medium recorded with program for executing the method by computer
JP3663865B2 (en) Form processing apparatus and storage medium
JPH06176085A (en) Drawing/parts list generation/control device
JP4405604B2 (en) Information processing apparatus and definition method
JPS5971528A (en) Original forming machine
JPH11316792A (en) Information processor and slip creating method
JPH0452866A (en) Automatic formation system for operation program
JP3976799B2 (en) Table creation processing unit
JP3133385B2 (en) Character editing system
JP3071801B2 (en) Character editing system
JP3142854B2 (en) Character editing system
JPH10320492A (en) Method and device for information processing
JPH08315164A (en) Layout correcting device
JP2000163271A (en) Method and apparatus for information processing