JPH02255976A - Information processor - Google Patents

Information processor

Info

Publication number
JPH02255976A
JPH02255976A JP1013401A JP1340189A JPH02255976A JP H02255976 A JPH02255976 A JP H02255976A JP 1013401 A JP1013401 A JP 1013401A JP 1340189 A JP1340189 A JP 1340189A JP H02255976 A JPH02255976 A JP H02255976A
Authority
JP
Japan
Prior art keywords
attribute
byte
bit
character
special character
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.)
Granted
Application number
JP1013401A
Other languages
Japanese (ja)
Other versions
JPH0736187B2 (en
Inventor
Yuji Ogawa
雄司 小川
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP1013401A priority Critical patent/JPH0736187B2/en
Publication of JPH02255976A publication Critical patent/JPH02255976A/en
Publication of JPH0736187B2 publication Critical patent/JPH0736187B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

PURPOSE:To use a storage area with high efficiency by producing as necessary a byte attribute table to the bytes except the least significant one of a character of plural bytes and then an attribute bit table to the least significant type respectively. CONSTITUTION:An identifier showing the presence/absence of a special character attribute is registered into a byte attribute table 4. A byte attribute check part 3 retrieves the table 4 and inspects the presence of the special character attribute. In addition, the attribute bit tables 6, 7 and 8 store the numerical value showing the type of the special character attribute. Then NO is decided when a NULL pointer is confirmed by reference to the elements set on the table 4 and showing the most significant bit and its subsequent ones except the least significant bit. When the NULL pointer does not exist till the bit next to the least significant one, the attribute is known by reference to the tables 6, 7 and 8 shown by the least significant bit. As a result, the character attribute can be referred to an updated at a high speed.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、文字属性を定義し7処理する計算機システム
に利用する。特に、言語処理手段に関する。
DETAILED DESCRIPTION OF THE INVENTION [Industrial Application Field] The present invention is applied to a computer system that defines and processes character attributes. In particular, it relates to language processing means.

特に日本語の言語処理に適する。It is especially suitable for Japanese language processing.

〔概要〕〔overview〕

本発明は、複数バイトの文字コードの属性を定義する言
語処理手段において、 ハツシュ計算を伴う処理を要せず、また、不要な記憶領
域を省くことにより、 文字属性の参照および更新を高速に実行できるようにし
たものである。
The present invention, in a language processing means that defines attributes of multi-byte character codes, does not require processing involving hash calculations and eliminates unnecessary storage areas, thereby allowing character attributes to be referenced and updated at high speed. It has been made possible.

〔従来の技術〕[Conventional technology]

近年の情報処理システムでは日本語データの処理は必要
不可欠となってきているが、1バイトで表現できない文
字に対して処理系作成上に様々な問題が発生している。
Processing Japanese data has become indispensable in recent information processing systems, but various problems have arisen in creating processing systems for characters that cannot be expressed in one byte.

たとえば、1バイト文字の空白は単語の区切りの役割を
果たすが、2バイト文字の空白に関してはこの範鴫では
なくなる問題がある。この問題を解決するには複数バイ
ト文字に特殊文字属性を持たせる必要が生ずる。
For example, spaces in 1-byte characters serve as word delimiters, but this is not the case with spaces in 2-byte characters. To solve this problem, it becomes necessary to give multi-byte characters special character attributes.

従来、この種の文字属性の管理には、1バイト文字に対
しては各文字に対する種々の属性の有無を表すビットテ
ーブルを用意していた。たとえば、1バイトが8ビツト
の文字で32種類の属性を管理しようとすると、要素数
が256で1要素が4バイトのテーブルを用意すること
になる。そして、文字コードをそのまま要素番号として
この属性テーブルの内容を参照しまた更新していた。さ
らに、複数バイト文字に対してはあらかじめある大きさ
の別の属性テーブルを用意し、文字コードをハツシュ計
算した値で属性テーブルの要素を参照しまた更新してい
た。このときに、複数バイト文字用の属性テーブルは複
数バイト文字のすべてを登録するだけの要素は持たず、
文字属性を参照したときにその文字が登録されていなけ
れば特殊文字属性を持っていないと判断していた。その
ほかに、複数バイト文字を特に2バイト文字としてすべ
ての文字に対する要素を持つ属性テーブルを用意してい
るものもある。
Conventionally, to manage this type of character attributes, a bit table has been prepared for one-byte characters to indicate the presence or absence of various attributes for each character. For example, if you try to manage 32 types of attributes using characters with 8 bits per byte, you will need to prepare a table with 256 elements and 4 bytes per element. Then, the contents of this attribute table are referred to and updated using the character code as the element number. Furthermore, for multi-byte characters, another attribute table of a certain size is prepared in advance, and the elements of the attribute table are referenced and updated using the hash-calculated value of the character code. At this time, the attribute table for multi-byte characters does not have enough elements to register all multi-byte characters,
When character attributes were referenced, if the character was not registered, it was determined that the character did not have special character attributes. In addition, there are some that prepare attribute tables that have elements for all characters, including multi-byte characters, especially double-byte characters.

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

このような従来例では、複数バイト文字に対して属性テ
ーブルを別に持ち、文字コードをハツシュ計算した値で
各文字コードに対する属性テーブルの要素を求めている
ので、異なる文字が同一のハツシユ値を得ることがあり
、その場合の処理が必要になる。また、2バイト文字の
すべての文字に対する属性テーブルを用意すると、特殊
文字属性を持たない文字に対してもビット列を持つこと
になり、たとえば、1バイトが8ビツトとすると要素数
が65536となり、大量の記憶領域が必要になる。
In such a conventional example, a separate attribute table is provided for multi-byte characters, and the element of the attribute table for each character code is obtained by calculating the hash value of the character code, so different characters obtain the same hash value. There may be cases where processing is required. Also, if you prepare an attribute table for all double-byte characters, you will have bit strings even for characters that do not have special character attributes. For example, if 1 byte is 8 bits, the number of elements will be 65,536, which is a large number. storage space is required.

このように、従来例では、複数バイト文字に対する属性
の参照および更新処理゛が複雑で遅くなるか、または、
大量の記憶領域が必要になる欠点がある。
In this way, in the conventional example, attribute reference and update processing for multi-byte characters is complicated and slow, or
The disadvantage is that it requires a large amount of storage space.

本発明は、このような欠点を除去するもので、特殊処理
を要せず、また、記憶領域が節減できる属性管理手段を
有する情報処理装置を提供することを目的とする。
SUMMARY OF THE INVENTION An object of the present invention is to eliminate such drawbacks, and to provide an information processing device that does not require special processing and has attribute management means that can save storage space.

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

本発明は、複数バイトで表現された文字コードに対して
特殊文字属性を定義する定義手段を備えた情報処理装置
において、上記定義手段は、特殊文字属性の存在の有無
を示す識別子が登録された第一テーブルと、上記文字コ
ードの最下位バイトを除くバイトの数値の組み合わせで
上記第一テーブルを検索して特殊文字属性の存在を検定
するバイト属性チェック手段と、特殊文字属性の種別を
示す数値が格納された第二テーブルと、上記バイト属性
チェック手段による検定結果が特殊文字属性の有りを示
すときに、上記文字コードの最下位バイトの数値で上記
第二テーブルを検索して特殊文字属性の種別を示す数値
を検定する属性ビットチェック手段とを備えたことを特
徴とする。
The present invention provides an information processing device including a definition means for defining a special character attribute for a character code expressed in multiple bytes, wherein the definition means registers an identifier indicating the presence or absence of the special character attribute. a first table; a byte attribute checking means for searching the first table using a combination of numerical values of bytes excluding the least significant byte of the character code to test the existence of a special character attribute; and a numerical value indicating the type of the special character attribute. When the test result by the above-mentioned byte attribute checking means indicates the presence of a special character attribute, the second table is searched using the numerical value of the lowest byte of the above character code to check the special character attribute. The present invention is characterized by comprising an attribute bit check means for verifying a numerical value indicating the type.

〔作用〕[Effect]

まず、最上位ビットから順次に最下位ビットを除くそれ
ぞれのビットが示すバイト属性テーブル上の要素を参照
し、NULLポインタであればN。
First, refer to the element on the byte attribute table indicated by each bit sequentially from the most significant bit excluding the least significant bit, and if it is a NULL pointer, select N.

とし、最下位ビットの直ぐ上のビットまでNULLポイ
ンタがなければ、この最下位ビットの示す属性ビットテ
ーブルを参照し、属性を知る。
If there is no NULL pointer up to the bit immediately above the least significant bit, the attribute is determined by referring to the attribute bit table indicated by this least significant bit.

〔実施例〕〔Example〕

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

第1図は、この実施例の構成を示すブロック構成図であ
る。この実施例は、第1図に示すように、バイト属性チ
ェック手段1と、属性ビットテーブル手段2とを備え、
ここで、バイト属性チェック手段1は、バイト属性テー
ブル4と、バイト属性テーブル作成部5と、このバイト
属性テーブル4およびバイト属性テーブル作成部5を管
理するバイト属性チェック部3とを備え、また、属性ビ
ットテーブル手段2は、属性ビットテーブル6.71、
および8と、この属性ビットテーブル6.7、、および
8を作成する属性ビット作成部9と、この属性ビットテ
ーブル6.7、 、および8の要素を参照および更新す
る属性ビットチェック部10および属性ビット更新部1
1とを備える。
FIG. 1 is a block diagram showing the configuration of this embodiment. As shown in FIG. 1, this embodiment includes byte attribute checking means 1, attribute bit table means 2,
Here, the byte attribute checking means 1 includes a byte attribute table 4, a byte attribute table creation unit 5, and a byte attribute check unit 3 that manages the byte attribute table 4 and the byte attribute table creation unit 5, and The attribute bit table means 2 includes an attribute bit table 6.71,
and 8, an attribute bit creation unit 9 that creates the attribute bit tables 6.7, and 8, an attribute bit check unit 10 that references and updates the elements of the attribute bit tables 6.7, 8, and attributes. Bit update section 1
1.

すなわち、この実施例は、特殊文字属性の存在の有無を
示す識別子が登録された第一テーブルであるバイト属性
テーブル4と、上記文字コードの最下位バイトを除くバ
イトの数値の組み合わせで上記第一テーブルを検索して
特殊文字属性の存在を検定するバイト属性チェック手段
であるバイト属性チェック部3と、特殊文字属性の種別
を示す数値が格納された第二テーブルである属性ビット
テーブル6.7、 、および8と、上記バイト属性チェ
ック手段による検定結果が特殊文字属性の有りを示すと
きに、上記文字コードの最下位バイトの数値で上記第二
テーブルを検索して特殊文字、属性の種別を示す数値を
検定する属性ビットチェック手段である属性ビットチェ
ック部10とを備える。
That is, in this embodiment, byte attribute table 4, which is the first table in which identifiers indicating the presence or absence of special character attributes are registered, and the numerical values of the bytes excluding the least significant byte of the character code, are used. a byte attribute checking unit 3 which is a byte attribute checking means for searching a table and verifying the existence of special character attributes; an attribute bit table 6.7 which is a second table storing numerical values indicating the type of special character attributes; , and 8, when the test result by the byte attribute checking means indicates the presence of a special character attribute, the second table is searched using the value of the least significant byte of the character code to indicate the type of special character and attribute. It also includes an attribute bit check section 10, which is an attribute bit check means for testing numerical values.

第3図は複数バイト文字の特殊文字属性情報の格納状態
を示す図である。第2図に示すnバイト文字12は先頭
から順にバイトb+ 、b2、 、l)、、−1、bh
を持つ。ここで、異なるバイト長の文字を扱うシステム
では、バイト長の短い文字の上位バイトは「0」である
とする。nバイト文字12の特殊文字、属性は次のよう
に格納されている。
FIG. 3 is a diagram showing the storage state of special character attribute information of multi-byte characters. The n-byte characters 12 shown in Figure 2 are bytes b+, b2, , l), -1, bh in order from the beginning.
have. Here, in a system that handles characters with different byte lengths, it is assumed that the upper byte of a character with a shorter byte length is "0". The special characters and attributes of the n-byte characters 12 are stored as follows.

第1バイト属性テーブル13の第す、要素は第2バイト
属性テーブル14を指し、さらに第2バ・イト属性テー
ブル14の第b2要素が次のバイト属性テーブルを指し
、Hen的に第。−、バイト属性テーブル15の第す、
、、、、l要素から属性ビットテーブル16を得る。n
バイト文字12の特殊文字属性は属性ビットテーブル1
Gの第b9要素にビット列として格納されている。そし
て、それぞれのビットのオンオフで属性の有無を知るこ
とができる。ここで、バイト属性テーブル4と属性ピッ
トチ・−プル6.71、および8との要素数は1バイト
で表現可能なコードの種類の数である。
The first element of the first byte attribute table 13 points to the second byte attribute table 14, and the b2 element of the second byte attribute table 14 points to the next byte attribute table. -, byte attribute table 15,
, , Obtain the attribute bit table 16 from the l elements. n
The special character attribute of byte character 12 is attribute bit table 1.
It is stored in the b9th element of G as a bit string. The presence or absence of an attribute can be determined by turning each bit on or off. Here, the number of elements in byte attribute table 4 and attribute pit pulls 6.71 and 8 is the number of code types that can be expressed in one byte.

次に、1バイトが8ビツトの2バイト文字を例にとり、
実際の処理の流れを説明する。はじめに、文字へに対し
て属性Xが存在するかどうかをチエックする処理を説明
する。ただし、文字Aの上位バイトをA□とし、まだ下
位バイトをA、。0とし、属性Xを表すビットは第Xビ
ットとする。第4図はこの処理を表した流れ図である。
Next, taking a 2-byte character where 1 byte is 8 bits as an example,
The actual process flow will be explained. First, the process of checking whether attribute X exists for a character will be explained. However, the upper byte of the character A is A□, and the lower byte is still A. 0, and the bit representing attribute X is the X-th bit. FIG. 4 is a flowchart showing this process.

バイト属性チェック部3はバイト属性テーブル4の第A
□要素を参照し、それがN U L Lポインタならば
結果はNoである。また、NULLポインタでなければ
その第A up要素の指す属性ビットテーブルの第A、
。。
The byte attribute check section 3 checks No. A of the byte attribute table 4.
□References an element, and if it is a NULL pointer, the result is No. Also, if it is not a NULL pointer, the A-th of the attribute bit table pointed to by the A-th up element,
. .

要素を参照し、第XビットがオンならYESを、また、
オフならNOを結果どして返す。
Refer to the element, if the Xth bit is on, YES, and
If it is off, a NO result is returned.

たとえば、文字Aが1作」であり、文字Aの上位バイト
AuPが7Aであり、下位バイトAIowが73となる
。バイト属性チェック部3はバイト属性テーブル4の7
A番目要素を参照し、この値がNULLポインタであれ
ば、「作」の文字属性は存在しないかまたは既定値かで
ある。また、N U LI7ポインタでなければ、属性
ビットテーブルの73番目を参照し、この値がrooo
oo:3t Isであれば、第0属性および第1属性が
存在することがわかる。
For example, the character A is 1 piece, the upper byte AuP of the character A is 7A, and the lower byte AIow is 73. The byte attribute check section 3 checks 7 of the byte attribute table 4.
The A-th element is referred to, and if this value is a NULL pointer, the character attribute "saku" does not exist or has a default value. Also, if it is not a N U LI7 pointer, refer to the 73rd attribute bit table and set this value to rooo
If oo:3t Is, it can be seen that the 0th attribute and the 1st attribute exist.

ただし、この値が「0」であってもよい。However, this value may be "0".

ここで、属性ビットテーブルは、第1バイトが等しい2
56文字分の属性情報を表すテーブルであり、その25
6文字に特別な属性がなければ、割付けずに第1バイト
属性テーブルの対応する要素にNULLポインタが代入
される。したがって、属性ビットテーブルには各文字の
属性の持ち方によって「0」ないし’256 J個存在
する、2ひきつづき、文字Aに対し属性Xを与える処理
を説明する。第5図はこの処理を表しまた流れ図である
。バイト属性チェック部3はバイト属性テーブル4の第
A uP要素を参照し、NULLポインタならば属性ビ
ットテーブル作成部91コ対して属性ビットテーブルの
作成を要求し、バイト属性テーブル4の第AuP要素に
新しく作成された属性ビットテーブル(要素のビット列
は、すべてオフである)へのポインタを格納する。そし
、て、属性ビットテーブルを得ると、属性ビット更新部
11が属性ビットテーブルの第A、。、要素のビット列
の第Xビットをオンにする。
Here, the attribute bit table contains 2 with the same first byte.
This is a table representing attribute information for 56 characters, of which 25
If the six characters do not have a special attribute, a NULL pointer is assigned to the corresponding element in the first byte attribute table without allocation. Therefore, there are 0 to '256 J attributes in the attribute bit table depending on the attribute of each character.The process of assigning attribute X to character A will be explained. FIG. 5 represents this process and is a flow chart. The byte attribute checking unit 3 refers to the AuP element of the byte attribute table 4, and if it is a NULL pointer, requests the attribute bit table creation unit 91 to create an attribute bit table, and writes the Stores a pointer to the newly created attribute bit table (all element bit strings are off). Then, when the attribute bit table is obtained, the attribute bit updating unit 11 updates the attribute bit table A. , turns on the Xth bit of the bit string of the element.

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

本発明は以上説明したように、複数バイト文字の最下位
以外のバイトに対してはバイト属性テーブルを、最下位
のバイトに対しては属性ビットテーブルをそれぞれ必要
に応じて作成するので、ハツシュ計算のような複雑な処
理をせず、また、特殊文字属性を持たない文字に対する
ビット列をすべて持つようなこともせず、文字属性の参
照および更新を高速に行い、かつ、記憶領域を効率良く
使用することができる効果がある。
As explained above, the present invention creates a byte attribute table for bytes other than the lowest byte of a multi-byte character, and an attribute bit table for the lowest byte, respectively, as necessary, so hash calculations are performed. This method allows character attributes to be referenced and updated at high speed, and storage space is used efficiently, without complex processing such as There is an effect that can be done.

本発明は、すべての文字が特殊文字属性を持つ場合には
大量の記憶領域を消費するが、実際には文字全体と比較
すると特殊文字属性を持つ文字の数は極めて少ないので
、上記の効果を期待することができる。
The present invention consumes a large amount of storage space when all characters have special character attributes, but in reality the number of characters with special character attributes is extremely small compared to all characters. You can expect it.

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

第1図は本発明実施例の構成を示すブロック構成図。 第2図は複数バイト文字の構成図。 第3図は複数バイト文字に対する特殊文字属性の検索手
順を示す説明図。 第4メカよび第5図は複数文字の属性管理処理動作を示
すフローチャート。 l・・・バイト属性チェック手段、2・・・属性ビット
テーブル手段、3・・・バイト属性チェック部、4.1
3.14.15・・・バイト属性テーブル、5・・・バ
イト属性テーブル作成部、6.7、・、8.16・・・
属性ピットテーブノペ9・・・属性ビットテーブル作成
部、10・・・属性ビットチェック部、11・・・属性
ビット更新部、12・・・nバイト文字。
FIG. 1 is a block configuration diagram showing the configuration of an embodiment of the present invention. FIG. 2 is a configuration diagram of a multi-byte character. FIG. 3 is an explanatory diagram showing a special character attribute search procedure for multi-byte characters. The fourth mechanism and FIG. 5 are flowcharts showing attribute management processing operations for multiple characters. l... Byte attribute checking means, 2... Attribute bit table means, 3... Byte attribute checking unit, 4.1
3.14.15... Byte attribute table, 5... Byte attribute table creation section, 6.7,..., 8.16...
Attribute pit table notebook 9...Attribute bit table creation section, 10...Attribute bit checking section, 11...Attribute bit updating section, 12...N-byte character.

Claims (1)

【特許請求の範囲】 1、複数バイトで表現された文字コードに対して特殊文
字属性を定義する定義手段を備えた情報処理装置におい
て、 上記定義手段は、 特殊文字属性の存在の有無を示す識別子が登録された第
一テーブルと、 上記文字コードの最下位バイトを除くバイトの数値の組
み合わせで上記第一テーブルを検索して特殊文字属性の
存在を検定するバイト属性チェック手段と、 特殊文字属性の種別を示す数値が格納された第二テーブ
ルと、 上記バイト属性チェック手段による検定結果が特殊文字
属性の有りを示すときに、上記文字コードの最下位バイ
トの数値で上記第二テーブルを索して特殊文字属性の種
別を示す数値を検定する属性ビットチェック手段と を備えたことを特徴とする情報処理装置。
[Scope of Claims] 1. In an information processing device including definition means for defining special character attributes for character codes expressed in multiple bytes, the definition means: an identifier indicating the presence or absence of special character attributes; a first table in which is registered; a byte attribute check means for searching the first table using a combination of numerical values of bytes excluding the lowest byte of the character code to verify the existence of special character attributes; A second table in which a numerical value indicating the type is stored, and when the test result by the byte attribute checking means indicates the presence of a special character attribute, the second table is searched using the numerical value of the lowest byte of the character code. An information processing device comprising attribute bit checking means for verifying a numerical value indicating a type of special character attribute.
JP1013401A 1989-01-23 1989-01-23 Information processing equipment Expired - Fee Related JPH0736187B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1013401A JPH0736187B2 (en) 1989-01-23 1989-01-23 Information processing equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1013401A JPH0736187B2 (en) 1989-01-23 1989-01-23 Information processing equipment

Publications (2)

Publication Number Publication Date
JPH02255976A true JPH02255976A (en) 1990-10-16
JPH0736187B2 JPH0736187B2 (en) 1995-04-19

Family

ID=11832103

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1013401A Expired - Fee Related JPH0736187B2 (en) 1989-01-23 1989-01-23 Information processing equipment

Country Status (1)

Country Link
JP (1) JPH0736187B2 (en)

Also Published As

Publication number Publication date
JPH0736187B2 (en) 1995-04-19

Similar Documents

Publication Publication Date Title
JP4785833B2 (en) Database management system with persistent and user accessible bitmap values
JPH06110744A (en) Method for storing and controlling file
JPH0630066B2 (en) Table type language translation method
JP3003915B2 (en) Word dictionary search device
JP2888188B2 (en) Information retrieval device
CN109815240A (en) For managing method, apparatus, equipment and the storage medium of index
US5634123A (en) Data management using nested records and code points
US5519860A (en) Central processor index sort followed by direct record sort and write by an intelligent control unit
KR890016474A (en) Database object analysis method and system
JPH02255976A (en) Information processor
JP2002202973A (en) Structured document management device
JP2990312B2 (en) Data access method and device
US8849866B2 (en) Method and computer program product for creating ordered data structure
JP2569857B2 (en) Variable byte length character input control method
JP3288063B2 (en) Variable length data storage and reference system
JP2001134596A (en) Managing device and retrieving method for structured document
JP3062119B2 (en) Character string search table, method for creating the same, and character string search method
JPS59146339A (en) Information retrieving system
JPH0683887A (en) Drawing management system
JP3018579B2 (en) Name search processor
JPH04167123A (en) Mixed data processing system
JPH03116268A (en) Character attribute control system
JPH0391863A (en) Attribute management system for uncertain byte length character
JPS63291125A (en) Method for converting program
JPH05216730A (en) Data base managing processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees