JP5949248B2 - Information processing apparatus and information processing program - Google Patents
Information processing apparatus and information processing program Download PDFInfo
- Publication number
- JP5949248B2 JP5949248B2 JP2012156514A JP2012156514A JP5949248B2 JP 5949248 B2 JP5949248 B2 JP 5949248B2 JP 2012156514 A JP2012156514 A JP 2012156514A JP 2012156514 A JP2012156514 A JP 2012156514A JP 5949248 B2 JP5949248 B2 JP 5949248B2
- Authority
- JP
- Japan
- Prior art keywords
- character
- characters
- displacement
- blank
- calculating
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 230000010365 information processing Effects 0.000 title claims description 35
- 238000006073 displacement reaction Methods 0.000 claims description 99
- 238000004364 calculation method Methods 0.000 claims description 20
- 238000003780 insertion Methods 0.000 claims description 16
- 230000037431 insertion Effects 0.000 claims description 16
- 238000000034 method Methods 0.000 description 26
- 230000008569 process Effects 0.000 description 24
- 238000001514 detection method Methods 0.000 description 23
- 238000012545 processing Methods 0.000 description 18
- 238000004891 communication Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 5
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Document Processing Apparatus (AREA)
- User Interface Of Digital Computer (AREA)
Description
本発明は、情報処理装置及び情報処理プログラムに関する。 The present invention relates to an information processing apparatus and an information processing program.
特許文献1には、文書を構成する単語の区切りに空白文字が存在する外国語文書において、各単語の区切りを確実に検出し、空白文字を区切りに確実に再挿入することができる技術を提供することを課題とし、英語表記ルールによる判断、元文書データに含まれる空白文字の有無の情報による判断、隣接する文字同士が含まれる文字列オブジェクトの同一性による判断、隣接する文字同士が含まれる文字列オブジェクトの間隔による判断を用いて隣接する文字が同じ単語に含まれるかどうか(空白の有無)について判断し、これらの処理をこの記述の順番で判断するのが好ましいことが開示されている。
本発明は、空白文字がない文字列に対して空白文字を挿入する場合にあって、空白文字を挿入すべき文字間に空白文字を挿入しないこと、又は空白文字を挿入すべきではない文字間に空白文字を挿入してしまうことを防止するようにした情報処理装置及び情報処理プログラムを提供することを目的としている。 The present invention inserts a space character into a character string having no space character, and does not insert a space character between characters where a space character should be inserted or between characters where a space character should not be inserted. An object of the present invention is to provide an information processing apparatus and an information processing program which can prevent a blank character from being inserted into a file.
かかる目的を達成するための本発明の要旨とするところは、次の各項の発明に存する。
請求項1の発明は、文字の位置を受け付ける受付手段と、前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、前記第2の算出手段によって算出された変位から閾値を決定する決定手段と、前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段を具備することを特徴とする情報処理装置である。
The gist of the present invention for achieving the object lies in the inventions of the following items.
The invention according to
請求項2の発明は、前記判断手段は、第1の変位が前記閾値よりも大きい又は以上であって、第2の変位が該閾値の負の値よりも小さい又は以下である第1の条件を満たす場合は、前記文字間に空白文字を挿入すると判断することを特徴とする請求項1に記載の情報処理装置である。
The invention according to claim 2 is characterized in that the determination means has a first condition in which the first displacement is greater than or greater than the threshold value, and the second displacement is less than or less than a negative value of the threshold value. 2. The information processing apparatus according to
請求項3の発明は、前記受付手段は、さらに前記文字の文字コードを受け付け、前記判断手段は、前記第1の条件を満たさない場合は、対象としている文字が予め定められた文字コードであって、前記第1の変位が前記閾値よりも大きい又は以上であって、前記第2の変位が該閾値よりも小さい又は以下であって、第3の変位が該閾値の負の値よりも小さい又は以下である第2の条件を満たす場合は、前記文字間に空白文字を挿入すると判断することを特徴とする請求項2に記載の情報処理装置である。 According to a third aspect of the present invention, the accepting means further accepts a character code of the character, and the judging means is a predetermined character code when the first condition is not satisfied. The first displacement is greater than or greater than the threshold, the second displacement is less than or less than the threshold, and the third displacement is less than a negative value of the threshold. Alternatively, when the second condition which is described below is satisfied, it is determined that a blank character is inserted between the characters.
請求項4の発明は、前記判断手段は、対象としている文字が行の最初の文字であって、予め定められた文字コードである場合に、第1の変位が前記閾値の負の値よりも小さい又は以下である第3の条件を満たす場合は、前記文字間に空白文字を挿入すると判断することを特徴とする請求項1から3のいずれか一項に記載の情報処理装置である。
According to a fourth aspect of the present invention, in the case where the target character is the first character of a line and the character code is a predetermined character code, the first displacement is less than the negative value of the threshold value. 4. The information processing apparatus according to
請求項5の発明は、前記第1の算出手段は、対象としている文字列が予め定められた文字列である場合又は文字間の間隔が0未満又は以下である場合に、該文字列内の文字間の間隔を修正することを特徴とする請求項1から4のいずれか一項に記載の情報処理装置である。
According to a fifth aspect of the present invention, when the first character string is a character string that is determined in advance, or when an interval between characters is less than or less than zero, The information processing apparatus according to
請求項6の発明は、文字の位置を受け付ける受付手段と、前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、前記第1の算出手段によって算出された文字間の間隔から閾値を決定する決定手段と、前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段を具備することを特徴とする情報処理装置である。 The invention of claim 6 is calculated and receiving means for receiving position of a character, a first calculation means for calculating the distance between the characters from the position of the characters received by the receiving means, by said first calculation means A second calculating unit that calculates a displacement of the interval from the interval between the characters; a determining unit that determines a threshold value from the interval between the characters calculated by the first calculating unit; and the second calculating unit. Based on the relationship between the calculated displacement and the threshold value determined by the determination means, a determination means for determining whether or not to insert a blank character between characters, and the determination means determined to insert a blank character In this case, the information processing apparatus includes an insertion unit that inserts a blank character between the characters.
請求項7の発明は、コンピュータを、文字の位置を受け付ける受付手段と、前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、前記第2の算出手段によって算出された変位から閾値を決定する決定手段と、前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段として機能させるための情報処理プログラムである。 According to a seventh aspect of the present invention, there is provided a computer comprising: a receiving unit that receives a character position; a first calculating unit that calculates an interval between characters from the character position received by the receiving unit; and the first calculating unit. A second calculating unit that calculates a displacement of the interval from the interval between the characters calculated by the step, a determining unit that determines a threshold value from the displacement calculated by the second calculating unit, and the second calculating unit. Based on the relationship between the calculated displacement and the threshold value determined by the determination means, a determination means for determining whether or not to insert a blank character between characters, and the determination means determined to insert a blank character In this case, there is provided an information processing program for causing an insertion unit to insert a blank character between the characters.
請求項8の発明は、コンピュータを、文字の位置を受け付ける受付手段と、前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、前記第1の算出手段によって算出された文字間の間隔から閾値を決定する決定手段と、前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段として機能させるための情報処理プログラムである。 The invention of claim 8, the computer, and a first calculating means for calculating a reception unit that receives the position of the character, the spacing between the characters from the position of the characters received by the receiving means, said first calculation means A second calculating unit that calculates a displacement of the interval from the interval between the characters calculated by the step, a determining unit that determines a threshold from the interval between the characters calculated by the first calculating unit, and the second Based on the relationship between the displacement calculated by the calculation means and the threshold value determined by the determination means, a determination means for determining whether to insert a blank character between characters, and a blank character inserted by the determination means An information processing program for functioning as insertion means for inserting a blank character between the characters when determined.
請求項1の情報処理装置によれば、空白文字がない文字列に対して空白文字を挿入する場合にあって、空白文字を挿入すべき文字間に空白文字を挿入しないこと、又は空白文字を挿入すべきではない文字間に空白文字を挿入してしまうことを防止することができる。
According to the information processing apparatus of
請求項2の情報処理装置によれば、第1の条件を満たす場合は、文字間に空白文字を挿入すると判断することができる。 According to the information processing apparatus of the second aspect, when the first condition is satisfied, it can be determined that a blank character is inserted between characters.
請求項3の情報処理装置によれば、第2の条件を満たす場合は、文字間に空白文字を挿入すると判断することができる。 According to the information processing apparatus of the third aspect, when the second condition is satisfied, it can be determined that a blank character is inserted between characters.
請求項4の情報処理装置によれば、第3の条件を満たす場合は、文字間に空白文字を挿入すると判断することができる。 According to the information processing apparatus of claim 4, when the third condition is satisfied, it can be determined that a blank character is inserted between characters.
請求項5の情報処理装置によれば、対象としている文字列が予め定められた文字列である場合又は文字間の間隔が0未満又は以下である場合に、その文字列内の文字間の間隔を修正することができる。 According to the information processing apparatus of claim 5, when the target character string is a predetermined character string or when the interval between characters is less than or less than 0, the interval between characters in the character string Can be corrected.
請求項6の情報処理装置によれば、空白文字がない文字列に対して空白文字を挿入する場合にあって、空白文字を挿入すべき文字間に空白文字を挿入しないこと、又は空白文字を挿入すべきではない文字間に空白文字を挿入してしまうことを防止することができる。 According to the information processing apparatus of claim 6, when a blank character is inserted into a character string having no blank character, no blank character is inserted between the characters to be inserted, or a blank character is It is possible to prevent a blank character from being inserted between characters that should not be inserted.
請求項7の情報処理プログラムによれば、空白文字がない文字列に対して空白文字を挿入する場合にあって、空白文字を挿入すべき文字間に空白文字を挿入しないこと、又は空白文字を挿入すべきではない文字間に空白文字を挿入してしまうことを防止することができる。 According to the information processing program of claim 7, when a blank character is inserted into a character string having no blank character, no blank character is inserted between the characters to be inserted, or a blank character is It is possible to prevent a blank character from being inserted between characters that should not be inserted.
請求項8の情報処理プログラムによれば、空白文字がない文字列に対して空白文字を挿入する場合にあって、空白文字を挿入すべき文字間に空白文字を挿入しないこと、又は空白文字を挿入すべきではない文字間に空白文字を挿入してしまうことを防止することができる。 According to the information processing program of claim 8, when a blank character is inserted into a character string having no blank character, no blank character is inserted between the characters to be inserted, or a blank character is It is possible to prevent a blank character from being inserted between characters that should not be inserted.
以下、図面に基づき本発明を実現するにあたっての好適な一実施の形態の例を説明する。
図1は、本実施の形態の構成例についての概念的なモジュール構成図を示している。
なお、モジュールとは、一般的に論理的に分離可能なソフトウェア(コンピュータ・プログラム)、ハードウェア等の部品を指す。したがって、本実施の形態におけるモジュールはコンピュータ・プログラムにおけるモジュールのことだけでなく、ハードウェア構成におけるモジュールも指す。それゆえ、本実施の形態は、それらのモジュールとして機能させるためのコンピュータ・プログラム(コンピュータにそれぞれの手順を実行させるためのプログラム、コンピュータをそれぞれの手段として機能させるためのプログラム、コンピュータにそれぞれの機能を実現させるためのプログラム)、システム及び方法の説明をも兼ねている。ただし、説明の都合上、「記憶する」、「記憶させる」、これらと同等の文言を用いるが、これらの文言は、実施の形態がコンピュータ・プログラムの場合は、記憶装置に記憶させる、又は記憶装置に記憶させるように制御するの意である。また、モジュールは機能に一対一に対応していてもよいが、実装においては、1モジュールを1プログラムで構成してもよいし、複数モジュールを1プログラムで構成してもよく、逆に1モジュールを複数プログラムで構成してもよい。また、複数モジュールは1コンピュータによって実行されてもよいし、分散又は並列環境におけるコンピュータによって1モジュールが複数コンピュータで実行されてもよい。なお、1つのモジュールに他のモジュールが含まれていてもよい。また、以下、「接続」とは物理的な接続の他、論理的な接続(データの授受、指示、データ間の参照関係等)の場合にも用いる。「予め定められた」とは、対象としている処理の前に定まっていることをいい、本実施の形態による処理が始まる前はもちろんのこと、本実施の形態による処理が始まった後であっても、対象としている処理の前であれば、そのときの状況・状態に応じて、又はそれまでの状況・状態に応じて定まることの意を含めて用いる。「予め定められた値」が複数ある場合は、それぞれ異なった値であってもよいし、2以上の値(もちろんのことながら、全ての値も含む)が同じであってもよい。また、「Aである場合、Bをする」という意味を有する記載は、「Aであるか否かを判断し、Aであると判断した場合はBをする」の意味で用いる。ただし、Aであるか否かの判断が不要である場合を除く。
また、システム又は装置とは、複数のコンピュータ、ハードウェア、装置等がネットワーク(一対一対応の通信接続を含む)等の通信手段で接続されて構成されるほか、1つのコンピュータ、ハードウェア、装置等によって実現される場合も含まれる。「装置」と「システム」とは、互いに同義の用語として用いる。もちろんのことながら、「システム」には、人為的な取り決めである社会的な「仕組み」(社会システム)にすぎないものは含まない。
また、各モジュールによる処理毎に又はモジュール内で複数の処理を行う場合はその処理毎に、対象となる情報を記憶装置から読み込み、その処理を行った後に、処理結果を記憶装置に書き出すものである。したがって、処理前の記憶装置からの読み込み、処理後の記憶装置への書き出しについては、説明を省略する場合がある。なお、ここでの記憶装置としては、ハードディスク、RAM(Random Access Memory)、外部記憶媒体、通信回線を介した記憶装置、CPU(Central Processing Unit)内のレジスタ等を含んでいてもよい。
Hereinafter, an example of a preferred embodiment for realizing the present invention will be described with reference to the drawings.
FIG. 1 shows a conceptual module configuration diagram of a configuration example of the present embodiment.
The module generally refers to components such as software (computer program) and hardware that can be logically separated. Therefore, the module in the present embodiment indicates not only a module in a computer program but also a module in a hardware configuration. Therefore, the present embodiment is a computer program for causing these modules to function (a program for causing a computer to execute each procedure, a program for causing a computer to function as each means, and a function for each computer. This also serves as an explanation of the program and system and method for realizing the above. However, for the sake of explanation, the words “store”, “store”, and equivalents thereof are used. However, when the embodiment is a computer program, these words are stored in a storage device or stored in memory. It is the control to be stored in the device. Modules may correspond to functions one-to-one, but in mounting, one module may be configured by one program, or a plurality of modules may be configured by one program, and conversely, one module May be composed of a plurality of programs. The plurality of modules may be executed by one computer, or one module may be executed by a plurality of computers in a distributed or parallel environment. Note that one module may include other modules. Hereinafter, “connection” is used not only for physical connection but also for logical connection (data exchange, instruction, reference relationship between data, etc.). “Predetermined” means that the process is determined before the target process, and not only before the process according to this embodiment starts but also after the process according to this embodiment starts. In addition, if it is before the target processing, it is used in accordance with the situation / state at that time or with the intention to be decided according to the situation / state up to that point. When there are a plurality of “predetermined values”, they may be different values, or two or more values (of course, including all values) may be the same. In addition, the description having the meaning of “do B when it is A” is used in the meaning of “determine whether or not it is A and do B when it is judged as A”. However, the case where it is not necessary to determine whether or not A is excluded.
In addition, the system or device is configured by connecting a plurality of computers, hardware, devices, and the like by communication means such as a network (including one-to-one correspondence communication connection), etc., and one computer, hardware, device. The case where it implement | achieves by etc. is included. “Apparatus” and “system” are used as synonymous terms. Of course, the “system” does not include a social “mechanism” (social system) that is an artificial arrangement.
In addition, when performing a plurality of processes in each module or in each module, the target information is read from the storage device for each process, and the processing result is written to the storage device after performing the processing. is there. Therefore, description of reading from the storage device before processing and writing to the storage device after processing may be omitted. Here, the storage device may include a hard disk, a RAM (Random Access Memory), an external storage medium, a storage device via a communication line, a register in a CPU (Central Processing Unit), and the like.
本実施の形態である情報処理装置は、文字列に空白文字を挿入するものであって、図1の例に示すように、文字座標受付モジュール110、文字間変位算出モジュール120、文字コード受付モジュール130、空白検知モジュール140、空白挿入モジュール150を有している。
本実施の形態が対象とする文字列の言語は、単語間(又は文節間)に空白を必要とする言語である。このような言語の場合に、文字認識結果である文字列、電子文書であるPDF(Portable Document Format)(登録商標)等から取り出した文字列にあっては、空白文字が含まれていない場合がある。例えば、画像としては空白があるが、それを文字コードとして取り出す場合には空白文字がなく、単語が連続してつながっているような文字列となる場合である。本実施の形態は、このような文字列を対象として、空白文字を挿入する。
The information processing apparatus according to the present embodiment inserts a blank character into a character string. As shown in the example of FIG. 1, a character coordinate receiving
The language of the character string targeted by this embodiment is a language that requires a space between words (or between phrases). In such a language, a character string extracted from a character string as a character recognition result or a PDF (Portable Document Format) (registered trademark) as an electronic document may not include a blank character. is there. For example, there is a blank as an image, but when it is extracted as a character code, there is no blank character and the character string is such that words are connected continuously. In the present embodiment, a blank character is inserted for such a character string.
文字座標受付モジュール110は、文字間変位算出モジュール120と接続されている。文字座標受付モジュール110は、文字の位置を受け付ける。例えば、文字認識がされた文書画像の場合は文字の外接矩形(x、y、幅、高さ)、PDF等の電子文書の場合はフォントの外周座標(フォントの外周が存在する座標)を受け付ける。ここでの文字列は、空白文字が挿入されていないものである。例えば、文字の外接矩形として文字座標テーブル200がある。図2は、文字座標テーブル200のデータ構造例を示す説明図である。文字座標テーブル200には、文書ID欄210、行数欄212、行ID欄214、文字数欄216、文字ID欄218、X欄220、Y欄222、幅欄224、高欄226等がある。文書ID欄210は、その文書を本実施の形態で一意に識別するための情報(文書ID(IDentification)、文書名等)を記憶している。行数欄212は、その文書内にある行数を記憶している。その行数だけ行ID欄214がある。行ID欄214は、その文書内にある行を本実施の形態で一意に識別するための情報を記憶している。文字数欄216は、その行内にある文字数を記憶している。その文字数だけ文字ID欄218がある。文字ID欄218は、その行内にある文字を本実施の形態で一意に識別するための情報を記憶している。文字ID欄218は、X欄220、Y欄222、幅欄224、高欄226を有している。X欄220は、その文字の外接矩形の左上のX座標を記憶している。Y欄222は、その文字の外接矩形の左上のY座標を記憶している。幅欄224は、その文字の外接矩形の幅を記憶している。高欄226は、その文字の外接矩形の高さを記憶している。
The character coordinate
文字間変位算出モジュール120は、文字座標受付モジュール110、空白検知モジュール140と接続されている。文字間変位算出モジュール120は、文字座標受付モジュール110によって受け付けられた文字の位置から文字間の間隔を算出する。そして、その文字間の間隔からその間隔の変位を算出する。
例えば、横書きの場合は、文字の間隔とは、文字の外接矩形の右端のY座標から次の文字の外接矩形の左端のY座標までの距離である。前述の図2の文字座標テーブル200を用いた例では、(次の文字のY座標)−(対象文字のY座標+幅)によって文字の間隔を算出する。そして、間隔の変位とは、隣接する文字間の距離の差であって、(第2の文字と第3の文字の間隔)−(第1の文字と第2の文字の間隔)によって算出する。ここで、第1の文字とは対象とする文字であって、第2の文字は次の文字であって、第3の文字は次の次の文字である。
また、文字間変位算出モジュール120は、対象としている文字列が予め定められた文字列である場合又は文字間の間隔が0未満又は以下である場合に、その文字列内の文字間の間隔を修正するようにしてもよい。ここで、「文字間の間隔を修正する」とは、例えば、その行における文字間の間隔の統計的値(平均値、最頻値、中央値等)に修正する。
The inter-character
For example, in horizontal writing, the character spacing is the distance from the Y coordinate of the right end of the circumscribed rectangle of the character to the Y coordinate of the left end of the circumscribed rectangle of the next character. In the example using the character coordinate table 200 of FIG. 2 described above, the character spacing is calculated by (Y coordinate of the next character) − (Y coordinate of the target character + width). The interval displacement is a difference in distance between adjacent characters, and is calculated by (interval between second character and third character) − (interval between first character and second character). . Here, the first character is a target character, the second character is the next character, and the third character is the next character.
Further, the inter-character
文字コード受付モジュール130は、空白検知モジュール140と接続されている。文字コード受付モジュール130は、文字座標受付モジュール110が受け付けた文字の位置に対応する文字の文字コードを受け付ける。例えば、受け付ける文字の情報として文字コードテーブル300がある。図3は、文字コードテーブル300のデータ構造例を示す説明図である。文字コードテーブル300は、文字ID欄310、文字コード欄320を有している。文字ID欄310は、文字座標テーブル200における文字ID欄218に対応するものである。文字コード欄320は、その文字の文字コードを記憶している。したがって、文字座標テーブル200の文字ID欄218の文字IDが特定できれば、その文字コードを抽出することができる。逆に、文字コードテーブル300の文字ID欄310の文字IDが特定できれば、その文字の位置を抽出することができる。
文字コード受付モジュール130が受け付ける文字コードは、例えば、文書画像の場合は文字認識結果であり、電子文書の場合はその電子文書から文字列の複写等の操作によって抜き出した文字コード情報であり、文字間変位算出モジュール120が受け付けた文字の位置に対応するものである。そして、ここでの文字列は、空白文字が挿入されていないものである。
The character
The character code received by the character
空白検知モジュール140は、文字間変位算出モジュール120、文字コード受付モジュール130、空白挿入モジュール150と接続されている。空白検知モジュール140は、文字間変位算出モジュール120によって算出された変位から閾値を決定する。そして、文字間変位算出モジュール120によって算出された変位と閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する。ここで閾値の決定は、その行における変位の絶対値の平均値、最頻値、中央値等の統計的値である。
空白検知モジュール140は、第1の変位が閾値よりも大きい又は以上であって、第2の変位がその閾値の負の値よりも小さい又は以下である第1の条件を満たす場合は、文字間に空白文字を挿入すると判断するようにしてもよい。
ここでの条件は、具体的には、連続する4文字以上があることを対象としている。そのうちの第1番目の文字と第2番目の文字との間の間隔を第1の文字間隔といい、第2番目の文字と第3番目の文字との間の間隔を第2の文字間隔といい、第3番目の文字と第4番目の文字との間の間隔を第3の文字間隔という。そして、第1の文字間隔と第2の文字間隔の差分(第2の文字間隔から第1の文字間隔を減算した値)を第1の変位といい、第2の文字間隔と第3の文字間隔の差分(第3の文字間隔から第2の文字間隔を減算した値)を第2の変位という。
「閾値の負の値」とは、閾値をHとした場合の「−H」をいう。つまり、閾値に−1を乗算した値である。
そして、この条件A(第1の変位が閾値よりも大きい又は以上であって、第2の変位が閾値の負の値よりも小さい又は以下であること、図5に例示のフローチャート内のステップS518)を満たした場合は、第2の文字間隔(第2番目の文字と第3番目の文字との間の間隔)は空白であると判断する。条件を満たしていない場合は、第2の文字間隔は空白ではないと判断する。なお、空白文字を挿入するか否かを判断する文字間は、第2番目の文字と第3番目の文字との間の間隔である。つまり、第1の変位を算出するための後方の文字間隔(第2の変位を算出するための前方の文字間隔)である。
The
When the first displacement is greater than or equal to the threshold value and the second displacement is less than or less than the negative value of the threshold value, the blank
The condition here specifically targets that there are four or more consecutive characters. The interval between the first character and the second character is called the first character interval, and the interval between the second character and the third character is the second character interval. The interval between the third character and the fourth character is called the third character interval. The difference between the first character interval and the second character interval (the value obtained by subtracting the first character interval from the second character interval) is called the first displacement, and the second character interval and the third character The difference between the intervals (a value obtained by subtracting the second character interval from the third character interval) is referred to as a second displacement.
“Negative value of threshold” means “−H” when the threshold is H. That is, a value obtained by multiplying the threshold by -1.
Then, this condition A (the first displacement is greater than or equal to the threshold and the second displacement is less than or less than the negative value of the threshold, step S518 in the flowchart illustrated in FIG. 5). ) Is satisfied, it is determined that the second character interval (the interval between the second character and the third character) is blank. If the condition is not satisfied, it is determined that the second character interval is not blank. Note that the space between characters for determining whether or not to insert a blank character is an interval between the second character and the third character. That is, it is the character spacing behind for calculating the first displacement (the character spacing ahead for calculating the second displacement).
図4を用いて説明する。図4は、本実施の形態による処理例を示す説明図である。
対象とする文字列として「Who are you」であるとした場合に、その文字間の間隔は、「10、10、20、10、10、20、10、10」であり、変位は「0、+10、−10、0、+10、−10、0」である。したがって、閾値を変位の絶対値の平均値とした場合は5.7である。ここで文字間隔422(文字(o)420と文字(a)424間)に空白文字を挿入するか否かを判断する場合について説明する。文字間隔418と文字間隔422の変位は「+10」であり、閾値(5.7)より大きい。そして、文字間隔422と文字間隔426の変位は「−10」であり、閾値の負の値(−5.7)より小さい。したがって、文字間隔422には空白文字を挿入すると判断する。同様に、文字間隔434にも空白文字を挿入すると判断するが、その他の文字間には空白文字を挿入しないと判断する。
This will be described with reference to FIG. FIG. 4 is an explanatory diagram showing a processing example according to the present embodiment.
If the target character string is “Who are you”, the spacing between the characters is “10, 10, 20, 10, 10, 20, 10, 10”, and the displacement is “0, +10, -10, 0, +10, -10, 0 ". Therefore, when the threshold value is an average value of absolute values of displacement, it is 5.7. Here, a case will be described in which it is determined whether or not to insert a blank character in the character interval 422 (between the character (o) 420 and the character (a) 424). The displacement between the
また、空白検知モジュール140は、第1の条件を満たさない場合は、対象としている文字が予め定められた文字コードであって、第1の変位が閾値よりも大きい又は以上であって、第2の変位が閾値よりも小さい又は以下であって、第3の変位が閾値の負の値よりも小さい又は以下である第2の条件を満たす場合は、文字間に空白文字を挿入すると判断するようにしてもよい。空白文字を挿入するか否かを判断する文字間は、対象とする文字(予め定められた文字コードである文字)と前にある文字の間と、対象とする文字と次の文字の間のことである。
ここでの条件は、具体的には、連続する5文字以上があることを対象としている。4文字目までは前述と同じであり、第4番目の文字と第5番目の文字との間の間隔を第4の文字間隔という。そして、第3の文字間隔と第4の文字間隔の差分(第4の文字間隔から第3の文字間隔を減算した値)を第3の変位という。予め定められた文字コードとしては、例えば、「I」、「a」、「A」、「&」等の一文字で単語(文節)となり得るものである。つまり、その文字の両側は空白文字が挿入されている可能性が高いこととなる。
第1の条件を満たさない場合(図5に例示のフローチャート内のステップS518でNの場合)は、対象としている文字が予め定められた文字コードであって(図5に例示のフローチャート内のステップS522でYの場合)、第1の変位が閾値よりも大きい又は以上であって、第2の変位が閾値よりも小さい又は以下であって、第3の変位が閾値の負の値よりも小さい又は以下である第2の条件を満たす場合(図5に例示のフローチャート内のステップS524でYの場合)は、文字間に空白文字を挿入すると判断する。第2の条件を満たしていない場合は、その文字間には空白文字を挿入しないと判断する。
ここで空白文字を挿入する文字間は、2つある。1つは、第2の文字間隔(第2番目の文字と第3番目の文字との間の間隔)であり、もう1つは、第3の文字間隔(第3番目の文字と第4番目の文字との間の間隔)である。
Further, when the first condition is not satisfied, the blank
The condition here specifically targets that there are five or more consecutive characters. Up to the fourth character is the same as described above, and the interval between the fourth character and the fifth character is referred to as a fourth character interval. A difference between the third character interval and the fourth character interval (a value obtained by subtracting the third character interval from the fourth character interval) is referred to as a third displacement. As the predetermined character code, for example, one character such as “I”, “a”, “A”, “&” can be a word (sentence). That is, there is a high possibility that blank characters are inserted on both sides of the character.
When the first condition is not satisfied (N in step S518 in the flowchart illustrated in FIG. 5), the target character is a predetermined character code (step in the flowchart illustrated in FIG. 5). In the case of Y in S522), the first displacement is greater than or greater than the threshold, the second displacement is less than or less than the threshold, and the third displacement is less than the negative value of the threshold Alternatively, if the following second condition is satisfied (Y in step S524 in the flowchart illustrated in FIG. 5), it is determined that a blank character is inserted between characters. If the second condition is not satisfied, it is determined that no blank character is inserted between the characters.
Here, there are two spaces between which characters are inserted. One is the second character interval (the interval between the second character and the third character), and the other is the third character interval (the third character and the fourth character). The space between the characters.
図6を用いて説明する。図6は、本実施の形態による処理例を示す説明図である。
対象とする文字列として「is a pen」であるとした場合に、その文字間の間隔は、「10、20、20、10、10」であり、変位は「+10、0、−10、0」である。したがって、閾値を変位の絶対値の平均値とした場合は5(なお、閾値は4つの変位の絶対値の平均値としたが、正確には、この文字列の前後にも文字列があるので、それらの変位も含めた平均値とする必要があるが、ここでは説明のため便宜的に5とした)である。ここで対象とする文字が文字(a)620であり、予め定められた文字コードである場合に、文字間隔618(文字(s)616と文字(a)620間)と文字間隔622(文字(a)620と文字(p)624間)に空白文字を挿入するか否かを判断する場合について説明する。文字間隔614と文字間隔618の変位は「+10」であり、閾値(5)より大きい。そして、文字間隔618と文字間隔622の変位は「0」であり、閾値(5)より小さい。そして、文字間隔622と文字間隔626の変位は「−10」であり、閾値の負の値(−5)より小さい。したがって、文字間隔618と文字間隔622には空白文字を挿入すると判断する。
This will be described with reference to FIG. FIG. 6 is an explanatory diagram showing a processing example according to the present embodiment.
When it is assumed that the target character string is “is a pen”, the interval between the characters is “10, 20, 20, 10, 10”, and the displacement is “+10, 0, −10, 0”. Is. Therefore, when the threshold value is the average value of the absolute values of the displacement, the threshold value is 5 (note that the threshold value is the average value of the absolute values of the four displacements. It is necessary to set the average value including those displacements, but here it is set to 5 for the sake of convenience). Here, when the target character is the character (a) 620 and is a predetermined character code, the character interval 618 (between the character (s) 616 and the character (a) 620) and the character interval 622 (character ( a) A case where it is determined whether or not to insert a blank character between 620 and the character (p) 624) will be described. The displacement between the
また、空白検知モジュール140は、対象としている文字が行の最初の文字であって、予め定められた文字コードである場合に、第1の変位が閾値の負の値よりも小さい又は以下である第3の条件を満たす場合は、文字間に空白文字を挿入すると判断するようにしてもよい。空白文字を挿入する文字間は、第1の文字間隔(第1番目の文字と第2番目の文字との間の間隔)である。
ここで、予め定められた文字コードとしては、前述と同様に、例えば、「I」、「a」、「A」、「&」等の一文字で単語(文節)となり得るものである。つまり、その文字の両側は空白文字が挿入されている可能性が高いこととなる。ただし、行の先頭の文字であるため、その文字の前には文字がない。
対象としている文字が行の最初の文字であって、予め定められた文字コードである場合(図5に例示のフローチャート内のステップS516でNの場合)に、第1の変位が閾値の負の値よりも小さい又は以下である第3の条件を満たす場合(図5に例示のフローチャート内のステップS528でYの場合)は、文字間に空白文字を挿入すると判断する。第3の条件を満たしていない場合は、その文字間には空白文字を挿入しないと判断する。
In addition, the
Here, as the predetermined character code, for example, as described above, for example, one character such as “I”, “a”, “A”, “&” can be a word (sentence). That is, there is a high possibility that blank characters are inserted on both sides of the character. However, since it is the first character in the line, there is no character before that character.
When the target character is the first character in the line and is a predetermined character code (N in step S516 in the flowchart illustrated in FIG. 5), the first displacement is a negative threshold value. When the third condition that is less than or equal to the value is satisfied (Y in step S528 in the flowchart illustrated in FIG. 5), it is determined that a blank character is inserted between characters. If the third condition is not satisfied, it is determined that no blank character is inserted between the characters.
図7を用いて説明する。図7は、本実施の形態による処理例を示す説明図である。
対象とする文字列として「I am」であるとした場合に、その文字間の間隔は、「20、10」であり、変位は「−10」である。閾値は5であるとする。ここで対象とする文字が文字(I)712であり、予め定められた文字コードである場合に、文字間隔714(文字(I)712と文字(a)716間)に空白文字を挿入するか否かを判断する場合について説明する。文字間隔714と文字間隔718の変位は「−10」であり、閾値の負の値(−5)より小さい。したがって、文字間隔714には空白文字を挿入すると判断する。
なお、空白文字を挿入するか否かを判断する文字間は、対象とする文字(行の先頭文字)と次の文字の間のことである。
This will be described with reference to FIG. FIG. 7 is an explanatory diagram illustrating a processing example according to the present exemplary embodiment.
When the target character string is “I am”, the interval between the characters is “20, 10”, and the displacement is “−10”. It is assumed that the threshold is 5. If the target character is character (I) 712 and has a predetermined character code, whether or not to insert a blank character at character spacing 714 (between character (I) 712 and character (a) 716) The case of determining whether or not will be described. The displacement between the
Note that the space between characters for determining whether or not to insert a blank character is between the target character (the first character in the line) and the next character.
空白挿入モジュール150は、空白検知モジュール140と接続されている。空白挿入モジュール150は、空白検知モジュール140によって空白文字を挿入すると判断された場合に、文字間に空白文字を挿入する。これによって、空白文字が挿入された文章が生成される。図8は、空白挿入モジュール150による出力例を示す説明図である。図8(a)の例は図4の例に対する出力結果であり、「Who」と「are」の間と「are」と「you」の間に空白が挿入されており、図8(b)の例は図6の例に対する出力結果であり、「This」と「is」の間、「a」の両隣に空白が挿入されており、図8(c)の例は図7の例に対する出力結果であり、「I」と「am」の間、「a」の両隣に空白が挿入されている。
The
図5は、本実施の形態による処理例を示すフローチャートである。
ステップS502では、文字座標受付モジュール110と文字コード受付モジュール130が、行毎に文字座標と文字コードを受け付ける。
ステップS504では、文字間変位算出モジュール120が、文字間を算出する。
ステップS506では、文字間変位算出モジュール120が、隣り合う文字間の変位を算出する。
ステップS508では、ステップS534までの処理を行毎に繰り返す。
FIG. 5 is a flowchart showing an example of processing according to the present embodiment.
In step S502, the character coordinate receiving
In step S504, the inter-character
In step S506, the inter-character
In step S508, the process up to step S534 is repeated for each row.
ステップS510では、空白検知モジュール140が、予め定められた文字列である場合、文字間の間隔を調整する。ここでの予め定められた文字列とは、「fi」、「fj」、「oj」、「ij」、「rj」等がある。これらの文字列における文字間は、負の値となることがあるためである。これらの文字列があると判断した場合は、その文字間は、その行における文字間の間隔の統計的値(平均値、最頻値、中央値等)に修正する。また、予め定められた文字列であると判断することの他に、文字間の間隔が負の値(又は0以下)であるか否かを判断するようにしてもよい。負の値(又は0以下)である場合は、その文字間は、その行における文字間の間隔の統計的値に修正する。そして、その修正した間隔にかかわる変位については算出し直す(ステップS506を再度処理する)。
In step S510, if the blank
ステップS512では、空白検知モジュール140が、その行における変位の絶対値の平均値を算出し、それを基準に閾値THを決定する。
ステップS514では、ステップS530までの処理を文字間毎に繰り返す。
ステップS516では、空白検知モジュール140が、対象としている行において、最初の一文字であって、予め定められたコードであるか否かを判断し、予め定められたコードである場合はステップS528へ進み、それ以外の場合はステップS518へ進む。
ステップS518では、空白検知モジュール140が、対象文字間の変位>TH、次の文字間の変位<−THであるか否かを判断し、対象文字間の変位>TH、次の文字間の変位<−THである場合はステップS520へ進み、それ以外の場合はステップS522へ進む。
In step S512, the
In step S514, the process up to step S530 is repeated for each character.
In step S516, the blank
In step S518, the blank
ステップS520では、空白検知モジュール140が、対象とする文字間は空白であると判断する。
ステップS522では、空白検知モジュール140が、対象の文字が予め定められた文字コードであるか否かを判断し、予め定められた文字コードである場合はステップS524へ進み、それ以外の場合はステップS526へ進む。
ステップS524では、空白検知モジュール140が、対象文字間の変位>TH、次の文字間の変位の絶対値<TH、次の次の文字間の変位<−THであるか否かを判断し、対象文字間の変位>TH、次の文字間の変位の絶対値<TH、次の次の文字間の変位<−THである場合はステップS520へ進み、それ以外の場合はステップS526へ進む。
ステップS526では、空白検知モジュール140が、対象とする文字間は空白ではないと判断する。
In step S520, the
In step S522, the blank
In step S524, the blank
In step S526, the
ステップS528では、空白検知モジュール140が、対象文字間の変位<−THであるか否かを判断し、対象文字間の変位<−THである場合はステップS520へ進み、それ以外の場合はステップS526へ進む。
ステップS530では、文字間毎に繰り返すことを終了する。
ステップS532では、空白挿入モジュール150が、空白文字を追加した文字列を作成する。
ステップS534では、行毎に繰り返すことを終了する。
In step S528, the blank
In step S530, the repetition is repeated for each character.
In step S532, the
In step S534, the repetition for each row ends.
図9を参照して、本実施の形態の情報処理装置のハードウェア構成例について説明する。図9に示す構成は、例えばパーソナルコンピュータ(PC)などによって構成されるものであり、スキャナ等のデータ読み取り部917と、プリンタなどのデータ出力部918を備えたハードウェア構成例を示している。
A hardware configuration example of the information processing apparatus according to the present embodiment will be described with reference to FIG. The configuration illustrated in FIG. 9 is configured by, for example, a personal computer (PC), and illustrates a hardware configuration example including a
CPU(Central Processing Unit)901は、前述の実施の形態において説明した各種のモジュール、すなわち、文字座標受付モジュール110、文字間変位算出モジュール120、文字コード受付モジュール130、空白検知モジュール140、空白挿入モジュール150等の各モジュールの実行シーケンスを記述したコンピュータ・プログラムにしたがった処理を実行する制御部である。
A CPU (Central Processing Unit) 901 includes various modules described in the above-described embodiments, that is, the character coordinate
ROM(Read Only Memory)902は、CPU901が使用するプログラムや演算パラメータ等を格納する。RAM(Random Access Memory)903は、CPU901の実行において使用するプログラムや、その実行において適宜変化するパラメータ等を格納する。これらはCPUバスなどから構成されるホストバス904により相互に接続されている。
A ROM (Read Only Memory) 902 stores programs used by the
ホストバス904は、ブリッジ905を介して、PCI(Peripheral Component Interconnect/Interface)バスなどの外部バス906に接続されている。
The
キーボード908、マウス等のポインティングデバイス909は、操作者により操作される入力デバイスである。ディスプレイ910は、液晶表示装置又はCRT(Cathode Ray Tube)などがあり、各種情報をテキストやイメージ情報として表示する。
A
HDD(Hard Disk Drive)911は、ハードディスクを内蔵し、ハードディスクを駆動し、CPU901によって実行するプログラムや情報を記録又は再生させる。ハードディスクには、文字座標テーブル200、文字コードテーブル300、処理結果である空白文字が挿入された文字列などが格納される。さらに、その他の各種のデータ処理プログラム等、各種コンピュータ・プログラムが格納される。
An HDD (Hard Disk Drive) 911 includes a hard disk, drives the hard disk, and records or reproduces a program executed by the
ドライブ912は、装着されている磁気ディスク、光ディスク、光磁気ディスク、又は半導体メモリ等のリムーバブル記録媒体913に記録されているデータ又はプログラムを読み出して、そのデータ又はプログラムを、インタフェース907、外部バス906、ブリッジ905、及びホストバス904を介して接続されているRAM903に供給する。リムーバブル記録媒体913も、ハードディスクと同様のデータ記録領域として利用可能である。
The
接続ポート914は、外部接続機器915を接続するポートであり、USB、IEEE1394等の接続部を持つ。接続ポート914は、インタフェース907、及び外部バス906、ブリッジ905、ホストバス904等を介してCPU901等に接続されている。通信部916は、通信回線に接続され、外部とのデータ通信処理を実行する。データ読み取り部917は、例えばスキャナであり、ドキュメントの読み取り処理を実行する。データ出力部918は、例えばプリンタであり、ドキュメントデータの出力処理を実行する。
The
なお、図9に示す情報処理装置のハードウェア構成は、1つの構成例を示すものであり、本実施の形態は、図9に示す構成に限らず、本実施の形態において説明したモジュールを実行可能な構成であればよい。例えば、一部のモジュールを専用のハードウェア(例えば特定用途向け集積回路(Application Specific Integrated Circuit:ASIC)等)で構成してもよく、一部のモジュールは外部のシステム内にあり通信回線で接続しているような形態でもよく、さらに図9に示すシステムが複数互いに通信回線によって接続されていて互いに協調動作するようにしてもよい。また、複写機、ファックス、スキャナ、プリンタ、複合機(スキャナ、プリンタ、複写機、ファックス等のいずれか2つ以上の機能を有している画像処理装置)などに組み込まれていてもよい。 Note that the hardware configuration of the information processing apparatus illustrated in FIG. 9 illustrates one configuration example, and the present embodiment is not limited to the configuration illustrated in FIG. 9, and the modules described in the present embodiment are executed. Any configuration is possible. For example, some modules may be configured with dedicated hardware (for example, Application Specific Integrated Circuit (ASIC), etc.), and some modules are in an external system and connected via a communication line In addition, a plurality of systems shown in FIG. 9 may be connected to each other via communication lines so as to cooperate with each other. Further, it may be incorporated in a copying machine, a fax machine, a scanner, a printer, a multifunction machine (an image processing apparatus having any two or more functions of a scanner, a printer, a copying machine, a fax machine, etc.).
前述の実施の形態においては、横書きの例を示したが、縦書きであってもよい。また、言語として英語を例示したが、単語間(又は文節間)に空白を必要とする言語であれば、他の言語であってもよい。例えば、フランス語、ドイツ語、ポルトガル語、韓国語等がある。
また、前述の実施の形態の説明において、閾値等との比較において、「以上」、「以下」、「より大きい」、「より小さい(未満)」としたものは、その組み合わせに矛盾が生じない限り、それぞれ「より大きい」、「より小さい(未満)」、「以上」、「以下」としてもよい。
In the above-described embodiment, an example of horizontal writing is shown, but vertical writing may be used. Moreover, although English was illustrated as a language, as long as it is a language which requires the space between words (or between phrases), another language may be sufficient. For example, there are French, German, Portuguese and Korean.
Further, in the description of the above-described embodiment, in the comparison with the threshold value or the like, the combinations of “more than”, “less than”, “greater than”, and “less than (less than)” do not contradict the combination. As long as it is “larger”, “smaller (less than)”, “greater than”, and “less than”, respectively.
前述の空白検知モジュール140は、文字間変位算出モジュール120によって算出された変位から閾値を決定したが、変形例として、言語によっては文字間の間隔の情報を使って閾値を決定してもよい。例えば、韓国語等は文字間の間隔の統計的値(平均値、最頻値、中央値等)を閾値として採用してもよい。具体的には、空白検知モジュール140は、文字間変位算出モジュール120によって算出された文字間の間隔から閾値を決定する。そして、文字間隔算出モジュール120によって算出された変位と閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する。
また、対象とする言語によって、前述の実施の形態を用いるか、この変形例を用いるかを決定するようにしてもよい。具体的には、前述の実施の形態を適用するのに適した言語又は変形例を適用するのに適した言語を記憶しているテーブルを用意しておき、対象とする言語がそのテーブルにあるか否かを判断して、前述の実施の形態を用いるか、この変形例を用いるかを決定する。
The blank
Further, whether to use the above-described embodiment or this modification may be determined depending on the target language. Specifically, a table storing a language suitable for applying the above-described embodiment or a language suitable for applying the modified example is prepared, and the target language is in the table. Whether or not to use the above-described embodiment or this modification is determined.
なお、説明したプログラムについては、記録媒体に格納して提供してもよく、また、そのプログラムを通信手段によって提供してもよい。その場合、例えば、前記説明したプログラムについて、「プログラムを記録したコンピュータ読み取り可能な記録媒体」の発明として捉えてもよい。
「プログラムを記録したコンピュータ読み取り可能な記録媒体」とは、プログラムのインストール、実行、プログラムの流通などのために用いられる、プログラムが記録されたコンピュータで読み取り可能な記録媒体をいう。
なお、記録媒体としては、例えば、デジタル・バーサタイル・ディスク(DVD)であって、DVDフォーラムで策定された規格である「DVD−R、DVD−RW、DVD−RAM等」、DVD+RWで策定された規格である「DVD+R、DVD+RW等」、コンパクトディスク(CD)であって、読出し専用メモリ(CD−ROM)、CDレコーダブル(CD−R)、CDリライタブル(CD−RW)等、ブルーレイ・ディスク(Blu−ray Disc(登録商標))、光磁気ディスク(MO)、フレキシブルディスク(FD)、磁気テープ、ハードディスク、読出し専用メモリ(ROM)、電気的消去及び書換可能な読出し専用メモリ(EEPROM(登録商標))、フラッシュ・メモリ、ランダム・アクセス・メモリ(RAM)、SD(Secure Digital)メモリーカード等が含まれる。
そして、前記のプログラム又はその一部は、前記記録媒体に記録して保存や流通等させてもよい。また、通信によって、例えば、ローカル・エリア・ネットワーク(LAN)、メトロポリタン・エリア・ネットワーク(MAN)、ワイド・エリア・ネットワーク(WAN)、インターネット、イントラネット、エクストラネット等に用いられる有線ネットワーク、あるいは無線通信ネットワーク、さらにこれらの組み合わせ等の伝送媒体を用いて伝送させてもよく、また、搬送波に乗せて搬送させてもよい。
さらに、前記のプログラムは、他のプログラムの一部分であってもよく、あるいは別個のプログラムと共に記録媒体に記録されていてもよい。また、複数の記録媒体に分割して
記録されていてもよい。また、圧縮や暗号化など、復元可能であればどのような態様で記録されていてもよい。
The program described above may be provided by being stored in a recording medium, or the program may be provided by communication means. In that case, for example, the above-described program may be regarded as an invention of a “computer-readable recording medium recording the program”.
The “computer-readable recording medium on which a program is recorded” refers to a computer-readable recording medium on which a program is recorded, which is used for program installation, execution, program distribution, and the like.
The recording medium is, for example, a digital versatile disc (DVD), which is a standard established by the DVD Forum, such as “DVD-R, DVD-RW, DVD-RAM,” and DVD + RW. Standard “DVD + R, DVD + RW, etc.”, compact disc (CD), read-only memory (CD-ROM), CD recordable (CD-R), CD rewritable (CD-RW), Blu-ray disc ( Blu-ray Disc (registered trademark), magneto-optical disk (MO), flexible disk (FD), magnetic tape, hard disk, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM (registered trademark)) )), Flash memory, Random access memory (RAM) SD (Secure Digital) memory card and the like.
The program or a part of the program may be recorded on the recording medium for storage or distribution. Also, by communication, for example, a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a wired network used for the Internet, an intranet, an extranet, etc., or wireless communication It may be transmitted using a transmission medium such as a network or a combination of these, or may be carried on a carrier wave.
Furthermore, the program may be a part of another program, or may be recorded on a recording medium together with a separate program. Moreover, it may be divided and recorded on a plurality of recording media. Further, it may be recorded in any manner as long as it can be restored, such as compression or encryption.
110…文字座標受付モジュール
120…文字間変位算出モジュール
130…文字コード受付モジュール
140…空白検知モジュール
150…空白挿入モジュール
DESCRIPTION OF
Claims (8)
前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、
前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、
前記第2の算出手段によって算出された変位から閾値を決定する決定手段と、
前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、
前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段
を具備することを特徴とする情報処理装置。 A receiving means for receiving the position of the character;
First calculating means for calculating an interval between characters from the position of the character received by the receiving means;
Second calculating means for calculating a displacement of the spacing from the spacing between the characters calculated by the first calculating means;
Determining means for determining a threshold value from the displacement calculated by the second calculating means;
Determining means for determining whether or not to insert a blank character between characters based on the relationship between the displacement calculated by the second calculating means and the threshold value determined by the determining means;
An information processing apparatus comprising: an insertion unit that inserts a blank character between the characters when the determination unit determines to insert a blank character.
ことを特徴とする請求項1に記載の情報処理装置。 If the first displacement is greater than or equal to the threshold value and the second displacement is less than or less than the negative value of the threshold value, the determination means satisfies the first character. The information processing apparatus according to claim 1, wherein it is determined that a blank character is inserted between them.
前記判断手段は、前記第1の条件を満たさない場合は、対象としている文字が予め定められた文字コードであって、前記第1の変位が前記閾値よりも大きい又は以上であって、前記第2の変位が該閾値よりも小さい又は以下であって、第3の変位が該閾値の負の値よりも小さい又は以下である第2の条件を満たす場合は、前記文字間に空白文字を挿入すると判断する
ことを特徴とする請求項2に記載の情報処理装置。 The accepting means further accepts a character code of the character;
When the determination means does not satisfy the first condition, the target character is a predetermined character code, and the first displacement is greater than or greater than the threshold, and the first If the second displacement is less than or less than the threshold value and the third displacement is less than or less than the negative value of the threshold value, a blank character is inserted between the characters. The information processing apparatus according to claim 2, wherein the information processing apparatus is determined to be.
ことを特徴とする請求項1から3のいずれか一項に記載の情報処理装置。 In the third determining unit, the first displacement is smaller than or less than the negative value of the threshold when the target character is the first character in the line and is a predetermined character code. The information processing apparatus according to any one of claims 1 to 3, wherein when the condition of the above is satisfied, it is determined that a blank character is inserted between the characters.
ことを特徴とする請求項1から4のいずれか一項に記載の情報処理装置。 The first calculation means corrects the spacing between characters in the character string when the target character string is a predetermined character string or when the spacing between characters is less than or less than zero. The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、
前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、
前記第1の算出手段によって算出された文字間の間隔から閾値を決定する決定手段と、
前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、
前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段
を具備することを特徴とする情報処理装置。 A receiving means for receiving the position of the character;
First calculating means for calculating an interval between characters from the position of the character received by the receiving means;
Second calculating means for calculating a displacement of the spacing from the spacing between the characters calculated by the first calculating means;
Determining means for determining a threshold value from an interval between characters calculated by the first calculating means;
Determining means for determining whether or not to insert a blank character between characters based on the relationship between the displacement calculated by the second calculating means and the threshold value determined by the determining means;
An information processing apparatus comprising: an insertion unit that inserts a blank character between the characters when the determination unit determines to insert a blank character.
文字の位置を受け付ける受付手段と、
前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、
前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、
前記第2の算出手段によって算出された変位から閾値を決定する決定手段と、
前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、
前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段
として機能させるための情報処理プログラム。 Computer
A receiving means for receiving the position of the character;
First calculating means for calculating an interval between characters from the position of the character received by the receiving means;
Second calculating means for calculating a displacement of the spacing from the spacing between the characters calculated by the first calculating means;
Determining means for determining a threshold value from the displacement calculated by the second calculating means;
Determining means for determining whether or not to insert a blank character between characters based on the relationship between the displacement calculated by the second calculating means and the threshold value determined by the determining means;
An information processing program for functioning as an insertion unit that inserts a blank character between the characters when the determination unit determines to insert a blank character.
文字の位置を受け付ける受付手段と、
前記受付手段によって受け付けられた文字の位置から文字間の間隔を算出する第1の算出手段と、
前記第1の算出手段によって算出された文字間の間隔から該間隔の変位を算出する第2の算出手段と、
前記第1の算出手段によって算出された文字間の間隔から閾値を決定する決定手段と、
前記第2の算出手段によって算出された変位と前記決定手段によって決定された閾値との関係に基づいて、文字間に空白文字を挿入するか否かを判断する判断手段と、
前記判断手段によって空白文字を挿入すると判断された場合に、前記文字間に空白文字を挿入する挿入手段
として機能させるための情報処理プログラム。 Computer
A receiving means for receiving the position of the character;
First calculating means for calculating an interval between characters from the position of the character received by the receiving means;
Second calculating means for calculating a displacement of the spacing from the spacing between the characters calculated by the first calculating means;
Determining means for determining a threshold value from an interval between characters calculated by the first calculating means;
Determining means for determining whether or not to insert a blank character between characters based on the relationship between the displacement calculated by the second calculating means and the threshold value determined by the determining means;
An information processing program for functioning as an insertion unit that inserts a blank character between the characters when the determination unit determines to insert a blank character.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012156514A JP5949248B2 (en) | 2012-07-12 | 2012-07-12 | Information processing apparatus and information processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2012156514A JP5949248B2 (en) | 2012-07-12 | 2012-07-12 | Information processing apparatus and information processing program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2014021533A JP2014021533A (en) | 2014-02-03 |
JP5949248B2 true JP5949248B2 (en) | 2016-07-06 |
Family
ID=50196391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2012156514A Expired - Fee Related JP5949248B2 (en) | 2012-07-12 | 2012-07-12 | Information processing apparatus and information processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5949248B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6528927B2 (en) * | 2014-08-20 | 2019-06-12 | 富士ゼロックス株式会社 | Document processing apparatus and program |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2915175B2 (en) * | 1990-10-01 | 1999-07-05 | 株式会社エフ・エフ・シー | Word space detection method |
JPH0567237A (en) * | 1991-05-13 | 1993-03-19 | Hitachi Eng Co Ltd | Method and device for blank recognition, character recognition device and english/japanese trasnslation device |
-
2012
- 2012-07-12 JP JP2012156514A patent/JP5949248B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2014021533A (en) | 2014-02-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6119952B2 (en) | Image processing apparatus and image processing program | |
JP4623169B2 (en) | Image processing apparatus and image processing program | |
JP5862260B2 (en) | Information processing apparatus and information processing program | |
JP2009251872A (en) | Information processing device and information processing program | |
JP2009223477A (en) | Information processor and information processing program | |
JP5949248B2 (en) | Information processing apparatus and information processing program | |
JP6221220B2 (en) | Image processing apparatus and image processing program | |
JP5601027B2 (en) | Image processing apparatus and image processing program | |
JP6421568B2 (en) | Information processing apparatus and information processing program | |
JP5928714B2 (en) | Information processing apparatus and information processing program | |
JP6131765B2 (en) | Information processing apparatus and information processing program | |
JP6201838B2 (en) | Information processing apparatus and information processing program | |
JP2013149014A (en) | Information processor and information processing program | |
JP6187307B2 (en) | Image processing apparatus and image processing program | |
JP2015153352A (en) | Image processor and image processing program | |
JP5062076B2 (en) | Information processing apparatus and information processing program | |
JP5935324B2 (en) | Information processing apparatus and information processing program | |
JP6003375B2 (en) | Image processing apparatus and image processing program | |
JP6003677B2 (en) | Image processing apparatus and image processing program | |
JP2010039810A (en) | Image processor and image processing program | |
JP6303531B2 (en) | Image processing apparatus and image processing program | |
JP6409423B2 (en) | Image processing apparatus and image processing program | |
JP4900271B2 (en) | Information processing apparatus and information processing program | |
JP6281309B2 (en) | Image processing apparatus and image processing program | |
JP6554804B2 (en) | Information processing apparatus and information processing program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20150306 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20151211 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20151215 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20160202 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20160510 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20160523 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5949248 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
LAPS | Cancellation because of no payment of annual fees |