JP3081622B2 - Telephone number stylization device and telephone number stylization method - Google Patents

Telephone number stylization device and telephone number stylization method

Info

Publication number
JP3081622B2
JP3081622B2 JP02134656A JP13465690A JP3081622B2 JP 3081622 B2 JP3081622 B2 JP 3081622B2 JP 02134656 A JP02134656 A JP 02134656A JP 13465690 A JP13465690 A JP 13465690A JP 3081622 B2 JP3081622 B2 JP 3081622B2
Authority
JP
Japan
Prior art keywords
data
character
telephone number
delimiter
predetermined
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP02134656A
Other languages
Japanese (ja)
Other versions
JPH0430647A (en
Inventor
薫 中林
晃 持田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP02134656A priority Critical patent/JP3081622B2/en
Publication of JPH0430647A publication Critical patent/JPH0430647A/en
Application granted granted Critical
Publication of JP3081622B2 publication Critical patent/JP3081622B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、コンピュータで扱う電話番号データを任意
の形式から規定の形式に自動的に変換する電話番号定型
化装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a telephone number stabilizing apparatus for automatically converting telephone number data handled by a computer from an arbitrary format to a prescribed format.

[従来の技術] 外部から電話番号データを取り込んだ場合、例えば文
字認識で名刺の電話番号を取得した場合や他の住所録デ
ータベース等からのデータコンバートすることによって
電話番号データを取得した場合などは、電話番号データ
の形式は統一されない。このため、電話番号データのよ
うに規定の形式に統一したい場合、人手で修正して定型
化するしか無かった。
[Prior Art] When telephone number data is taken in from outside, for example, when a telephone number of a business card is obtained by character recognition, or when telephone number data is obtained by converting data from another address book database or the like, However, the format of telephone number data is not unified. For this reason, if it is desired to unify the data into a prescribed format, such as telephone number data, the only option is to manually correct and standardize the data.

[発明が解決しようとする課題] しかし、手作業での電話番号データの定型化は大変な
労力を要していた。また常に修正ミスを起こす危険性が
あった。
[Problems to be Solved by the Invention] However, manual stylization of telephone number data requires a great deal of labor. There was also the danger of making mistakes.

本発明の目的は、電話番号データの定型化をコンピュ
ータで全て自動的に処理する電話番号定型化装置を提供
することである。
SUMMARY OF THE INVENTION An object of the present invention is to provide a telephone number stabilizing apparatus that automatically processes all standardized telephone number data by a computer.

[課題を解決するための手段] 上記目的を達成するため、特許請求の範囲第1項に記
載の発明は、入力された任意の電話番号データを所定の
形式に定型化して記憶部に格納する電話番号定型化装置
であって、前記電話番号データを区切られた文字データ
として取り出す文字取得手段と、取得された前記文字デ
ータの文字種を特定する文字種判定手段と、判定された
文字種に基づいて数字を表す文字データと、該文字デー
タ間の局番の区切り位置を表すデータとを特定し、他の
データを破棄する文字選別手段と、前記数字を表す数種
の文字データを所定の数字表記に統一させて変換すると
ともに、前記局番の区切り位置を所定の局番区切り文字
で区切りつつ前記記憶部に格納する文字変換手段とを備
えた構成としてある。
[Means for Solving the Problems] In order to achieve the above object, according to the invention described in claim 1, the input arbitrary telephone number data is formatted into a predetermined format and stored in a storage unit. A phone number stylizing device, a character obtaining means for extracting the telephone number data as delimited character data, a character type determining means for specifying a character type of the obtained character data, and a numeral based on the determined character type. Character data representing the character data and the data representing the location of the station number between the character data, and character selecting means for discarding other data, and several types of character data representing the numerals are unified into a predetermined numeral representation. And a character conversion unit for storing the data in the storage unit while separating the station number delimiter position by a predetermined station number delimiter character.

また、特許請求の範囲第2項に記載の発明は、特許請
求の範囲第1項に記載の電話番号定型化装置において、
前記文字変換手段は、市外局番と局番の後以外の不当な
位置の局番の区切りを表す文字を破棄するとともに、所
定位置に1文字の局番区切りだけを入れる構成としてあ
る。
The invention described in claim 2 is a telephone number stabilizing apparatus according to claim 1, wherein:
The character conversion means is configured to discard a character indicating an area code division at an improper position other than after the area code and the area code, and enter only one character area code division at a predetermined position.

さらに、特許請求の範囲第3項に記載の発明は、特許
請求の範囲第1項または第2項のいずれかに記載の電話
番号定型化装置において、電話番号の市外局番桁数を記
憶する市外局番辞書と、変換された電話番号データにつ
いて前記市外局番辞書を用いて局番区切り位置を算出す
る区切り位置算出手段と、前記区切り位置算出手段で算
出した局番区切り位置で前記電話番号データを区切る局
番区切り手段とを有する構成としてある。
Further, according to the invention described in claim 3, in the telephone number stabilizing apparatus according to any one of claims 1 and 2, the number of the area code of the telephone number is stored. An area code dictionary, a delimiter position calculating means for calculating the area number delimiter position using the area code dictionary for the converted telephone number data, and the telephone number data at the area number delimiter position calculated by the delimiter position calculation means. It is configured to have station number separating means for separating.

さらに、特許請求の範囲第4項に記載の発明は、入力
された任意の形式の電話番号データを所定の形式に定型
化して記憶部に格納する電話番号定型化方法であって、
前記電話番号データを所定数の文字データずつ取り出し
てその文字種を特定し、判定された文字種に基づいて数
字を表す文字データと該文字データ間の局番の区切り位
置を表すデータとを特定して他のデータを破棄するとと
もに、前記数字を表す数種の文字データを所定の数字表
記に統一させて変換するとともに、前記局番の区切り位
置を所定の局番区切り文字で区切りつつ前記記憶部に格
納する構成としてある。
Further, the invention described in claim 4 is a telephone number standardization method for standardizing input telephone number data in an arbitrary format into a predetermined format and storing the data in a storage unit,
The telephone number data is taken out by a predetermined number of character data at a time and its character type is specified, and character data representing a number and data representing a position where a station number is separated between the character data are specified based on the determined character type. In addition to discarding the data of the above, the character data representing the numerals are converted into a predetermined numeral notation and converted, and the division positions of the office numbers are stored in the storage unit while being separated by the predetermined office number separator. There is.

[作用] 上記のように構成した特許請求の範囲第1項に記載の
発明においては、文字取得手段が入力された任意の形式
の電話番号データから区切られた文字データとして取り
出すと、文字種判定手段は同取得された文字データの文
字種を特定する。文字種が特定されることにより、文字
選別手段は次のようにする。すなわち、数字を表す文字
データと、該文字データ間の局番の区切り位置を表すデ
ータとを特定し、他のデータを破棄する。この結果、数
字を表す文字データと局番の区切り位置を表すデータと
だけが残り、文字変換手段は前記数字を表す文字データ
を所定の数字表記に統一させて変換するとともに、前記
局番の区切り位置を識別可能にして前記変換された数字
を表す文字データを記憶部に格納する。このようにし
て、入力された任意の形式の電話番号データは、所定の
数字表記の形式に定型化されて記憶部に格納される。
[Operation] In the invention according to claim 1 configured as described above, when the character obtaining unit extracts the character data separated from the input telephone number data in any format, the character type determining unit Specifies the character type of the acquired character data. When the character type is specified, the character selection means performs the following. That is, character data representing a number and data representing a position where a station number is separated between the character data are specified, and other data is discarded. As a result, only the character data representing the number and the data representing the location of the station number remain, and the character conversion means converts the character data representing the number into a predetermined number notation and converts the data, and sets the location of the station number as the delimiter. Character data representing the converted number is stored in the storage unit so as to be identifiable. In this way, the input telephone number data in an arbitrary format is formatted into a predetermined numerical notation format and stored in the storage unit.

また、上記のように構成した特許請求の範囲第2項に
記載の発明においては、前記局番の区切り位置が識別可
能にしつつ前記変換された数字を表す文字データを記憶
部に格納するにあたり、前記文字変換手段は、前記文字
データの文字種が局番の区切りを表す文字の場合に所定
の局番区切り文字に変換し、前記変換された数字を表す
文字データとともに前記記憶部に格納する。
Further, in the invention according to claim 2 configured as described above, when storing the character data representing the converted number in the storage unit while making the separation position of the station number identifiable, When the character type of the character data is a character indicating a division of a station number, the character conversion means converts the character data into a predetermined station number delimiter character and stores the character data together with the character data representing the converted numeral in the storage unit.

さらに、上記のように構成した特許請求の範囲第3項
に記載の発明は、局番の区切りを表す文字を所定の局番
区切り文字に変換するにあたり、前記文字変換手段は、
市外局番と局番の後以外の不当な位置の局番の区切りを
表す文字を破棄する。そして、所定位置に1文字の局番
区切り文字だけを入れる。
Further, in the invention according to claim 3 configured as described above, when converting a character indicating a division of an office number into a predetermined office number delimiter, the character conversion unit includes:
Discard the characters indicating the delimiter of the illegally located area code other than the area code and the area code. Then, only one station number delimiter is inserted at a predetermined position.

文字取得手段は入力された任意の形式の電話番号デー
タから区切られた文字データとして取り出すが、後段の
処理との関係で任意の区切りの文字数とすればよい。従
って、取得する文字数は1文字であっても良いし、より
多くの文字であっても良い。
The character obtaining means extracts character data delimited from the input telephone number data in an arbitrary format, but may set the number of characters at an arbitrary delimiter in relation to subsequent processing. Therefore, the number of characters to be acquired may be one or more.

文字種判定手段は任意の形式の電話番号データについ
て取得された文字データの文字種を特定するものであ
り、少なくとも数字を表す文字データと局番の区切り位
置を表すデータの文字種を特定できればよい。ここにい
う数字を表す文字データには全角アラビア数字や半角ア
ラビア数字の他、漢数字やその他の数字データが含まれ
る。また、区切り位置を表すデータはハイフンや括弧の
みならず、中黒などの他の記号なども含まれる。
The character type determining means specifies the character type of the character data obtained for the telephone number data in an arbitrary format, and it is sufficient that at least the character type of the character data representing a number and the data type representing the delimiter position of a station number can be specified. The character data representing the numbers here includes full-width Arabic numerals and half-width Arabic numerals, as well as Chinese numerals and other numeral data. The data indicating the delimiter position includes not only hyphens and parentheses but also other symbols such as bullets.

文字選別手段ば判定された文字種に基づいて所定のデ
ータ以外を破棄する。電話番号データについては区切り
文字が入るべき位置と数は限られているため、数字を表
す文字データとの相対的な位置関係から判定するように
しても良い。電話番号の構成から考えると局番の区切り
位置は、市外局番後と局番の後という二ケ所であるが、
一般的には括弧でくくるなりして余分に利用することも
ある。従って、変換前の電話番号データの区切り文字を
そのまま所定の表記に沿った区切り文字に置き換えるだ
けでは余分な区切り文字が入りかねない。そのような場
合を含めて市外局番と局番の後以外の不当な位置の局番
の区切りを表す文字を破棄する。むろん、名刺などに電
話番号と共に書き込まれている本支店名や電話種類な
ど、本来の数字以外のデータを破棄することはいうまで
もない。
The character selection means discards data other than predetermined data based on the determined character type. Since the position and the number where the delimiter character should be inserted are limited in the telephone number data, the determination may be made from the relative positional relationship with the character data representing the numeral. Considering the structure of the telephone number, the separation position of the area code is two places, after the area code and after the area code,
In general, parentheses are sometimes used for extra use. Therefore, an extra delimiter may be inserted simply by replacing the delimiter of the telephone number data before conversion with a delimiter according to a predetermined notation. In such a case, characters indicating the delimitation of the illegally located area code other than after the area code and the area code are discarded. Of course, it goes without saying that data other than the original numbers, such as the main branch name and the telephone type, which are written together with the telephone number on the business card, etc., are discarded.

文字変換手段は、数字を表す数種の文字データを規定
の形式となるように所定の数字表記に統一させて変換す
る。ここでいう、数字を表す文字データの種類には、例
えば、漢数字、全角サイズの数字、半角サイズの数字と
いったものがある。また、所定の数字表記は任意のもの
であり、最もオーソドックスな場合を想定するとすれ
ば、全ての数字を半角数字に統一し、市外局番と局番の
後に半角ハイフンを挿入するといったことが含まれる。
むろん、全角数字に統一したり、全角漢字に統一したり
するといったものでも構わない。このような統一化が規
定の形式としての一例である。さらに、区切りはハイフ
ンに限らず、括弧であっても良いし、中黒であっても良
いし、他の文字でも構わない。なお、これらの数字表示
は固定的であっても良いし、変更可能としておいても構
わない。
The character conversion means converts several types of character data representing numbers into a predetermined number format so as to have a prescribed format. The types of character data representing numbers here include, for example, Chinese numerals, full-width numbers, and half-width numbers. Also, the predetermined numerical notation is arbitrary, and assuming the most orthodox case, all numbers are unified into half-width numerals, and a half-width hyphen is inserted after the area code and the area code. .
Of course, it is also acceptable to unify to full-width numbers or full-width kanji. Such unification is an example of a prescribed format. Furthermore, the delimiter is not limited to a hyphen, but may be a parenthesis, a bullet, or another character. It should be noted that these numerical displays may be fixed or may be changeable.

変換後の文字データを記憶する記憶部は各種のものを
含むものであり、磁気ディスクなどの不揮発性の記憶領
域でも良いし、RAMなどの揮発性の記憶領域でも良い。
また、単なるデータの伝送経路であったとしても全く同
様に作用する。
The storage unit for storing the converted character data includes various types, and may be a nonvolatile storage area such as a magnetic disk or a volatile storage area such as a RAM.
Further, the operation is exactly the same even if it is merely a data transmission path.

上述した文字取得手段と文字種判定手段と文字選別手
段と文字変換手段について、具体的に1件の電話番号デ
ータから1文字ずつ文字データを取得して半角数字の表
記に変換する場合を例に上げると、次のようになる。
Regarding the above-described character acquisition means, character type determination means, character selection means, and character conversion means, a case in which character data is acquired one character at a time from one telephone number data and converted into half-width numerical notation will be described as an example. Is as follows:

まず、文字取得手段によって、1件の電話番号データ
を先頭から順に1文字データずつ取り出す。続いて文字
種判別手段によって前記1文字データの文字種を判定す
る。この文字種によって以下の四つの処理に振り分け
る。
First, one phone number data is extracted one character data at a time from the beginning by the character acquisition means. Subsequently, the character type of the one-character data is determined by the character type determining means. According to this character type, it is divided into the following four processes.

a)前記1文字データの文字種が漢数字の場合には、文
字変換手段において漢数字を半角サイズの数字に変換す
る。
a) If the character type of the one-character data is a Chinese character, the character conversion means converts the Chinese character to a half-size number.

b)前記1文字データの文字種が全角サイズの数字の場
合には、文字変換手段によって半角サイズの数字に変換
する。
b) When the character type of the one-character data is a full-width number, it is converted to a half-width number by a character conversion unit.

c)前記1文字データの文字種が局番の区切りを表す文
字の場合には、文字変換手段によって特定の局番区切り
文字に変換する。なお、不適当な位置の場合と、同じ位
置に重複する場合は不要文字として捨てる。
c) If the character type of the one-character data is a character indicating a division of an office number, it is converted to a specific office number delimiter by a character conversion unit. In the case of an improper position and the case of overlapping in the same position, it is discarded as unnecessary characters.

d)前記1文字データの文字種が前記以外の文字種の場
合には、文字選別手段によって半角数字だけを残し、他
の文字データを捨てる。
d) When the character type of the one-character data is a character type other than those described above, the character selecting means leaves only half-width numerals and discards other character data.

以上の処理が、1文字データ分の処理であって、1件
の電話番号の数字を処理するまで以上の処理を繰り返
す。
The above processing is processing for one character data, and the above processing is repeated until the number of one telephone number is processed.

これで、任意の形式の電話番号データ、例えば“東京
本社(03)123−4567(代)”の場合でも、不要な文字
が捨てられ、数字は半角数字に統一され、局番区切り文
字が規定の区切り文字に変換されて“03−123−4567"と
いう規定の形式に定型化される。
Thus, even in the case of telephone number data in any format, for example, "Tokyo Head Office (03) 123-4567 (alternative)", unnecessary characters are discarded, numbers are unified to half-width numerals, and the area code delimiter is specified. It is converted into a delimiter and is standardized in a prescribed format of "03-123-4567".

さらに、上記のように構成した特許請求の範囲第3項
に記載の発明においては、市外局番辞書によって電話番
号の市外局番桁数を記憶しているので、区切り位置算出
手段は変換された電話番号データについて前記市外局番
辞書を用いて局番区切り位置を算出する。すると、局番
区切り手段ば前記区切り位置算出手段で算出した局番区
切り位置で前記電話番号データを区切る。
Furthermore, in the invention according to claim 3 configured as described above, since the area code number of the telephone number is stored by the area code dictionary, the delimiter position calculating means is converted. The telephone number data is used to calculate the area code division position using the area code dictionary. Then, the telephone number data is divided by the station number dividing position calculated by the dividing position calculating means.

市外局番辞書は電話番号の市外局番桁数が分かるもの
であれば良く、記憶フォーマットなどは特に限定される
ものではない。例えば、市外局番毎に桁数を記憶するも
のでも良いし、桁数毎に市外局番を記憶するものでも良
い。
The area code dictionary only needs to know the number of digits of the area code of the telephone number, and the storage format and the like are not particularly limited. For example, the number of digits may be stored for each area code, or the area code may be stored for each number of digits.

また、区切り位置算出手段ば電話番号データから上記
市外局番辞書を引くことができれば良く、具体的な手法
は各種のものを採用可能である。例えば、先頭の二桁か
ら辞書を引き始めて引けなくなるまで辞書を引くもので
も良いし、最大の桁数から辞書を引き始めて引けるよう
になった桁数と判断するようにしても良い。一方、局番
の区切り位置は下四桁なのて市外局番の桁数が分かれば
一意に算出可能である。
The delimiter position calculating means only needs to be able to retrieve the area code dictionary from the telephone number data, and various specific methods can be adopted. For example, a dictionary may be drawn from the first two digits until the dictionary cannot be drawn, or the number of digits that can be drawn from the maximum number of digits after starting the dictionary may be determined. On the other hand, the separation position of the area code is the last four digits, and can be uniquely calculated if the number of digits of the area code is known.

局番区切り手段は算出された位置で電話番号データを
区切れば良く、区切り文字を入れて区切る場合や、区切
り位置を表すデータを付加する場合も含む。
The station number separating means only needs to separate the telephone number data at the calculated position, and includes a case where a separating character is inserted to separate the telephone number data and a case where data indicating the separating position is added.

これで、局番区切り文字の無い、数字列からなる電話
番号データ“031234567"の場合でも、局番区切り文字が
挿入され、“03−123−4567"という規定の形式に定型化
される。
Thus, even in the case of telephone number data “031234567” consisting of a numeric string without a station number delimiter, the station number delimiter is inserted and the data is standardized into a prescribed format of “03-123-4567”.

さらに、上記のように構成した特許請求の範囲第4項
に記載の発明においては、入力された任意の形式の電話
番号データを所定の形式に定型化して記憶部に格納する
電話番号定型化方法であって、前記電話番号データを所
定数の文字データずつ取り出してその文字種を特定し、
判定された文字種に基づいて数字を表す文字データと該
文字データ問の局番の区切り位置を表すデータとを特定
して他のデータを破棄するとともに、前記数字を表す数
種の文字データを所定の数字表記に統一させて変換し、
前記局番の区切り位置にて所定の局番区切り文字で区切
りつつ前記記憶部に格納する。
Further, in the invention according to claim 4 configured as described above, a telephone number stabilizing method for standardizing input telephone number data in an arbitrary format into a predetermined format and storing the data in a storage unit. Extracting the telephone number data by a predetermined number of character data and specifying the character type thereof,
Based on the determined character type, character data representing a number and data representing the location of the station number of the character data question are specified, and other data is discarded. Unify and convert to numeric notation,
The data is stored in the storage unit while being delimited by a predetermined station number delimiter at the delimiter position of the station number.

すなわち、実体のある装置などにおいて実行される場
合に利用される方法となっている。
In other words, this method is used when executed in a substantial device or the like.

ところで、このように電話番号を定型化するのば、外
部から取り込んだ電話番号データを、取り込んだ側での
装置で利用可能とするためであり、データの形態が異な
ることによって本来ならば物理的に処理不能となる問題
を回避するものである。従って、処理側での資源形態に
即して処理を実行できるようになる。
By the way, telephone numbers are standardized in this way in order to make telephone number data taken in from outside available to the device on the side that took in the data. This avoids the problem that processing cannot be performed. Therefore, processing can be executed in accordance with the resource form on the processing side.

[実施例] 第1図(a)は第1の電話番号定型化装置の構成ブロ
ック図例である。1は、前記新データバッファの電話番
号データを先頭から順に1文字ずつ取り出す1文字取得
手段である。2は、前記1文字データの文字種を判別す
る文字種判定手段である。3は、前記1文字データの文
字種が漢数字の場合に、漢数字を半角サイズの数字に変
換する数字変換手段である。4は、前記1文字データの
文字種が全角サイズの数字の場合に、半角サイズの数字
に変換する半角変換手段である。5は、前記1文字デー
タの文字種が局番の区切りを表す文字の場合に、規定の
局番区切り文字に変換する局番区切り文字変換手段であ
る。6は、前記1文字データの文字種が上記以外の文字
の場合に、半角数字だけを残し、他の文字データを捨て
る半角数字選抜手段である。
Embodiment FIG. 1A is an example of a configuration block diagram of a first telephone number stylizing apparatus. Reference numeral 1 denotes one-character acquisition means for extracting the telephone number data in the new data buffer one character at a time from the beginning. Reference numeral 2 denotes a character type determination unit that determines the character type of the one-character data. Numeral 3 is a numeral conversion means for converting a Chinese character into a half-size number when the character type of the one-character data is a Chinese character. Numeral 4 denotes a half-width conversion means for converting the one-character data into a half-width number when the character type is a full-width number. Reference numeral 5 denotes a station number delimiter converting means for converting the character data of the one-character data to a prescribed station number delimiter when the character type indicates a station number delimiter. Numeral 6 is a half-width numeral selection means for leaving only half-width numerals and discarding other character data when the character type of the one-character data is a character other than the above.

本実施形態においては、1文字ずつ処理するために文
字取得手段を1文字取得手段で構成しているし、判定さ
れた文字種に基づいて文字データの選別と変換とを行う
文字選別手段と文字変換手段を、数字変換手段と半角変
換手段と区切り文字変換手段と半角数字選別手段とで構
成している。
In the present embodiment, the character acquiring means is constituted by one character acquiring means for processing one character at a time, and a character selecting means for selecting and converting character data based on the determined character type, and a character conversion. The means is constituted by numeral conversion means, half-width conversion means, delimiter conversion means, and half-width number selection means.

第1図(b)は第2の電話番号定型化装置の構成ブロ
ック図例である。7は、電話番号の市外局番桁数を調べ
られる市外局番辞書である。8は、前記市外局番辞書を
用いて局番区切り位置を算出する区切り位置算出手段で
ある。9は、前記区切り位置算出手段で算出した局番区
切り位置で前記電話番号データを区切る局番区切り手段
である。
FIG. 1B is an example of a configuration block diagram of a second telephone number stabilizing apparatus. Reference numeral 7 denotes an area code dictionary for checking the number of digits of the area code of a telephone number. Numeral 8 denotes a delimiter position calculating means for calculating a delimiter position using the area code dictionary. Numeral 9 is a station number dividing means for dividing the telephone number data at the station number dividing position calculated by the dividing position calculating means.

第2図(a)は本発明の第1の電話番号定型化装置の
フローチャート例であり、F1からF7はステップの番号で
ある。既にコンピュータのメモリ上のバッファに例えば
第3図(a)〜(d)のいずれかのような任意の形式で
1件の電話番号データが格納されている事、これを先頭
から順に1文字ずつワークに読み出し逐次定型化処理し
ていく事、定型化される新しい電話番号データは別のバ
ッファに逐次格納していく事、以上を前提として説明し
ていく。
FIG. 2A is a flowchart example of the first telephone number stabilizing apparatus of the present invention, wherein F1 to F7 are step numbers. One telephone number data is already stored in a buffer on the computer memory in an arbitrary format, for example, as shown in FIGS. 3 (a) to (d). The following description is based on the premise that the data is read out to the work and sequentially formatted, and the new telephone number data to be formatted is sequentially stored in another buffer.

F1では、1件の電話番号データを先頭から順に1文字
データずつ取り出す。
In F1, one phone number data is extracted one character data at a time from the beginning.

F2では、F1で得た1文字データの文字種を判定する。
文字種として、“一二三”等の漢数字、“123"等の全角
数字、“123"等の半角数字、“()−・()−・”等の
局番区切りを表す文字、これ以外の不要な文字を判定す
る。文字種によってF3〜F6の4つのステップに処理を振
り分ける。
In F2, the character type of the one-character data obtained in F1 is determined.
The character types include Chinese numerals such as "123", full-width numbers such as "123", half-width numbers such as "123", characters that delimit a local number such as "()-. ()-." Determine unnecessary characters. Processing is divided into four steps F3 to F6 according to the character type.

F3ではF1で得た1文字データの文字種が第3図(a)
に示すような漢数字の場合に、半角の数字に変換し、バ
ッファに納める。
In F3, the character type of the one-character data obtained in F1 is as shown in FIG.
In the case of Kanji numbers as shown in (1), they are converted into single-byte numbers and stored in a buffer.

F4ではF1で得た1文字データの文字種が第3図(b)
に示すような全角数字の場合に、半角数字に変換し、バ
ッファに納める。
In F4, the character type of the one-character data obtained in F1 is as shown in FIG. 3 (b).
In the case of full-width numbers as shown in (1), they are converted to half-width numbers and stored in a buffer.

F5ではF1で得た1文字データの文字種が局番区切りを
表す文字の場合に、局番区切り文字、この実施例では半
角ハイフン“−”に変換し、バッファに納める。ただ
し、第3図(a)の先頭の括弧のように位置が不正な場
合は不要文字として取り除く。
In F5, if the character type of the one-character data obtained in F1 is a character representing a station number separator, the character code is converted into a station number separator, in this embodiment, a half-size hyphen "-" and stored in a buffer. However, if the position is incorrect as in the parentheses at the beginning of FIG. 3A, it is removed as an unnecessary character.

一方、第3図(a)の市外局番と局番の間は“)(”
のように括弧が重複しているが、同じ位置に区切り文字
が重複する場合は、1つの区切り文字を残して後は不要
文字として取り除く。
On the other hand, between the area code and the area code in FIG.
When parentheses are duplicated as in the above, but delimiters are duplicated at the same position, one delimiter is left and then removed as unnecessary characters.

F6では、F1で得た1文字データが、半角サイズの数字
が否かを調べ、半角数字である場合は、バッファに納め
る。一方、第3図(c)の“東京営業所”のどれかのよ
うな不要文字である場合は捨てる。
In F6, it is checked whether or not the one-character data obtained in F1 is a half-size number, and if it is a half-size number, it is stored in a buffer. On the other hand, if the character is an unnecessary character such as one of "Tokyo Office" in FIG. 3 (c), it is discarded.

F7では、1件の電話番号の逐次処理を終るかを電話番
号の終りかで判定する。電話番号の終りとは第3図
(a)〜(c)のようにデータ終端の場合か、第3図
(d)のようにデータ終端でなくても電話番号の桁数を
満たしている場合である。続ける場合、F1に戻って以上
の手段を繰り返す。1件の電話番号データの逐次処理が
終ると、電話番号データは第3図(e)のように、半角
数字と規定の区切り文字“−”で規定の形式に定型化さ
れる。
In F7, it is determined whether the sequential processing of one telephone number ends or not by the end of the telephone number. The end of the telephone number is the case of the end of data as shown in FIGS. 3 (a) to 3 (c) or the case where the number of digits of the telephone number is satisfied without the end of data as in FIG. 3 (d). It is. To continue, return to F1 and repeat the above steps. When the sequential processing of one telephone number data is completed, the telephone number data is standardized into a prescribed format with a half-width numeral and a prescribed delimiter "-" as shown in FIG. 3 (e).

第2図(b)は本発明の第2の電話番号定型化装置の
フローチャート例であり、F8からF9はステップの番号で
ある。
FIG. 2 (b) is a flowchart example of the second telephone number stabilizing apparatus of the present invention, wherein F8 to F9 are step numbers.

既にコンピュータのメモリ上のバッファに例えば第3
図(f)のような数字列で1件の電話番号データが格納
されている事、定型化される新しい電話番号データは別
のバッファに格納される事、以上を前提として説明して
いく。
For example, in the buffer on the computer memory
Description will be made on the assumption that one telephone number data is stored in a numeric string as shown in FIG. 11F and that new telephone number data to be standardized is stored in another buffer.

F8では、局番区切り位置を算出する。市外局番と桁数
の情報をあらかじめ納めてある市外局番辞書を引いて、
例えば“03"で始まる場合は2桁、“0263"で始まれば4
桁、というように市外局番の区切り位置を求める。局番
の区切り位置は電話番号の下4桁であることから一意に
求まる。
In F8, the station number break position is calculated. Look up the area code dictionary that stores the area code and number of digits in advance,
For example, if it starts with "03", it is 2 digits; if it starts with "0263", it is 4
Find the area code delimiter, such as digits. The division position of the station number is uniquely obtained from the last four digits of the telephone number.

F9では、F8で算出した局番区切り位置で電話番号デー
タを区切り、バッファに納める。数字が連続してしまっ
た電話番号データの場合でも、規定の区切り文字“−”
が挿入され、第3図(e)のように規定の形式に定型化
される。
In F9, the telephone number data is separated at the station number separation position calculated in F8 and stored in the buffer. Even in the case of telephone number data with consecutive numbers, the specified delimiter "-"
Is inserted and is standardized in a prescribed format as shown in FIG. 3 (e).

第4図は第1、第2の電話番号定型化装置に共通のハ
ードウェア構成図例である。点線で囲んだ中が例えばパ
ーソナルコンピュータ内部であり、H1はCPUである。H2
はRAMで、プログラムを格納したり、郵便番号データの
バッファやワークとしても使用する。H3はROMで、BIOS
などのシステムプログラムが入っている。H4はCRTなど
のディスプレイで、データ等を表示する。H5はキーボー
ドで、必要に応じてユーザがキー入力を行なう。H6は磁
気ディスク等の記録装置で、ファイルの読み書きを行な
う。
FIG. 4 is an example of a hardware configuration diagram common to the first and second telephone number stabilizing devices. The inside surrounded by a dotted line is, for example, the inside of a personal computer, and H1 is a CPU. H2
Is a RAM that stores programs and is used as a buffer or work for postal code data. H3 is ROM, BIOS
And other system programs. H4 is a display such as a CRT for displaying data and the like. H5 is a keyboard, and the user performs key input as necessary. H6 is a recording device such as a magnetic disk for reading and writing files.

[発明の効果] 以上説明したように、本発明によれば、任意の表記形
式からなり、数種の文字種から構成されているような電
話番号データを統一された所定の数字表記に定型化する
のに有効となる。従って、数字/漢数字、全角/半角、
異なる局番区切り、不要な文字などが混在する任意の形
式の電話番号を半角数字と規定の区切り文字の形式に定
型化するような場合に好適である。むろん、この定型化
の形式は特に限定されなければならないものでもない。
[Effect of the Invention] As described above, according to the present invention, telephone number data having an arbitrary notation format and composed of several types of characters is standardized into a uniform predetermined number notation. It is effective for Therefore, numbers / kanji, full-width / half-width,
This is suitable for a case where a telephone number in an arbitrary format in which different station number separators, unnecessary characters, and the like are mixed is standardized to a half-width number and a prescribed separator character format. Of course, the format of this stylization does not have to be particularly limited.

また、局番区切り文字を利用して電話番号データを区
切ることにより、市外局番部分と局番部分とが容易に分
離でき、利用しやすくなる。さらに、単に区切り文字を
変換するだけでは統一できない場合でも不当な位置に区
切り文字が入らないようにして表記を統一できる。さら
に、市外局番辞書を備えることにより、区切りが無くな
ってしまったり誤ってしまっているような場合にも正し
く区切りを判別することができる。
In addition, by separating the telephone number data using the station number delimiter, the area code part and the station number part can be easily separated and used. Furthermore, even when the conversion cannot be performed simply by simply converting the delimiter, the notation can be unified by preventing the delimiter from being inserted at an improper position. In addition, by providing the area code dictionary, even when the delimiter is lost or erroneous, the delimiter can be correctly determined.

任意の形式の電話番号データをコンピュータシステム
で自動的に規定の形式に定型化処理する本発明となる電
話番号定型化装置の実現により、電話番号データの定型
化を容易にする。これまで電話番号データの定型化は人
手に頼っていたが、本装置によれば、人手は全く不要に
なり、時間と手間が大幅に短縮される。
By realizing a telephone number stabilizing apparatus according to the present invention in which a computer system automatically formats telephone number data of an arbitrary format into a prescribed format, standardization of telephone number data is facilitated. Until now, the standardization of telephone number data has relied on manual labor. However, according to the present apparatus, no manual labor is required, and time and labor are greatly reduced.

特にデータベースシステムにおいて、項目データの形
式の統一はデータ保存、検索・並べ換えなどのデータ管
理、データ表示などの面で最重要課題であるが、他所か
らデータを取り込んだ場合、例えば名刺などから文字認
識した生データや、他のデータベースからのデータコン
バートによる場合、電話番号の形式は統一されていない
場合がほとんどである。しかし、本装置を用いれば、デ
ータベースにデータ登録する時点で自動的に定型化でき
るため、データベースと外部データの整合の障害を一掃
できる。
Especially in a database system, unifying the format of item data is the most important issue in terms of data storage, data management such as search and sorting, data display, etc.When data is imported from other places, for example, character recognition from business cards etc. In most cases, the format of telephone numbers is not uniform when raw data is converted or data is converted from other databases. However, if this apparatus is used, the data can be automatically standardized at the time of registering the data in the database, so that it is possible to eliminate the obstacle of the consistency between the database and external data.

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

第1図(a)は本発明による第1の電話番号定型化装置
の構成ブロック図である。 第1図(b)は第2の電話番号定型化装置の構成ブロッ
ク図である。 第2図(a),(b)は装置の作動手順を示すフローチ
ャート、第3図(a)〜(f)は電話番号データ例を示
す図、第4図は装置のハードウェア構造図である。 1:1文字取得手段 2:文字種判定手段 3:数字変換手段 4:半角変換手段 5:局番区切り文字変換手段 6:半角数字選抜手段 7:市外局番辞書 8:区切り位置算出手段 9:局番区切り手段
FIG. 1A is a configuration block diagram of a first telephone number stabilizing apparatus according to the present invention. FIG. 1B is a configuration block diagram of a second telephone number stabilizing apparatus. 2 (a) and 2 (b) are flowcharts showing the operation procedure of the device, FIGS. 3 (a) to 3 (f) are diagrams showing examples of telephone number data, and FIG. 4 is a hardware structural diagram of the device. . 1: 1 character acquisition means 2: character type determination means 3: numeric conversion means 4: half-width conversion means 5: area code separator character conversion means 6: half-width number selection means 7: area code dictionary 8: break position calculation means 9: area number break means

フロントページの続き (56)参考文献 特開 平2−72752(JP,A) 特開 昭55−156462(JP,A) 特開 平1−284051(JP,A)Continuation of the front page (56) References JP-A-2-72752 (JP, A) JP-A-55-156462 (JP, A) JP-A-1-2844051 (JP, A)

Claims (4)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】入力された任意の形式の電話番号データを
所定の形式に定型化して記憶部に格納する電話番号定型
化装置であって、 前記電話番号データを区切られた文字データとして取り
出す文字取得手段と、 取得された前記文字データの文字種を特定する文字種判
定手段と、 判定された文字種に基づいて数字を表す文字データと、
該文字データ間の局番の区切り位置を表すデータとを特
定し、他のデータを破棄する文字選別手段と、 前記数字を表す数種の文字データを所定の数字表記に統
一させて変換するとともに、前記局番の区切り位置を所
定の局番区切り文字で区切りつつ前記記憶部に格納する
文字変換手段と、 を備えたことを特徴とする電話番号定型化装置。
1. A telephone number stabilizing apparatus for standardizing input telephone number data of an arbitrary format into a predetermined format and storing the data in a storage unit, wherein the telephone number data is extracted as delimited character data. Obtaining means, character type determining means for specifying the character type of the obtained character data, character data representing a number based on the determined character type,
Identifying the data indicating the position where the station number is separated between the character data, character selecting means for discarding other data, and converting several types of character data representing the numbers into a predetermined number notation, Character conversion means for storing in the storage unit the section numbers separated by a predetermined area number delimiter while separating the section numbers with a predetermined area number delimiter.
【請求項2】特許請求の範囲第1項に記載の電話番号定
型化装置において、 前記文字変換手段は、 市外局番と局番の後以外の不当な位置の局番の区切りを
表す文字を破棄するとともに、所定位置に1文字の局番
区切り文字だけを入れることを特徴とする電話番号定型
化装置。
2. A telephone number stabilizing apparatus according to claim 1, wherein said character converting means discards a character indicating a boundary between an area code and an illegal position other than after the area code. A telephone number stabilizing device, wherein only one character of a station number delimiter is inserted in a predetermined position.
【請求項3】特許請求の範囲第1項または第2項のいず
れかに記載の電話番号定型化装置において、 電話番号の市外局番桁数を記憶する市外局番辞書と、 変換された電話番号データについて前記市外局番辞書を
用いて局番区切り位置を算出する区切り位置算出手段
と、 前記区切り位置算出手段で算出した局番区切り位置で前
記電話番号データを区切る局番区切り手段とを有するこ
とを特徴とする電話番号定型化装置。
3. The telephone number stabilizing apparatus according to claim 1, wherein an area code dictionary for storing the area code digits of the telephone number, and a converted telephone number. It is characterized in that it has a delimiter position calculating means for calculating an area number break position using the area code dictionary for number data, and an area number break means for separating the telephone number data at the area number break position calculated by the break position calculating means. Phone number stylization device.
【請求項4】入力された任意の形式の電話番号データを
所定の形式に定型化して記憶部に格納する電話番号定型
化方法であって、 前記電話番号データを所定数の文字データずつ取り出し
てその文字種を特定し、判定された文字種に基づいて数
字を表す文字データと該文字データ間の局番の区切り位
置を表すデータとを特定して他のデータを破棄するとと
もに、前記数字を表す数種の文字データを所定の数字表
記に統一させて変換し、前記局番の区切り位置を所定の
局番区切り文字で区切りつつ前記記憶部に格納すること
を特徴とする電話番号定型化方法。
4. A telephone number stabilizing method for standardizing input telephone number data of an arbitrary format into a predetermined format and storing the telephone number data in a storage unit, wherein the telephone number data is extracted by a predetermined number of character data at a time. Identify the character type, identify character data representing a number based on the determined character type, and data indicating the position where the station number is separated between the character data, discard the other data, and set several types representing the number. And converting the character data into a predetermined numerical notation and storing the same in the storage unit while separating the station number delimiter positions with a predetermined station number delimiter character.
JP02134656A 1990-05-24 1990-05-24 Telephone number stylization device and telephone number stylization method Expired - Fee Related JP3081622B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP02134656A JP3081622B2 (en) 1990-05-24 1990-05-24 Telephone number stylization device and telephone number stylization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP02134656A JP3081622B2 (en) 1990-05-24 1990-05-24 Telephone number stylization device and telephone number stylization method

Publications (2)

Publication Number Publication Date
JPH0430647A JPH0430647A (en) 1992-02-03
JP3081622B2 true JP3081622B2 (en) 2000-08-28

Family

ID=15133482

Family Applications (1)

Application Number Title Priority Date Filing Date
JP02134656A Expired - Fee Related JP3081622B2 (en) 1990-05-24 1990-05-24 Telephone number stylization device and telephone number stylization method

Country Status (1)

Country Link
JP (1) JP3081622B2 (en)

Also Published As

Publication number Publication date
JPH0430647A (en) 1992-02-03

Similar Documents

Publication Publication Date Title
US6173252B1 (en) Apparatus and methods for Chinese error check by means of dynamic programming and weighted classes
US5590317A (en) Document information compression and retrieval system and document information registration and retrieval method
US5778359A (en) System and method for determining and verifying a file record format based upon file characteristics
CN111177184A (en) Structured query language conversion method based on natural language and related equipment thereof
CN112395851A (en) Text comparison method and device, computer equipment and readable storage medium
CN108073591B (en) Integrated storage system and method of multi-source data with identity attribute
CN111291535A (en) Script processing method and device, electronic equipment and computer readable storage medium
JP3081622B2 (en) Telephone number stylization device and telephone number stylization method
JPH0869476A (en) Retrieval system
CN108573003B (en) Integrated storage system and method for multi-source data related to automobile
CN113609864B (en) Text semantic recognition processing system and method based on industrial control system
US6357002B1 (en) Automated extraction of BIOS identification information for a computer system from any of a plurality of vendors
JP2535629B2 (en) Input string normalization method of search system
WO2021051600A1 (en) Method, apparatus and device for identifying new word based on information entropy, and storage medium
JPH0619962A (en) Text dividing device
WO2023021636A1 (en) Data processing device, data processing method, and program
JP2746345B2 (en) Post-processing method for character recognition
JP3419425B2 (en) Recognition character correction device
JP3743252B2 (en) Alphabet notation corporate name search system and method, and recording medium recording the processing program
JPH05128159A (en) Key word extraction and its device
JPH08305710A (en) Method for extracting key word of document and document retrieving device
JP3522773B2 (en) Standard formatting equipment
JP2503259B2 (en) How to determine full-width and half-width characters
JP3972309B2 (en) Information conversion apparatus and program
JPH04326188A (en) Name data shaping method and device for name card recognition

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090623

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees