JPH03245233A - Label retrieving system - Google Patents

Label retrieving system

Info

Publication number
JPH03245233A
JPH03245233A JP2043150A JP4315090A JPH03245233A JP H03245233 A JPH03245233 A JP H03245233A JP 2043150 A JP2043150 A JP 2043150A JP 4315090 A JP4315090 A JP 4315090A JP H03245233 A JPH03245233 A JP H03245233A
Authority
JP
Japan
Prior art keywords
name
hash
hash table
label
synonym
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2043150A
Other languages
Japanese (ja)
Inventor
Yoshio Yukie
雪江 良雄
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 JP2043150A priority Critical patent/JPH03245233A/en
Publication of JPH03245233A publication Critical patent/JPH03245233A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To improve the check efficiency by producing a 2nd hash table when the labels (synonym) having the same hash values obtained by the label are equal to a prescribed number. CONSTITUTION:The label Namej taken out via a label reading means 1 is registered. The hash value mj is produced from a label as mj = Hm(Namej), where Hm shows a hash function. If the number of synonyms contained in a 1st hash table 71 corresponding to the value mj is equal to the number of arrays of tables, a 2nd hash table production means 4 registers again the table defining the value mj as a synonym with use of Hn. A table register means 5 retrieves the tables 7 via the mj, registers the Namej in a prescribed place, and adds '1' to the synonym number of the table 71. A registration/retrieval deciding means 2 starts a synonym number retrieving means 3 at registration of labels and then starts a table retrieving means 6 at retrieval of labels respectively based on the syntax rule of a programming language. Then the label retrieving efficiency is improved owing to the reduction of the number of synonyms even though many labels having the same hash values due to the labels may emerge in a large number.

Description

【発明の詳細な説明】 本発明はプログラミング言語の翻訳処理における名標の
検索方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a name search method in programming language translation processing.

〔従来の技術〕[Conventional technology]

従来、この種の名標の検索方式は、1種類のハツシュテ
ーブルを使用して、ハツシュテーブルへの登録およびそ
の検索を行なっている。
Conventionally, this type of name search method uses one type of hash table to perform registration in the hash table and search thereof.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来の名標の検索方式では、ハツシュ値が同一
となる名標(シノニム)が出現すると、いくつ出現しよ
うともハツシュテーブル上ではハツシュチェーンから同
一のシノニムチェーンに登録されるため、名標の登録/
参照時の検索処理においてシノニムの数が多いと検索す
る必要のない名標を数多く参照することになり、検索効
果が低下する欠点がある。
In the conventional name search method described above, when names (synonyms) with the same hash value appear, they are registered in the same synonym chain from the hash chain on the hash table, no matter how many times they appear. Registration of marks/
If there are a large number of synonyms in the search process at the time of reference, a large number of names that do not need to be searched will be referenced, resulting in a decrease in search effectiveness.

〔課題を解決するための手段〕[Means to solve the problem]

本発明の名標の検索方式は、プログラミング言語の翻訳
処理における名標の検索方式において、ソースプログラ
ムの中から名標を取出すための名標読込み手段と、名標
の登録時に第1ハツシュテーブルのシノニム(ハツシュ
値が同一となる名標)数が決才った数と等しいかを検査
するシノニム数検査手段と、前記シノニム数が決まった
数と等しいときに第2ハツシュテーブルを作成する第2
ハツシュテーブル作成手段と、前記名標読込み手段で得
られた名標を前記第1および第2ハツシュテーブルに登
録するテーブル登録手段と、名標の参照時に名称を登録
したハツシュテーブルの中から検索するテーブル検索手
段とを有することにより構成される。
The name search method of the present invention is a name search method in a programming language translation process, which includes a name reading means for extracting a name from a source program, and a first hash table when registering a name. synonym number checking means for checking whether the number of synonyms (names with the same hash value) is equal to a determined number; and creating a second hash table when the number of synonyms is equal to a determined number. Second
a hash table creating means; a table registration means for registering the name name obtained by the name name reading means in the first and second hash tables; and a hash table in which the name is registered when referring to the name mark. and a table search means for searching from.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する。 Next, the present invention will be explained with reference to the drawings.

第1図は本発明の一実施例の構成図である。第1図を参
照すると、この実施例はソースプログラム8の中から名
標を取り出すため名標読込み手段lと、名標の登録時に
第1ハツシュテーブル71のシノニム数が決まった数と
等しいか検査するシノニム数検査手段3と、シノニム数
が決まった数と等しい時に第2ハツシュテーブル72を
作成する第2ハツシュテーブル作成手段4と、名標ハツ
シュテーブル7に登録するテーブル登録手段5と、名標
の参照時に名標を登録したハツシュテーブル7の中から
検索するテーブル検索手段6と、上記名標を登録するハ
ツシュテーブル7と、名標読込み手段1により取出しな
名標が登録か参照か判断しシノニム検査手段3またはテ
ーブル検索手段6を起動する登録/検索判定手段2とか
ら構成されている。さらにハツシュテーブル7は上述の
第1ハツシュテーブル71と第2ハツシュテーブル72
を有している。
FIG. 1 is a block diagram of an embodiment of the present invention. Referring to FIG. 1, this embodiment includes a name reading means 1 for extracting a name from a source program 8, and a name reading means 1 to check whether the number of synonyms in the first hash table 71 is equal to a predetermined number when registering a name. A synonym number checking means 3 to check, a second hash table creation means 4 for creating a second hash table 72 when the number of synonyms is equal to a predetermined number, and a table registration means 5 for registering in the name tag hash table 7. When referring to a name tag, a table search means 6 searches from the hash table 7 in which the name name is registered, a hash table 7 registers the name name, and a name reading means 1 selects the name name to be retrieved. It consists of a registration/search determination means 2 which determines whether it is a registration or a reference and activates a synonym check means 3 or a table search means 6. Furthermore, the hash table 7 includes the above-mentioned first hash table 71 and second hash table 72.
have.

第2図は第1図のハツシュテーブル7への登録の状態図
で、第2図を参照して名標の登録について述べる。名標
読込み手段1により取出した名標Namejを登録する
場合を考える。ハツシュ値mJは名標により生成される
FIG. 2 is a state diagram of registration in the hash table 7 of FIG. 1, and registration of a name mark will be described with reference to FIG. Let us consider the case where the name name Namej retrieved by the name name reading means 1 is to be registered. The hash value mJ is generated by the name tag.

m、=Hm  (Namej )(H,はハツシュ関数
)この場合、m」に対応する第1ハツシュテーブルのシ
ノニム数が決まった数(例えば第1ハツシュテーブルの
配列数)と等しくなったとすると、第2ハツシュテーブ
ル作成手段4は、ハツシュ関数H,,(H,はHl、l
とは別のハツシュ関数)を用いて、f’rlJをシノニ
ムとする名標(Namejは除く)に対して第2ハツシ
ュテーブルを登録し直す。テーブル登録手段5は、ハツ
シュ値mJを用いてハツシュテーブル7を検索し、所定
の場所に名標Namejの登録を行い(今は、m、に対
応する第1ハツシュテーブルのシノニム数が決まった数
似上なので、名標Namejは第2ハツシュテーブルか
らチェーンされる)、m、に対応する第1ハツシュテー
ブルのシノニム数を1カンウントアツプする。
m, = Hm (Namej) (H, is a hash function) In this case, if the number of synonyms of the first hash table corresponding to "m" becomes equal to a fixed number (for example, the number of arrays of the first hash table) , the second hash table creation means 4 generates a hash function H, , (H, is Hl, l
The second hash table is re-registered for the names (excluding Namej) that have f'rlJ as a synonym. The table registration means 5 searches the hash table 7 using the hash value mJ and registers the name name Namej in a predetermined location (currently, the number of synonyms in the first hash table corresponding to m is determined). Since the numbers are similar, the number of synonyms in the first hash table corresponding to m (name name Namej is chained from the second hash table) is counted up by one.

名標Name 1 、・・・・・・Nameiまではハ
ツシュ値mI、・・・・・・mlを生成し、ハツシュテ
ーブル7に登録を行っていた。その隙間−のハツシュ値
をもつ名標が出現すると、第1ハツシユテールプルから
シノニムチェーンを用いて名標の登録を行っていた。
Hash values mI, . . . ml were generated and registered in the hash table 7 up to Name 1, . . . Namei. When a name tag with a hash value equal to that gap appears, the name tag is registered using a synonym chain from the first hash tail pull.

第2図(a)は名標Namejが登録される前すなわち
m、1に対応する第2ハツシュテーブルが作成される前
のハツシュテーブル7の状態、第2図(b)は名標N 
a m e jが登録された後、すなわちm、に対応す
る第2ハツシュテーブルが作成された後のハツシュテー
ブル7の状態を示す。
FIG. 2(a) shows the state of the hash table 7 before the name name Namej is registered, that is, before the second hash table corresponding to m,1 is created, and FIG. 2(b) shows the state of the hash table 7 before the name name Namej is registered.
The state of the hash table 7 is shown after a m e j is registered, that is, after the second hash table corresponding to m is created.

次に、名標の参照時について述へる。名標Namejを
参照する場合、テーブル検索手段6はハツシュ間数Hf
fiから生成されたハツシュ値mJを用いて第1ハツシ
ュテーブルを検索する。(この場合、mjに対応する第
1ハツシュテーブルのシノニム数が決まった数を超えて
いるので、ハツシュ関数H1から生成されハツシュ値m
Jを用いて第2ハツシュテーブルを検索する。)なお、
登録/検索判定手段2はプログラミング言語の構文規則
に従い、名標の登録時にはシノニム数検索手段3を名標
の検索時にはテーブル検索手段6を起動する。
Next, we will discuss when referring to name tags. When referring to the name name Namej, the table search means 6 uses the hash interval number Hf
The first hash table is searched using the hash value mJ generated from fi. (In this case, since the number of synonyms in the first hash table corresponding to mj exceeds the predetermined number, the hash value m
Search the second hash table using J. )In addition,
The registration/search determination means 2 follows the syntax rules of the programming language, and activates the synonym number search means 3 when registering a name, and the table search means 6 when searching for a name.

〔発明の効果〕 以上説明したように本発明は、名標によるハラ一 シュ値が同一の名標が決韮った数と等しいときに第2ハ
ツシュテーブルを作成するとにより、名標によるハツシ
ュ値が同一のものが多数出現でもシノニムが減少し、検
索効率が向上する効果がある。
[Effects of the Invention] As explained above, the present invention creates a second hash table when the halash value of a name tag is equal to the number of identical name tags. Even if many items with the same value appear, synonyms are reduced and search efficiency is improved.

図面の簡単な説明 第1図は本発明の一実施例の構成図、第2図は名標の登
録の状態図である。
BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a state diagram of name registration.

1・・・・・・名標読込み手段、2・・・・・・登録/
検索判定手段、3・・・・・・シノニム数検査手段、4
・・・・・・第2ハツシュテーブル作成手段、5・・・
・・・テーブル登録手段、6・・・・・・テーブル検索
手段、7・・・・・・ハツシュテーブル、71・・・・
・・第1ハツシュテーブル、72・・・・・・第2ハツ
シュテーブル、8・・・・・・ソースプログラム。
1...Name tag reading means, 2...Registration/
Search determination means, 3...Synonym number inspection means, 4
...Second hash table creation means, 5...
... table registration means, 6 ... table search means, 7 ... hash table, 71 ...
...First hash table, 72...Second hash table, 8...Source program.

Claims (1)

【特許請求の範囲】[Claims]  プログラミング言語の翻訳処理における名標の検索方
式において、ソースプログラムの中から名標を取出すた
めの名標読込み手段と、名標の登録時に第1ハッシュテ
ーブルのシノニム(ハッシュ値が同一となる名標)数が
決まった数と等しいかを検査するシノニム数検査手段と
、前記シノニム数が決まった数と等しいときに第2ハッ
シュテーブルを作成する第2ハッシュテーブル作成手段
と、前記名標読込み手段で得られた名標を前記第1およ
び第2ハッシュテーブルに登録するテーブル登録手段と
、名標の参照時に名称を登録したハッシュテーブルの中
から検索するテーブル検索手段とを有することを特徴と
する名標の検索方式。
In the search method for name names in the translation process of programming languages, there is a name reading means for extracting name names from a source program, and synonyms (name names with the same hash value) in the first hash table when registering name names. ) synonym number checking means for checking whether the number is equal to a predetermined number; second hash table creation means for creating a second hash table when the number of synonyms is equal to the predetermined number; and the name tag reading means. A name characterized by comprising table registration means for registering the obtained name name in the first and second hash tables, and table search means for searching from the hash table in which the name is registered when referring to the name name. Mark search method.
JP2043150A 1990-02-23 1990-02-23 Label retrieving system Pending JPH03245233A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2043150A JPH03245233A (en) 1990-02-23 1990-02-23 Label retrieving system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2043150A JPH03245233A (en) 1990-02-23 1990-02-23 Label retrieving system

Publications (1)

Publication Number Publication Date
JPH03245233A true JPH03245233A (en) 1991-10-31

Family

ID=12655814

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2043150A Pending JPH03245233A (en) 1990-02-23 1990-02-23 Label retrieving system

Country Status (1)

Country Link
JP (1) JPH03245233A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7469243B2 (en) 2003-01-27 2008-12-23 International Business Machines Corporation Method and device for searching fixed length data

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7469243B2 (en) 2003-01-27 2008-12-23 International Business Machines Corporation Method and device for searching fixed length data

Similar Documents

Publication Publication Date Title
US6339777B1 (en) Method and system for handling foreign key update in an object-oriented database environment
US5819265A (en) Processing names in a text
US7809551B2 (en) Concept matching system
US8856183B2 (en) Database access using partitioned data areas
JPH0242572A (en) Preparation/maintenance method for co-occurrence relation dictionary
EP1570381A1 (en) Evaluating relevance of results in a semi-structured data-base system
JPH05151253A (en) Document retrieving device
JP3784060B2 (en) Database search system, search method and program thereof
JPH03245233A (en) Label retrieving system
JP3558267B2 (en) Document search device
JPH0773187A (en) Retrieving system
JPH02227734A (en) Label retrieving device
JP3287307B2 (en) Structured document search system, structured document search method, and recording medium storing structured document search program
JPS63238622A (en) Relation retrieval system
JPH05128159A (en) Key word extraction and its device
KR960705281A (en) Fuzzy data processing device and method therefor
JPH05108719A (en) Information retrieving device
Marks et al. Classification of index partitions to boost XML query performance
Alghamdi et al. Efficient Processing of Queries over Recursive XML Data
JPH04353986A (en) Optical character reader
JPH05313971A (en) Key word managing system in relational data base
JPH07104867B2 (en) Relational database system
JPH0798711A (en) And calculating/retrieving system for table
JPH05165891A (en) Data registration/retrieval system of data base
JPH0546666A (en) Information retrieving device