JPH03233670A - Text data conversion system - Google Patents

Text data conversion system

Info

Publication number
JPH03233670A
JPH03233670A JP2028164A JP2816490A JPH03233670A JP H03233670 A JPH03233670 A JP H03233670A JP 2028164 A JP2028164 A JP 2028164A JP 2816490 A JP2816490 A JP 2816490A JP H03233670 A JPH03233670 A JP H03233670A
Authority
JP
Japan
Prior art keywords
line
text data
character
text
line feed
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
JP2028164A
Other languages
Japanese (ja)
Inventor
Yasuo Tanosaki
康雄 田野崎
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.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2028164A priority Critical patent/JPH03233670A/en
Publication of JPH03233670A publication Critical patent/JPH03233670A/en
Pending legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PURPOSE:To edit a text to a general form without requiring troublesome operation by providing a means which deletes an unnecessary space character code and a means which deletes an unnecessary line feed code. CONSTITUTION:A program part 20 is provided with a space character code deleting part 20c which executes the processing to delete the unnecessary space character code from text data and a line feed code deleting part 20d which executes the processing to delete the unnecessary line feed code. A data managing part 30 is provided with a character string temporary storage buffer 30d where text data inputted from an external storage device 40 is stored and a generated character string storage buffer 30h. Consequently, text data is obtained which has unnecessary space character code and line feed code deleted to have the continuity of contents. Thus, edited results are obtained without requiring troublesome operation though it is necessary to edit data into a general text.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、ワードプロセッサ等の文書作成装置等によっ
て作成された文書の文書データ(テキストデータ)につ
いて変換を行なうテキストデータ変換方式に関する。
[Detailed Description of the Invention] [Object of the Invention] (Field of Industrial Application) The present invention provides a text data conversion method for converting document data (text data) of a document created by a document creation device such as a word processor. Regarding.

(従来の技術) 一般に、ワードプロセッサを用いてテキスト(文書)を
作成する場合、文書を読み易くする目的で、各行の先頭
に空白を表わす文字(スペース)等を挿入して行頭位置
が揃うように左余白を設けたり、行の途中で改行を行な
い1行中の文字数を揃える場合がある。
(Prior art) Generally, when creating text (documents) using a word processor, in order to make the document easier to read, spaces are inserted at the beginning of each line so that the beginnings of the lines are aligned. In some cases, a left margin is provided or a line break is added in the middle of a line to equalize the number of characters in one line.

しかし、こうしたテキストを作成した場合には、以下に
示すような点に不具合が生じていた。
However, when such texts were created, the following problems occurred.

(1)作成したテキストを修正する場合。(1) When modifying the created text.

ある行に含まれる語句(文字)の削除を行った場合、同
行に意味的に接続している次の行(の語句)が自動的に
追従してこない。このため、同行に含まれる文字数が減
少してしまい、操作者は何らかの操作によって、次の行
の先頭の語句に対する移動等の処理を行なわなければな
らなず、多大な労力を必要としていた。
When a word (character) included in a certain line is deleted, the next line (word/phrase) that is semantically connected to the same line does not automatically follow. As a result, the number of characters included in the line decreases, and the operator has to perform some operations such as moving to the first word of the next line, which requires a great deal of effort.

(2)作成したテキストを他の表示系で表示する場合。(2) When displaying the created text on another display system.

作成したテキストを表示する際、テキストを表示しよう
とする表示系の1行あたりの文字数がテキストを作成し
た際の表示系の1行あたりの文字数と異なる場合に、本
来目的としない位置での改行が行われたり、本来は左余
白を表わす目的で入力した空白文字列が意味のない空白
文字列として表示されてしまうことがあった。
When displaying the created text, if the number of characters per line of the display system that is trying to display the text is different from the number of characters per line of the display system when the text was created, line breaks may occur at unintended positions. In some cases, blank strings that were originally intended to represent the left margin were displayed as meaningless blank strings.

(3)作成したテキストから単語の検索を行なう場合。(3) When searching for words from the created text.

テキスト中の文字列(単語)の検索を行なう際に、本来
ならひとつの単語であるものか改行、空白文字列によっ
て分割されていると、この単語については目的の単語と
のマツチングが行なわれないため、検索することができ
ない。
When searching for a character string (word) in text, if it is originally a single word but is divided by line breaks or blank strings, the word will not be matched with the target word. Therefore, it is not possible to search.

(4)作成したテキストの校閲あるいは翻訳を各処理機
能によって自動的に行なう場合。
(4) When the created text is automatically proofread or translated by each processing function.

本来ならひとつの文であるものが改行、あるいは空白文
字列によって分割されていると、校閲あるいは翻訳を自
動的に行なうために必要な形態素解析、構文解析等の処
理を行なうことが困難となる。このため、自動校閲、自
動翻訳を行なう各処理機能の実行も困難となってしまう
If what is normally a single sentence is divided by line breaks or blank strings, it becomes difficult to perform processes such as morphological analysis and syntactic analysis that are necessary for automatic proofreading or translation. Therefore, it becomes difficult to execute various processing functions such as automatic proofreading and automatic translation.

このため、テキストを読み易くする目的のために、各行
の先頭に空白文字列を挿入したり、行の途中で改行を行
ったテキストについて、作成したテキストを修正する場
合、テキストを他の表示系で表示する場合、単語の検索
を行なう場合、校閲。
For this reason, when modifying text that has been created by inserting a blank string at the beginning of each line or by adding a line break in the middle of a line to make the text easier to read, it is necessary to When displaying, searching for words, proofreading.

翻訳を各処理機能によって自動的に行なう場合等には、
各行毎に意味のない空白文字列、改行(コード)を必要
に応じて削除し、テキストを一般的な形式に編集した後
に実行する必要があった。
When translation is automatically performed by each processing function,
It was necessary to delete meaningless blank strings and line breaks (codes) from each line as necessary, edit the text into a general format, and then execute it.

(発明が解決しようとする課題) このように、テキストを読み易くする目的のために各行
の先頭に空白文字列を挿入したり、行の途中で改行を行
ったテキストについては、他の処理(前記(1)〜(4
)のような処理)を行なう場合に、空白文字列、改行(
コード)の削除等の作業が必要となり、処理効率を低下
させるという問題があった。
(Problem to be Solved by the Invention) In this way, for text that has a blank string inserted at the beginning of each line or a line break in the middle of a line for the purpose of making the text easier to read, other processing ( (1) to (4) above
), blank strings, line breaks (
This requires work such as deleting code), which poses a problem of lowering processing efficiency.

本発明は前記のような点に鑑みてなされたもので、煩わ
しい操作を必要とすることなく、テキスト中の不要な空
白文字、改行を削除することが可能なテキストデータ変
換方式を提供することを目的とする。
The present invention has been made in view of the above points, and an object of the present invention is to provide a text data conversion method that can delete unnecessary blank characters and line breaks in text without requiring troublesome operations. purpose.

[発明の目的] (課題を解決するための手段) 本発明は、空白文字コード、改行コードを含む各種文字
の文字コードが所定順に配列されたテキストデータを格
納するための第1のテキストデータ格納手段と、前記テ
キストデータ格納手段に格納されたテキストデータから
、不要な空白文字コードを削除する空白文字コード削除
手段と、前記テキストデータ記憶手段に格納されたテキ
ストデータから、前記テキストの文末以外に付された不
要な改行コードを削除する改行コード削除手段と、前記
空白文字コード削除手段、及び前記改行コード削除手段
によって、空白文字コード、改行コードが削除されたテ
キストデータを格納するための第2のテキストデータ格
納手段とを具備し、テキスト中の不要な空白文字コード
、改行コードが削除された内容的に連続するテキストデ
ータを抽出するように構成するものである。
[Object of the Invention] (Means for Solving the Problems) The present invention provides a first text data storage for storing text data in which character codes of various characters including blank character codes and line feed codes are arranged in a predetermined order. blank character code deleting means for deleting unnecessary blank character codes from the text data stored in the text data storage means; a second line feed code for storing text data from which blank character codes and line feed codes have been deleted by the line feed code deletion means, the blank character code deletion means, and the line feed code deletion means; The apparatus is configured to extract continuous text data from which unnecessary blank character codes and line feed codes have been deleted from the text.

(作用) このような構成によれば、表示系に表示したり、印刷し
た際に、文書が読み易くなるようにする目的で挿入され
た内容的に不要な空白文字コード、改行コードが削除さ
れるため、テキストデータが連続する(空白文字、改行
コードによって分割されない)条件で実行可能な、単語
の検索、自動的に行なう処理機能による校閲、翻訳等を
行なう場合に、煩わしい操作を伴なう方式によりテキス
ト編集を行なう必要がない。
(Function) According to this configuration, unnecessary blank character codes and line feed codes inserted for the purpose of making the document easier to read when displayed on a display system or printed are deleted. Therefore, when performing word searches, proofreading using automatic processing functions, translation, etc., which can be performed under the condition that text data is continuous (not divided by blank characters or line feed codes), cumbersome operations are required. This method eliminates the need for text editing.

(実施例) 以下、図面を参照して本発明の一実施例を説明する。第
1図は同実施例に係わるテキストデータ変換方式を適用
する情報処理装置の構成を示すブロック図である。同図
に示すように、テキストデータ変換処理を制御する制御
部lOによって、プログラム部20、及びデータ格納部
30が管理される。
(Example) Hereinafter, an example of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram showing the configuration of an information processing apparatus to which the text data conversion method according to the embodiment is applied. As shown in the figure, a program section 20 and a data storage section 30 are managed by a control section IO that controls text data conversion processing.

また、同装置は、プログラム、テキストデータ等を格納
するためのハードディスク装置等によって構成される外
部記憶装置40と接続されている。
Further, the device is connected to an external storage device 40 constituted by a hard disk device or the like for storing programs, text data, and the like.

プログラム部20には、テキストデータ中の不要な空白
文字、改行コードを削除するテキスト編集処理を実行す
る際の初期化処理を行なう初期化部20a、外部記憶装
置40に格納されたテキストデータを所定のデータ格納
部30の領域に格納するデータ読込み部20b、処理対
象とするテキストデータから不要な空白文字コードを削
除する処理を実行する空白文字コード削除部20c1及
びテキストデータから不要な改行コードを削除する処理
を実行する改行コードさ削除部20dが設けられている
The program unit 20 includes an initialization unit 20a that performs initialization processing when executing text editing processing to delete unnecessary blank characters and line feed codes in text data, and an initialization unit 20a that performs initialization processing when executing text editing processing to delete unnecessary blank characters and line feed codes in text data. a data reading unit 20b that stores data in the area of the data storage unit 30; a blank character code deletion unit 20c1 that executes processing to delete unnecessary blank character codes from text data to be processed; and a blank character code deletion unit 20c1 that deletes unnecessary line feed codes from text data. A line feed code deleting unit 20d is provided to perform the processing to delete the line feed code.

データ管理部30には、外部記憶装置40から入力され
たテキストの総行数の値を格納するための行カウンタバ
ッファ30a、外部記憶装置40中の文字位置を記憶す
るための入力文字位置記憶用バッファ30b、後述する
生成文字列格納用バッファ30hのテキストデータを格
納すべき位置を記憶する出力文字位置記憶用バッファ3
0C1外部記憶装置40から入力したテキストデータを
一時的に格納するための文字列−時格納用バッファ30
d、文字列−時格納用バッファ30cの内容を後の処理
のために保存するための文字列保存用バッファ30e1
文字列−時格納用バッファ30dに格納されている文字
列の文字数を格納するための文字数カウンタ用バッファ
30f1文字数カウンタ用バッファ30fの内容を後の
処理のために保存するための文字数カウンタ保存用バッ
ファ30g1及びテキスト編集処理の結果得られる不要
な空白文字、改行が削除された文字列を格納するための
生成文字列格納用バッファ30hが設けられている。
The data management unit 30 includes a line counter buffer 30a for storing the value of the total number of lines of text input from the external storage device 40, and a line counter buffer 30a for storing the input character position for storing the character position in the external storage device 40. Buffer 30b, output character position storage buffer 3 that stores the position where text data of generated character string storage buffer 30h, which will be described later, should be stored.
Character string-time storage buffer 30 for temporarily storing text data input from the 0C1 external storage device 40
d. Character string storage buffer 30e1 for storing the contents of the character string-time storage buffer 30c for later processing.
Character count counter buffer 30f for storing the number of characters in the character string stored in the character string-time storage buffer 30d1 Character counter storage buffer for saving the contents of the character counter buffer 30f for later processing 30g1 and a generated character string storage buffer 30h for storing a character string from which unnecessary blank characters and line breaks obtained as a result of text editing processing have been deleted.

次に、同実施例の動作について第2図に示すフローチャ
ートを参照しながら説明する。
Next, the operation of this embodiment will be explained with reference to the flowchart shown in FIG.

まず、システムが起動され、テキストデータ中の不要な
空白文字、改行コードを削除するテキスト編集処理の実
行が指示されると、プログラム部20中の初期化部20
aが起動する。初期化部20aは、データ格納部30中
の各種変数・バッファの初期化を行なう(ステップSl
)。ここで、特に行カウンタバッファ30a1人力文字
位置記憶用バッファ30b、及び出力文字位置記憶バッ
ファ30cに値“0° (ゼロ)が格納される。初期化
が終了すると、データ読込み部20bが起動し、外部記
憶装置40中に格納されているテキストデータ(の一部
)を、文字列−時格納用バッファ30dに転送する(ス
テップS2)。外部記憶装置40中でのテキストデータ
の格納形式を第3図に示している。なお、第3図におい
て、r CRJは改行コード、rsPcJは空白文字コ
ード(スペース)、その他の文字は文字コードを示すも
のである。すなわち、データ読込み部20bは、入力文
字位置記憶用バッファ30bの内容が示す文字位置を先
頭とし、これに続く改行コードr CRJまでの単位(
1行分の文字列)を、文字列−時格納用バッファ30d
の先頭から順に、末尾の改行コードを含めて格納する。
First, when the system is started and instructions are given to execute text editing processing to delete unnecessary blank characters and line feed codes in text data, the initialization unit 20 in the program unit 20
a starts. The initialization unit 20a initializes various variables and buffers in the data storage unit 30 (step Sl
). Here, in particular, the value "0° (zero) is stored in the line counter buffer 30a, the manual character position storage buffer 30b, and the output character position storage buffer 30c. When the initialization is completed, the data reading unit 20b is activated, The text data (a part of it) stored in the external storage device 40 is transferred to the character string-time storage buffer 30d (step S2).The storage format of the text data in the external storage device 40 is In FIG. 3, rCRJ is a line feed code, rsPcJ is a blank character code (space), and other characters are character codes.In other words, the data reading unit 20b reads the input character Starting from the character position indicated by the contents of the position storage buffer 30b, the unit (
One line of character string) is stored in the character string-time storage buffer 30d.
are stored sequentially from the beginning, including the trailing newline code.

文字列−時格納用バッファ30dにテキストデータが格
納されると、外部記憶装置40中における読取られた改
行コードの次の位置を示すように、入力文字位置記憶用
バッファ30bの内容を更新する。さらに、行カウンタ
バッファ30aの内容に「1」を加える。
When the text data is stored in the character string-time storage buffer 30d, the contents of the input character position storage buffer 30b are updated to indicate the next position of the read line feed code in the external storage device 40. Furthermore, "1" is added to the contents of the row counter buffer 30a.

ステップS2において、テキストデータの読込みができ
なかった場合、つまり入力文字位置記憶用バッファ30
bに格納されたデータによって示される文字位置に文字
データ(改行、空白文字コードを含む)が格納されてい
なかった場合には、本方式での処理を終了する(ステッ
プS3)。
In step S2, if the text data cannot be read, that is, the input character position storage buffer 30
If character data (including line feed and blank character codes) is not stored at the character position indicated by the data stored in b, the process in this method is ended (step S3).

一方、ステップS2において、テキストデータの読込み
ができた場合には、空白文字コード削除部20cが起動
する。空白文字コード削除部20cは、行カウンタバッ
ファ30aの内容が「1」であるか(対象とする行がテ
キストの第1行目であるか)を判別する(ステップS4
)。行カウンタバッファ30aの内容が「1」の場合、
つまり外部記憶装置40からテキストの最初の1行目が
読込まれた直後である場合、空白文字コード削除部20
cは、文字−時格納用バッファ30dに格納された文字
列のデータ(テキストデータ)を、文字列保存用バッフ
ァ30eに転送する(ステップS5)。次に、文字−時
格納用バッファ30d中のテキストデータがら1行中の
文字数(空白文字コードを含む)をカウントして、その
カウント数を文字数カウンタ用バッファ30fに格納す
る。この文字数のカウント結果は、文字数カウンタ用バ
ッファ30fから、文字数カウンタ保存用バッファ30
gに転送され格納される(ステップS6.S7)。この
1行中の文字数のカウント値は、後に実行される不要な
改行コードを削除するための処理に用いられる。空白文
字コード削除部20cは、文字列−時格納用バッファ3
0dに格納されたテキストデータの先頭に空白文字コー
ドが存在するか判別する(ステップS8)。先頭に空白
文字コードが存在する(連続する空白文字コードを含む
〕場合、文字列保存用バッファ30eに格納された先頭
の空白文字コード(連続する空白文字コードを含む)を
削除する(ステップS9)。この空白文字コードが削除
される様子を、第4図に示している。
On the other hand, in step S2, if the text data has been successfully read, the blank character code deletion unit 20c is activated. The blank character code deletion unit 20c determines whether the content of the line counter buffer 30a is "1" (whether the target line is the first line of the text) (step S4
). If the content of the row counter buffer 30a is "1",
In other words, immediately after the first line of text is read from the external storage device 40, the blank character code deletion unit 20
c transfers the character string data (text data) stored in the character-time storage buffer 30d to the character string storage buffer 30e (step S5). Next, the number of characters in one line (including blank character codes) is counted from the text data in the character-time storage buffer 30d, and the counted number is stored in the character number counter buffer 30f. The result of counting the number of characters is transferred from the character number counter buffer 30f to the character number counter storage buffer 30f.
g and stored (steps S6 and S7). This count value of the number of characters in one line is used in a process executed later to delete unnecessary line feed codes. The blank character code deletion unit 20c is a character string-hour storage buffer 3.
It is determined whether a blank character code exists at the beginning of the text data stored in 0d (step S8). If a blank character code exists at the beginning (including consecutive blank character codes), delete the leading blank character code (including consecutive blank character codes) stored in the character string storage buffer 30e (step S9). FIG. 4 shows how this blank character code is deleted.

なお、ステップS8において、空白文字コードが存在し
ないと判別された場合には、文字列保存用バッファ30
eの内容を操作することなく次の処理に移る。
Note that if it is determined in step S8 that there is no blank character code, the character string storage buffer 30
Proceed to the next process without manipulating the contents of e.

次に、ステップS2の処理に移り、入力文字位置記憶用
バッファ30bの内容が示す文字位置から改行コードr
 CRJまでの文字列(次行の文字列)を、前記同様に
して文字列−時格納用バッファ30dの先頭から順に、
末尾の改行コードを含めて格納する。ここで、テキスト
データの読込みができた場合には(ステップS3)、行
カウンタの値が「1」でないため(ステップS4)、空
白文字コード削除部20cが起動され、次行に対する空
白文字コードの削除処理が実行される。まず、空白文字
コード削除部20cは、文字列−時格納用バッファ3(
ldに格納されたテキストデータから1行中の文字数(
空白文字コードを含む)をカウントして、そのカウント
数を文字数カウンタ用バッファ30fに格納する(ステ
ップ5IO)。この1行中の文字数のカウント値は、文
字数カウンタ保存用パンツ730gに格納された前行の
文字数を示すカウント値と共に、後に実行されるテキス
トデータ中の不要な改行コードを削除するための処理に
用いられる。空白文字コード削除部20cは、文字列−
時格納用バッファ30dに格納されたテキストデータの
先頭に空白文字コードが存在するか判別する(ステップ
511)。先頭に空白文字コードが存在する(連続する
空白文字コードを含む)場合、文字列保存用バッファ3
C1eに格納された先頭の空白文字コード(連続する空
白文字コードを含む)を削除しくステップ5L2)、そ
の結果を生成文字列格納用バッファ30hの出力文字位
置記憶バッファ30cの内容によって示される位置に転
送し格納する(ステップ813)。そして、出力文字位
置記憶用バッファ30cの内容に、生成文字列格納用バ
ッファ30hに格納した文字数を加える。なお、ステッ
プSllにおいて、空白文字コードが存在しないと判別
された場合には、文字列保存用バッファ30eの内容を
操作することなく次の処理に移る。
Next, the process moves to step S2, and the line feed code r is started from the character position indicated by the contents of the input character position storage buffer 30b.
The character strings up to CRJ (character strings in the next line) are processed in the same manner as described above, starting from the beginning of the character string-hour storage buffer 30d.
Store including the trailing newline code. Here, if the text data has been successfully read (step S3), the value of the line counter is not "1" (step S4), so the blank character code deletion unit 20c is activated and the blank character code for the next line is changed. Deletion processing is executed. First, the blank character code deletion unit 20c deletes the character string-hour storage buffer 3 (
The number of characters in one line from the text data stored in ld (
(including blank character codes) and stores the counted number in the character number counter buffer 30f (step 5IO). This count value of the number of characters in one line is used together with the count value indicating the number of characters in the previous line stored in the character counter storage pant 730g, in the process to delete unnecessary line feed codes in the text data that will be executed later. used. The blank character code deletion unit 20c deletes the character string -
It is determined whether a blank character code exists at the beginning of the text data stored in the time storage buffer 30d (step 511). If a blank character code exists at the beginning (including consecutive blank character codes), the character string storage buffer 3
Delete the leading blank character code (including consecutive blank character codes) stored in C1e (Step 5L2), and place the result in the position indicated by the contents of the output character position storage buffer 30c of the generated character string storage buffer 30h. Transfer and store (step 813). Then, the number of characters stored in the generated character string storage buffer 30h is added to the contents of the output character position storage buffer 30c. Note that if it is determined in step Sll that there is no blank character code, the process moves to the next process without operating the contents of the character string storage buffer 30e.

こうして、行頭に付された不要な空白文字コードが削除
されると、改行コード削除部20dが起動する。改行コ
ード削除部2Ddは、文字数カウンタ用バッファ30f
に格納された最後に読込んだ行(現在処理対象としてい
る行)の文字数と、文字数カウンタ保存用バッファ30
gに格納された前行の文字数のとの差を計算する(ステ
ップ514)。
When the unnecessary blank character code added to the beginning of the line is thus deleted, the line feed code deletion unit 20d is activated. The line feed code deletion unit 2Dd has a character count counter buffer 30f.
The number of characters in the last read line (the line currently being processed) stored in the buffer 30 for storing the character count counter
The difference between the number of characters in the previous line stored in g is calculated (step 514).

ここで、計算により得られた結果が0でない場合、つま
り直前にステップS2において読込んだ行(最後に読込
んだ行)の1行中に含まれる文字数が異なる場合は(ス
テップ515)、さらに現在処理対象としている行と前
行の文字数の何れの方が多いかを判別する(ステップ8
16)。ここで、前行の文字列の文字数のほうが少ない
場合、前行は、文の最後の部分を含む行であるものと判
別する。
Here, if the result obtained by the calculation is not 0, that is, if the number of characters included in one line is different from the line read in the previous step S2 (the last line read) (step 515), further Determine which has more characters, the line currently being processed or the previous line (Step 8
16). Here, if the number of characters in the character string in the previous line is smaller than that in the previous line, the previous line is determined to be the line containing the last part of the sentence.

例えば、第5図に示すようなテキストデータを処理対象
とすると、「示される。」の行が文の最後の部分を含む
行とする。このため、改行コード削除部20dは、生成
文字列格納用バッファ30h中の出力文字位置記憶用バ
ッファ30cの内容によって示される位置に改行コード
を格納する(ステップら 517)。また、ステップSitにおいて、前行の文字
列の文字数のほうが多いと判別された場合は、さらに文
字列保存用バッファ30eに格納されたテキストデータ
の最後の文字コードが、文の最後を示す句点コードであ
るか否かを判別する(ステップS 18)。テキストデ
ータの最後が句点コードである場合は、同様にして文の
最後として生成文字列格納用バッファ30hに改行コー
ドを格納する(ステップS 1?)。すなわち、テキス
ト中の「見出し文」のように、1行中の文字数が他の一
般文の行の文字数より少ない行を現在処理対象としてい
る行とする場合に、前行に確実に改行コードが付される
ようにするものである。改行コード削除部20dは、生
成文字列格納用バッファ30hに改行コードを格納する
と、出力文字位置記憶用バッファ30cの内容に1を加
え、次の処理(ステップS 19)に移る。
For example, if text data as shown in FIG. 5 is to be processed, the line ``shown.'' is the line that includes the last part of the sentence. Therefore, the line feed code deletion unit 20d stores the line feed code at the position indicated by the contents of the output character position storage buffer 30c in the generated character string storage buffer 30h (step 517). Further, if it is determined in step Sit that the number of characters in the character string in the previous line is larger than that in the previous line, the last character code of the text data stored in the character string storage buffer 30e is the period code indicating the end of the sentence. It is determined whether or not (step S18). If the end of the text data is a period code, a line feed code is similarly stored in the generated character string storage buffer 30h as the end of the sentence (step S1?). In other words, when the current line to be processed is a line in which the number of characters in one line is smaller than the number of characters in other general text lines, such as a "headline sentence", it is possible to ensure that the previous line has a line feed code. It is to be attached. When the line feed code deletion unit 20d stores the line feed code in the generated character string storage buffer 30h, it adds 1 to the contents of the output character position storage buffer 30c, and moves on to the next process (step S19).

一方、ステップSI5において、現在処理対象としてい
る行の文字数と、前行の文字数のとの差が等しいと判別
された場合には、テキストの行途中で改行することによ
って1行中の文字数を揃えたものとして、改行コードを
生成文字列格納用バッファ30hに格納しない。従って
、ステップS13において生成文字列格納用バッファ3
0hに文字列保存用バッファ30eから改行コードを除
くテキストデータが転送され格納されているため、ここ
で改行コードを格納しないことによって、結果的に改行
コードを削除していることになる。
On the other hand, if it is determined in step SI5 that the difference between the number of characters in the current line to be processed and the number of characters in the previous line is equal, the number of characters in one line is equalized by starting a line in the middle of the text line. As a result, the line feed code is not stored in the generated character string storage buffer 30h. Therefore, in step S13, the generated character string storage buffer 3
Since the text data excluding the line feed code is transferred and stored at 0h from the character string storage buffer 30e, by not storing the line feed code here, the line feed code is deleted as a result.

次に、改行コード削除部20dは、新たに1行分のテキ
ストデータを読込んで処理するための準備として、文字
列−時格納用バッファ30dに格納されたテキストデー
タを、文字列保存用バッファ30已に転送し格納する(
ステップ519)。さらに、文こうして、次の処理の準
備が終了すると、ステップS2に処理が戻り、データ読
込み部20bが起動し、行カウンタバッファ30gの内
容によって示される行の読込みが行われる。以下、前記
において説明したようにして処理が実行される。
Next, the line feed code deletion unit 20d transfers the text data stored in the character string-time storage buffer 30d to the character string storage buffer 30d in preparation for reading and processing one new line of text data. Transfer and store it immediately (
step 519). Furthermore, when preparation for the next process is completed, the process returns to step S2, the data reading section 20b is activated, and the line indicated by the contents of the line counter buffer 30g is read. Thereafter, the processing is executed as described above.

この結果、第5図に示すようなテキストデータは、第6
図に示すような、不要な空白文字、改行コードが削除さ
れたテキストデータに変換される。
As a result, the text data as shown in Figure 5 is
The text data is converted to text data with unnecessary blank characters and line feed codes removed, as shown in the figure.

なお、本発明は前記実施例に限定されるものではない。Note that the present invention is not limited to the above embodiments.

例えば、本実施例では、外部記憶装置40中に格納され
たテキストデータについて処理を実行するものとしたが
、通信回線を介して入力されたデータについて処理を行
なうようにしても良い。
For example, in this embodiment, the processing is performed on text data stored in the external storage device 40, but the processing may be performed on data input via a communication line.

また、本発明の要旨を逸脱しない範囲で種々の変更が可
能である。
Furthermore, various modifications can be made without departing from the gist of the present invention.

[発明の効果] 以上のように本発明によれば、テキストを読み易くする
目的のための左余白を設けるための空白文字列や、1行
中の文字数を揃えるための改行が挿入されたテキストか
ら、不要な空白文字列。
[Effects of the Invention] As described above, according to the present invention, text in which a blank character string is inserted to provide a left margin for the purpose of making the text easier to read, and a line break is inserted to equalize the number of characters in one line. From, an unnecessary blank string.

改行を削除して、文や語句を構成する文字列のみが抽出
するので、作成したテキストを修正する際、他の表示系
で表示する際、作成したテキスト中から単語等の検索を
行なう際、作成したテキストの校閲、翻訳を自動的に行
なう機能を用いる際などに、一般のテキストに編集する
必要があるで場合あっても、煩わしい操作を必要とする
ことなく編集結果を得ることができ、作業負担を大幅に
軽減すると共に、作業効率を向上させることが可能とな
るものである。
Line breaks are removed and only the character strings that make up a sentence or phrase are extracted, so when editing the created text, displaying it on another display system, or searching for words etc. in the created text, Even if you need to edit the text into regular text when using a function that automatically proofreads or translates the text you have created, you can get the editing results without any troublesome operations. This makes it possible to significantly reduce the work burden and improve work efficiency.

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

第1図は本発明の一実施例に係わるテキストデータ変換
方式を適用する情報処理装置の構成を示すブロック図、
第2図は同実施例の動作手順を示すフローチャート、第
3図は外部記憶装置中でのテキストデータの格納形式を
示す図、第4図は空白文字コードを削除する処理を説明
するための図、第5図は処理対象とするテキストデータ
の一例を示す図、第6図は第5図に示すテキストデータ
に対する処理結果を示す図である。 IO・・・制御部、20・・・プログラム部、20a・
・・初期化部、20b・・・データ読込み部、20c・
・・空白文字コード削除部(空白文字コード削除手段)
 、20d・・・改行コード削除部(改行コード削除手
段)、3o・・・データ格納部、30a・・・行カウン
タバッファ、30b・・・人力文字位置記憶用バッファ
、30c・・・出力文学位rIt記憶用バッファ、3(
ld・・・文字列−時格納用バッファ、30e・・文字
列保存用バッファ、30f・・・文字数カウンタ用バッ
ファ、30g・・・文字数カウンタ保存用バッファ、3
0h・・・生成文字列格納用バッファ、40・・・外部
記憶装置
FIG. 1 is a block diagram showing the configuration of an information processing device to which a text data conversion method according to an embodiment of the present invention is applied;
FIG. 2 is a flowchart showing the operating procedure of the same embodiment, FIG. 3 is a diagram showing the storage format of text data in an external storage device, and FIG. 4 is a diagram for explaining the process of deleting blank character codes. , FIG. 5 is a diagram showing an example of text data to be processed, and FIG. 6 is a diagram showing a processing result for the text data shown in FIG. IO...Control unit, 20...Program unit, 20a.
...Initialization section, 20b...Data reading section, 20c.
・Blank character code deletion section (blank character code deletion means)
, 20d...Line feed code deletion unit (line feed code deletion means), 3o...Data storage unit, 30a...Line counter buffer, 30b...Manual character position storage buffer, 30c...Output character position rIt storage buffer, 3(
ld...Buffer for storing character string-time, 30e...Buffer for storing character string, 30f...Buffer for character number counter, 30g...Buffer for storing character number counter, 3
0h...Buffer for storing generated character strings, 40...External storage device

Claims (1)

【特許請求の範囲】 空白文字コード、改行コードを含む各種文字の文字コー
ドが所定順に配列されたテキストデータを格納するため
の第1のテキストデータ格納手段と、 前記テキストデータ格納手段に格納されたテキストデー
タから、不要な空白文字コードを削除する空白文字コー
ド削除手段と、 前記テキストデータ格納手段に格納されたテキストデー
タから、不要な改行コードを削除する改行コード削除手
段と、 前記空白文字コード削除手段、及び前記改行コード削除
手段によって、空白文字コード、改行コードが削除され
たテキストデータを格納するための第2のテキストデー
タ格納手段と、 を具備し、 テキスト中の不要な空白文字コード、改行コードが削除
された内容的に連続するテキストデータを抽出すること
を特徴とするテキストデータ変換方式。
[Scope of Claims] First text data storage means for storing text data in which character codes of various characters including blank character codes and line feed codes are arranged in a predetermined order; Blank character code deletion means for deleting unnecessary blank character codes from text data; line feed code deletion means for deleting unnecessary line feed codes from text data stored in the text data storage means; and the blank character code deletion means. means, and second text data storage means for storing text data from which blank character codes and line feed codes have been deleted by the line feed code deletion means; A text data conversion method characterized by extracting content-continuous text data from which codes have been deleted.
JP2028164A 1990-02-09 1990-02-09 Text data conversion system Pending JPH03233670A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2028164A JPH03233670A (en) 1990-02-09 1990-02-09 Text data conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2028164A JPH03233670A (en) 1990-02-09 1990-02-09 Text data conversion system

Publications (1)

Publication Number Publication Date
JPH03233670A true JPH03233670A (en) 1991-10-17

Family

ID=12241112

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2028164A Pending JPH03233670A (en) 1990-02-09 1990-02-09 Text data conversion system

Country Status (1)

Country Link
JP (1) JPH03233670A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1166063A (en) * 1997-08-27 1999-03-09 Nippon Telegr & Teleph Corp <Ntt> System and method for displaying text document data in high-dimensions and recording medium recording the same method
JPH11191105A (en) * 1997-09-18 1999-07-13 Just Syst Corp Method and device for processing document and recording medium recording processing program therefor
JP2005164683A (en) * 2003-11-28 2005-06-23 Ricoh Co Ltd Character display, character display method and program, and recording medium
US7130249B2 (en) * 1997-07-06 2006-10-31 Kabushiki Kaisha Kenwood Device for inputting title of recording medium
JP2010157241A (en) * 2008-12-30 2010-07-15 Nhn Corp Method and system for correcting ocr result, and computer-readable recording medium
JP2011159311A (en) * 2011-03-24 2011-08-18 Toshiba Corp Document analysis device, document analysis program and document analysis method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7130249B2 (en) * 1997-07-06 2006-10-31 Kabushiki Kaisha Kenwood Device for inputting title of recording medium
JPH1166063A (en) * 1997-08-27 1999-03-09 Nippon Telegr & Teleph Corp <Ntt> System and method for displaying text document data in high-dimensions and recording medium recording the same method
JPH11191105A (en) * 1997-09-18 1999-07-13 Just Syst Corp Method and device for processing document and recording medium recording processing program therefor
JP2005164683A (en) * 2003-11-28 2005-06-23 Ricoh Co Ltd Character display, character display method and program, and recording medium
JP2010157241A (en) * 2008-12-30 2010-07-15 Nhn Corp Method and system for correcting ocr result, and computer-readable recording medium
JP2011159311A (en) * 2011-03-24 2011-08-18 Toshiba Corp Document analysis device, document analysis program and document analysis method

Similar Documents

Publication Publication Date Title
JPH0567144A (en) Method and device for pre-edit supporting
JPS6170660A (en) Polysemy displaying and selecting means of machine translation system
JPH03233670A (en) Text data conversion system
JPH0877196A (en) Extracting device for document information
JPH0412866B2 (en)
JP2893239B2 (en) Translation support dictionary search and display system
JPH0232455A (en) Item extracting system
JP2583898B2 (en) Post-editing machine for machine translation system
JPH06195380A (en) Retrieval result display system in translation supporting system
JPH08190561A (en) Document correction device
JPS6325765A (en) Document editing device
JPH07219946A (en) Document preparing device
JPH0716192Y2 (en) Text processor
JPS61169961A (en) Character processor provided with user dictionary
JPS5969831A (en) Device for documentation
JPH05298368A (en) Method for inputting retrieving word in electronic filing system
JP2937634B2 (en) Document creation device
JPH08339365A (en) Method and device for documentation
JPH11272661A (en) System and method for automatic registration in japanese dictionary
JPH03191472A (en) Sentence analyzer and machine translation device using the same
JPH08185401A (en) Document retrieving device
JPH01261775A (en) Method for registering document for document editer
JPS62282364A (en) Character string retrieval system
JPH07319745A (en) File length reduction processor
JPH04167060A (en) Machine translation system