JPH0677835A - Coding method and coder - Google Patents

Coding method and coder

Info

Publication number
JPH0677835A
JPH0677835A JP28626192A JP28626192A JPH0677835A JP H0677835 A JPH0677835 A JP H0677835A JP 28626192 A JP28626192 A JP 28626192A JP 28626192 A JP28626192 A JP 28626192A JP H0677835 A JPH0677835 A JP H0677835A
Authority
JP
Japan
Prior art keywords
node
text
code
input
circuit
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.)
Withdrawn
Application number
JP28626192A
Other languages
Japanese (ja)
Inventor
Masato Yoneda
正人 米田
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.)
JFE Steel Corp
Original Assignee
Kawasaki Steel 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 Kawasaki Steel Corp filed Critical Kawasaki Steel Corp
Priority to JP28626192A priority Critical patent/JPH0677835A/en
Priority to US08/044,195 priority patent/US5675668A/en
Publication of JPH0677835A publication Critical patent/JPH0677835A/en
Priority to US08/927,461 priority patent/US5946418A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

PURPOSE:To reduce a time till a code number is obtained by adding a node number to each node of a tree structure so as to obtain a node to be advanced next based on an inputted text and a number of the node currently located. CONSTITUTION:Text data input terminals TD0, TD1 and node number input terminals ND0, ND1-ND3 are provided to a coincidence detection circuit section 20. Data inputted from the node number input terminals are inputted to a node number setting circuit 22. Then, a node number data output 26 from a coding circuit section 25 is connected to the node number setting circuit 22 and an output changeover terminal SW1 selects an output. Then, a node number is given to each node of a tree structure, and based on the inputted text and a node number of a node currently located, the node to be advanced next is obtained. Thus, even when lots of branches are extended from the node currently located, a node to be advanced next is immediately obtained by one retrieval.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、木構造に配列された複
数のテキストの配列順序により定まるコード番号を高速
に求めて出力するに適した符号化方法及び符号化装置に
関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a coding method and a coding apparatus suitable for rapidly obtaining and outputting a code number determined by the order of arrangement of a plurality of texts arranged in a tree structure.

【0002】[0002]

【従来の技術】複数のテキストを再出現を許容して観念
的に木構造に配列しておき、そのテキストの配列順序に
応じてあらかじめ定めておいたコード番号を求める方法
が従来より考えられている。ここでは具体例を用いて従
来の技術について説明する。
2. Description of the Related Art Conventionally, a method of arranging a plurality of texts in a tree structure by allowing them to reappear and obtaining a predetermined code number according to the arrangement order of the texts has been conventionally considered. There is. Here, a conventional technique will be described using a specific example.

【0003】[0003]

【表1】[Table 1]

【0004】[0004]

【表2】表1は、各テキストT0,T1,T2,T3
と、これらの各テキストT0,T1,T2,T3と同一
視される2ビットからなるテキストコードとの対応表で
あり、表2は、テキストが配列されてなるテキストチェ
インとそのテキストチェインに付されたコード番号との
対応表である。ここで10ビットからなるチェインコー
ドは、コード番号を2進符号で表わしたものである。
[Table 2] Table 1 shows each text T0, T1, T2, T3
And a text code consisting of 2 bits which is equated with each of these texts T0, T1, T2 and T3. Table 2 is a text chain in which texts are arranged and the text chains are attached to the text chain. It is a correspondence table with different code numbers. The 10-bit chain code is a code number represented by a binary code.

【0005】図9は、木構造に配列されたテキストの一
例を表わした図である。先ず図の一番上のノード(頂
点)から2本の枝が延び、各枝の先の各ノードには各テ
キストT0,T1が配置されている。このうちテキスト
T0が配置されたノードにはコード番号C1が付されて
おり、一方テキストT1が配置されたノードにはコード
番号は付されていない。これらの各ノードのうちテキス
トT0が配置されたノードからはさらに3本の枝が延
び、それら3本の枝の先の各ノードにはそれぞれテキス
トT0,T1,T3が配置されている。また、これらの
各ノードにはそれぞれコード番号C3,C4,C5が付
されている。これらの各ノードのうちテキストT0が配
置されたノードからはさらに2本の枝が延び、それら2
本の枝の先の各ノードにはそれぞれテキストT1,T2
が配置されており、こられの各ノードにはそれぞれコー
ド番号C8,C9が付されている。また最上段にある、
テキストT1が配置されたノードからは2本の枝が延
び、それら2本の枝の先の各ノードにはそれぞれテキス
トT0,T2が配置されており、これらの各ノードのう
ち、テキストT2が配置されたノードにはコード番号C
7が付されている。さらに、これらテキストT0,T2
が配置された各ノードからはそれぞれ1本,2本の枝が
延び、テキストT0が配置されたノードから延びる枝の
先端のノードにはテキストT0が配置され、またコード
番号C10が付されており、テキストT2が配置された
ノードから延びる2本の枝の先端の各ノードには各テキ
ストT1,T3が配置され、またこれらの各ノードには
コード番号C11,C12が付されている。
FIG. 9 is a diagram showing an example of texts arranged in a tree structure. First, two branches extend from the top node (vertex) of the figure, and texts T0 and T1 are arranged at the nodes at the ends of the branches. Of these, the code number C1 is attached to the node where the text T0 is arranged, while the code number is not attached to the node where the text T1 is arranged. Three branches further extend from the node where the text T0 is arranged among these nodes, and the texts T0, T1, and T3 are arranged at the nodes ahead of these three branches, respectively. Moreover, code numbers C3, C4, and C5 are assigned to the respective nodes. Two branches further extend from the node in which the text T0 is arranged among these nodes.
Texts T1 and T2 are provided at the nodes at the end of the book branch, respectively.
Are arranged, and code numbers C8 and C9 are attached to the respective nodes. Also at the top,
Two branches extend from the node where the text T1 is arranged, and the texts T0 and T2 are arranged at the nodes at the ends of the two branches, respectively. Of these nodes, the text T2 is arranged. Code number C for the selected node
7 is attached. Furthermore, these texts T0, T2
One and two branches respectively extend from the node in which is placed, and the text T0 is placed at the node at the end of the branch extending from the node in which the text T0 is placed, and the code number C10 is attached. , T2 are arranged at the nodes at the ends of the two branches extending from the node at which the text T2 is arranged, and code numbers C11, C12 are attached to these nodes.

【0006】ここで、テキストT0,T1がこの順序で
配列されてなるテキストチェインT0→T1に対応する
コード番号C4を求める場合について説明する。まず最
初のテキストT0(テキストコード’00’)が入力さ
れると、木構造化されたデータの最初の2つのノードに
配置されたテキストT0,T1が格納されている各アド
レスを記憶装置に順次与えてそのテキストコード’0
0’,’01’を順次出力し、出力されたテキストコー
ド’00’,’01’を入力されたテキストコード’0
0’と順次比較する。ここではテキストT0(テキスト
コード’00’)が記憶装置の一番最初のアドレスに格
納されているものとし、その場合、1回のアドレスアク
セスと1回の比較動作により、入力されたテキストT0
と一致する、記憶装置上のテキストT0が格納されたア
ドレスが特定される。このことは図8に示す1番上の段
の2つの枝のうち、図の左側の枝を辿ってテキストT0
が配置されたノードに進むことを意味する。
A case will now be described in which the code number C4 corresponding to the text chain T0 → T1 in which the texts T0 and T1 are arranged in this order is obtained. First, when the first text T0 (text code '00') is input, the addresses storing the texts T0 and T1 arranged in the first two nodes of the tree-structured data are sequentially stored in the storage device. Give that text code '0
0'and '01' are output sequentially, and the output text code '00' and '01' are input text code '0
Compare with 0's sequentially. Here, it is assumed that the text T0 (text code "00") is stored at the first address of the storage device, and in that case, the input text T0 is obtained by one address access and one comparison operation.
The address at which the text T0 on the storage device that matches is stored is specified. This means that of the two branches in the top row shown in FIG.
Means to go to the node where is placed.

【0007】次いでテキストT1(テキストデータ’0
1’)が入力されると、記憶装置上の、上記により特定
されたアドレスの内容が参照され、この内容により指示
される、テキストT0の枝先の各ノードにある各テキス
トT0,T1,T3の各アドレスを記憶装置に対して順
次与え、記憶装置に格納されたテキストT0,T1,T
3を順次得、これら順次得られたテキストT0,T1,
T3が入力されたテキストT1と順次比較される。記憶
装置にテキストT0,T1,T3の順に格納されている
ものとすると、格納されたテキストT1は2番目にある
ため、2回のアドレスアクセスと2回の一致比較動作に
より、入力されたテキストT1と一致する、記憶装置上
のテキストT1が格納されたアドレスが特定される。こ
のことは図9の上から2段目を構成する、テキストT1
が配置されたノードに進むことを意味し、これによりこ
のノードに付されたコード番号C4が求められ、このコ
ード番号C4が出力される。
Next, the text T1 (text data '0
1 ') is input, the contents of the address specified above in the storage device are referred to, and the texts T0, T1, T3 at each node at the branch destination of the text T0 indicated by this contents are referred to. The addresses T0, T1, T stored in the storage device are sequentially given to the storage device.
3 are sequentially obtained, and these sequentially obtained texts T0, T1,
T3 is sequentially compared with the input text T1. Assuming that the texts T0, T1, and T3 are stored in the storage device in this order, the stored text T1 is the second one, so the input text T1 is obtained by two address accesses and two coincidence comparison operations. The address at which the text T1 on the storage device that matches is stored is specified. This means that the text T1 constituting the second row from the top of FIG.
Means that the code number C4 assigned to this node is obtained, and this code number C4 is output.

【0008】ここではテキストチェインT0→T1につ
いて説明したが、この場合、合計3回のアドレスアクセ
スと3回の一致比較によりコード番号C4が得られるこ
ととなる。
Although the text chain T0 → T1 has been described here, in this case, the code number C4 is obtained by a total of three address accesses and three coincidence comparisons.

【0009】[0009]

【発明が解決しようとする課題】上記従来例はかなり単
純化された例を示したものであるが、図8に示す各段に
それぞれ極めて多数のノードを備えた木構造の場合、極
めて多数回のアドレスアクセス、一致比較を行って初め
て所望とするコード番号を得ることができ、コード番号
を得るまでに長時間を要してしまうという問題がある。
The above conventional example shows a considerably simplified example. In the case of the tree structure shown in FIG. 8 in which each stage has an extremely large number of nodes, a very large number of times is required. There is a problem that the desired code number can be obtained only after the address access and the coincidence comparison are performed, and it takes a long time to obtain the code number.

【0010】本発明は、上記問題を解決し、たとえ木構
造の各段に多数のノードが配列されている場合であって
もコード番号を求めるまでの時間が極めて短時間で済む
符号化方法及びその方法を実施する符号化装置を提供す
ることを目的とする。
The present invention solves the above-mentioned problems, and even if a large number of nodes are arranged in each stage of a tree structure, the time until the code number is obtained is extremely short, and an encoding method and It is an object of the present invention to provide an encoding device that implements the method.

【0011】[0011]

【課題を解決するための手段】上記目的を達成するため
の本発明の符号化方法は、複数のテキストが再出現を許
容して木構造の各ノードに配列され、該各ノードに必要
に応じてコード番号が付され、前記木構造の枝を辿り辿
った先に存在するノードに付されたコード番号を求める
ことにより、辿った道筋に沿う順序に上記テキストが配
列されてなるテキストチェインをコード番号に変換する
符号化方法において、上記木構造の各ノードにノード番
号を付しておき、上記テキストが入力された際に、入力
されたテキストと現在位置するノードのノード番号とに
基づいて次に進むべきノードを求めることを特徴とする
ものである。
The encoding method of the present invention for achieving the above object is arranged such that a plurality of texts are arranged in each node of a tree structure while allowing re-appearance, and each node optionally The code chain is assigned a code number, and the code number attached to the node existing at the end of the branch of the tree structure is obtained, thereby coding the text chain in which the above text is arranged in the order along the traced path. In the encoding method for converting into a number, a node number is given to each node of the tree structure, and when the above text is input, the next node is added based on the input text and the node number of the node currently located. It is characterized by finding a node to be advanced to.

【0012】ここで、上記木構造の各ノードには、原則
的には各ノードを互いに識別するために互いに異なるノ
ード番号が付されるが、一旦枝が分かれた後、この分か
れた先の複数のノードの先端側に、同一のコード番号が
付された同一のテキストないしテキストチェインが存在
する場合には、上記複数のノードから、先端側の同一の
ノードに枝が延びるように、これら先端側のテキストな
いしテキストチェインを1つに纏め、この同一のノード
に枝を延ばす上記複数のノードに同一のノード番号を付
することが好ましい。
Here, in principle, each node of the tree structure is given a different node number in order to identify each node from each other. If the same text or text chain with the same code number is present at the tip side of the node, the tip side is arranged so that a branch extends from the plurality of nodes to the same node on the tip side. It is preferable that the texts or the text chains of 1 are combined into one, and the same node number is given to the plurality of nodes that branch to the same node.

【0013】また、この符号化方法を実施するための本
発明の符号化装置は、複数のテキストが再出現を許容し
て木構造の各ノードに配列され、該各ノードに必要に応
じてコード番号が付され、前記木構造の枝を辿り辿った
先に存在するノードに付されたコード番号を求めること
により、辿った道筋に沿う順序に上記テキストが配列さ
れてなるテキストチェインをコード番号に変換する符号
化装置において、上記テキストを入力するテキスト入力
部と、上記各ノードに付されたノード番号をラッチする
ラッチ回路を有しこのラッチ回路にラッチされたノード
番号を入力するノード番号入力部と、入力されたテキス
ト及びノード番号に基づいて、これら入力されたテキス
ト及びノード番号により定められるノードと一致するノ
ードを検出する一致検出部とを備えた一致検出回路部、
および上記一致検出部で検出されたノードに付されたノ
ード番号を出力して上記ラッチ回路に入力するノード番
号出力部と、上記一致検出部で検出されたノードにコー
ド番号が付されている場合に該コード番号を出力するコ
ード番号出力部とを備えた符号化回路部を具備すること
を特徴とするものである。
Further, in the encoding apparatus of the present invention for implementing this encoding method, a plurality of texts are arranged in each node of the tree structure while allowing reappearance, and each node is coded as necessary. Numbers are added, and the code number assigned to the node existing at the end of the branch of the tree structure is obtained, and the text chain in which the above texts are arranged in the order along the traced path is used as the code number. In a coding device for conversion, a text input unit for inputting the above text and a node number input unit for inputting the latched node number to the latch circuit, which has a latch circuit for latching the node number assigned to each node And a node that matches a node defined by the input text and node number based on the input text and node number. Coincidence detecting circuit unit that includes a detection unit,
And a node number output section for outputting the node number attached to the node detected by the coincidence detection section and inputting it to the latch circuit, and a code number attached to the node detected by the coincidence detection section And an encoding circuit section having a code number output section for outputting the code number.

【0014】この符号化装置において、その一致検出部
を、バッファもしくはインバータと、該バッファもしく
はインバータの入力側とグラウンドとの間に互いに直列
に接続された複数のトランジスタとを有する多数の一致
比較回路、および該多数の一致比較回路それぞれのバッ
ファもしくはインバータの入力側を、次のノードの検索
に先立って充電するプリチャージ回路を有する構成と
し、かつ、互いに異なるテキストと互いに異なるノード
番号との組合せにより定まる互いに異なるビットパター
ンのうちのいずれかのビットパターンによりいずれかの
一致比較回路のバッファもしくはインバータの入力側が
放電されるように、上記多数の一致比較回路のうちの一
部の一致比較回路を除く他の一致比較回路のトランジス
タのゲートがテキスト入力部およびノード番号入力部と
接続されるとともに、上記一部の一致比較回路を構成す
るトランジスタのうちの該一部の一致比較回路それぞれ
について少くとも各1つずつのトランジスタが遮断状態
となるように、該少くとも各1つずつのトランジスタの
ゲートが電源もしくはグラウンドに接続された構成とす
ることが好ましい。
In this encoding device, the coincidence detecting section has a number of coincidence comparing circuits each having a buffer or an inverter and a plurality of transistors connected in series with each other between the input side of the buffer or the inverter and the ground. , And the input side of each of the buffers or inverters of the plurality of match comparison circuits is configured to have a precharge circuit for charging prior to the search of the next node, and by combining different texts and different node numbers, Exclude some match comparison circuits of the above-mentioned many match comparison circuits so that the buffer or inverter input side of any one of the match comparison circuits is discharged by any one of the different bit patterns defined. The gate of the transistor of the other match comparison circuit is It is connected to the input section and the node number input section, and at least one transistor of each of the transistors forming the part of the match comparison circuit is turned off. In addition, it is preferable that the gates of at least one transistor are connected to the power supply or the ground.

【0015】[0015]

【作用】本発明の符号化方法は、木構造の各ノードにノ
ード番号を付しておき、入力されたテキストと現在位置
するノードのノード番号とに基づいて次に進むべきノー
ドを求めるようにしたため、現在位置するノードから多
数本の枝が延びていても、これを順次サーチしていく前
述した従来例の場合と異なり、一回の検索動作で直ちに
次に進むべきノードが求められ、したがってテキストチ
ェインが極めて短時間にコード番号に変換される。
According to the encoding method of the present invention, a node number is attached to each node of the tree structure, and a node to be advanced to the next is obtained based on the input text and the node number of the node currently located. Therefore, even if a large number of branches extend from the node currently located, unlike the case of the above-described conventional example in which the branches are sequentially searched, a node that should immediately proceed to the next is obtained by one search operation, and therefore, Text chains are converted to code numbers in a very short time.

【0016】ここで、一旦枝が分かれた後、この分かれ
た先の複数のノードの先端側に同一のコード番号が付さ
れた同一のテキストないしテキストチェインが存在する
場合に、本発明では、たとえ同一のコード番号が付され
た同一のテキストないしテキストチェインであっても一
旦枝が分かれた以上は互いに異なるノードもしくはノー
ド列として取り扱ってもよいが、これら複数のノードか
ら同一のノードに枝を延ばすように木構造を構成し、こ
の同一のノードに枝を延ばす上記複数のノードに同一の
ノード番号を付した場合、木構造が全体として簡素化さ
れ、これをハードウェア化した場合に回路規模を小型化
することができる。
In the present invention, even if the same text or text chain with the same code number is present at the tip side of the plurality of nodes after the branch is once branched, the present invention Even the same text or text chain with the same code number may be treated as different nodes or node sequences once the branch has been split, but branch from these multiple nodes to the same node When the tree structure is configured as described above, and the same node number is given to the plurality of nodes that extend the branch to this same node, the tree structure is simplified as a whole, and if this is implemented as hardware, the circuit scale is reduced. It can be miniaturized.

【0017】また本発明の符号化装置は、一致検出回路
において、ノード番号入力部に現在のノードのノード番
号をラッチしておき、テキスト入力部からテキストが入
力されるとこの入力されたテキストおよびラッチされて
いるノード番号の双方に基づいて次に進むべきノードが
検出され、その後、符号化回路部において、次の段の検
索動作のために検出されたノードのノード番号が出力さ
れてノード番号入力部にセットされるとともに、コード
番号を出力するようにしたため、順次入力されるテキス
トからなるテキストチェインに対応するコード番号が極
めて短時間に求められる。
Further, in the encoding device of the present invention, in the coincidence detection circuit, the node number of the current node is latched in the node number input section, and when the text is input from the text input section, the input text and The node to be advanced to the next is detected based on both of the latched node numbers, and then the encoding circuit unit outputs the node number of the node detected for the search operation of the next stage to output the node number. Since the code number is set in the input section and the code number is output, the code number corresponding to the text chain of sequentially input texts can be obtained in an extremely short time.

【0018】この本発明の符号化装置を集積回路化する
ことを考えると、回路パターンは種々の木構造に共通的
に用い得るように構成しておき、特定の木構造毎に一致
検出部の配線のみを変更するように構成することが好ま
しい。この一致検出部の配線は、この一部検出部にテキ
ストとノード番号が入力されたとき次にどのノードに進
むか、即ち符号化回路部のどのアドレスを指定するかを
定めるものである。
Considering that the encoding device of the present invention is integrated into a circuit, the circuit pattern is configured so that it can be commonly used for various tree structures, and the coincidence detecting section is provided for each specific tree structure. It is preferable that only the wiring is changed. The wiring of the coincidence detecting unit determines which node to proceed to when the text and the node number are input to the partial detecting unit, that is, which address of the encoding circuit unit is designated.

【0019】この場合に、一致検出部は種々の木構造に
対処できるようにその回路パターンが構成されているた
め、特定の木構造を構成した場合に一部の回路が使用さ
れないまま残ることがあり、この一部の回路を、少くと
も符号化装置全体の作動に悪影響を及ぼすことのないよ
うどのように処置するかが問題となる。ここで本発明の
符号化装置において、その一致検出部を上記多数の一致
検出回路と上記プリチャージ回路とを有し上述の所定の
接続を行った機能とした場合は、上記バッファもしくは
インバータの出力が安定的に一義的に定まるため、この
出力を、そのノードが指定されないことを表わす信号と
して用いることにより木構造により一部の回路が余って
もその一部の回路が全体の作動の不安定要因とはなら
ず、符号化装置全体を安定的に作動させることができ
る。
In this case, since the circuit pattern of the coincidence detecting unit is configured to handle various tree structures, some circuits may remain unused when a specific tree structure is configured. The problem is how to deal with this part of the circuit so as not to adversely affect the operation of the entire coding device at least. Here, in the encoding device of the present invention, when the coincidence detection unit has the above-mentioned numerous coincidence detection circuits and the precharge circuit and has the above-mentioned predetermined connection function, the output of the buffer or inverter Can be stably and unambiguously determined, and by using this output as a signal indicating that the node is not specified, even if some circuits are left over due to the tree structure, some of the circuits become unstable in overall operation. It is not a factor, and the entire encoding device can be operated stably.

【0020】[0020]

【実施例】以下、本発明の実施例について説明する。
尚、ここでは前述した従来例における表1,表2をその
まま用いることとする。図1は、本発明の一実施例に係
るデータ構造(木構造)を示した図である。この図1
は、前述した従来例における図9に対応するものであ
り、図9異なる点は、各ノードにノード番号(図中かっ
こ内の数字)が付されている点である。
EXAMPLES Examples of the present invention will be described below.
In this case, Tables 1 and 2 in the above-mentioned conventional example are used as they are. FIG. 1 is a diagram showing a data structure (tree structure) according to an embodiment of the present invention. This Figure 1
9 corresponds to FIG. 9 in the above-mentioned conventional example, and the difference from FIG. 9 is that each node is given a node number (number in parentheses in the figure).

【0021】ここで、この木構造化されたデータを用い
た符号化の仕方を具体的に説明すると、以下のようにな
る。まず、テキストチェインT0→T1が入力された時
を考える。このときは、所望とする出力チェインコード
は、表1に定義されるように’0000000100’
である。
Here, the encoding method using the tree-structured data will be specifically described as follows. First, consider the case where the text chain T0 → T1 is input. At this time, the desired output chain code is '0000000100' as defined in Table 1.
Is.

【0022】この結果を得るために、まずテキストT0
に相当するテキストコード’00’が入力される。木構
造上のテキストT0は、ノード番号(0)(ノード番号
(0)は、符号化の最初のノード番号である)の枝先の
ノードに配置されている。ノード番号(0)が付された
ノードから延びる枝の先端に接続されているテキストT
0は1つしかないが、ノード番号(0)が付されたノー
ド以外のノードと接続された、テキストT0が配置され
たノードは他にもいくつか存在する。
To obtain this result, first the text T0
The text code '00' corresponding to is input. The text T0 on the tree structure is arranged at the node at the branch destination of the node number (0) (node number (0) is the first node number of encoding). Text T connected to the end of the branch extending from the node with node number (0)
Although there is only one 0, there are some other nodes in which the text T0 is arranged, which are connected to nodes other than the node with the node number (0).

【0023】そこで、ここでは、この木構造データに入
力されるテキストが木構造の最初のテキストT0である
ことを認識するために、このテキストデータ’00’
と、それに加えてノード番号(0)(データ’000
0’)の双方でサーチする。尚、この枝先のテキストT
0が配置されたノードにはコード番号C1(チェインコ
ード’0000000001’)が与えられているが、
今回はこれを求めるべきコード番号とはしない。
Therefore, here, in order to recognize that the text input to this tree structure data is the first text T0 of the tree structure, this text data '00' is used.
In addition to that, node number (0) (data '000
0 ') is searched. The text T at the end of this branch
Although the code number C1 (chain code '0000000001') is given to the node in which 0 is arranged,
This time it is not the code number that should be requested.

【0024】次いで、テキストT1に相当するテキスト
データ’01’が入力されると、その1つ前のテキスト
T0のノード番号(1)(データ’0001’)と今回
入力されたテキストデータ’01’との双方により木構
造データベースが検索される。これによって、他の枝先
にあるテキストT1と、ノード番号(1)の付されたノ
ードの枝先にあるテキストT1とを明確に区別すること
が可能となる。
Next, when the text data "01" corresponding to the text T1 is input, the node number (1) (data "0001") of the text T0 immediately before the text data "01" and the text data "01" input this time are input. The tree structure database is searched by both. As a result, it is possible to clearly distinguish the text T1 at the other branch end and the text T1 at the branch end of the node with the node number (1).

【0025】これでテキストチェインT0→T1の枝が
定まり、このT1の枝先に付されたコード番号C4(チ
ェインコード’0000000100’)が、求めるべ
きコード番号として出力されることになる。同様にし
て、表1で定義される任意のチェインコードC1,…
…,C12を求めることができる。図2はこの木構造の
データベースをハードウェア化した符号化装置の一例を
示す図である。
With this, the branch of the text chain T0 → T1 is determined, and the code number C4 (chain code '00000000100') attached to the end of the branch of the T1 is output as the code number to be obtained. Similarly, any chain code C1, ... Defined in Table 1
..., C12 can be obtained. FIG. 2 is a diagram showing an example of an encoding device in which the tree structure database is implemented as hardware.

【0026】この符号化装置の一致検出回路部20に
は、テキストデータ入力端子TD0,TD1と、ノード
番号入力端子ND0,ND1,ND2,ND3が備えら
れている。このノード番号入力端子ND0,ND1,N
D2,ND3から入力されるデータはノード番号設定回
路22に入力される。またこのノード番号設定回路22
には符号化回路部25からのノード番号データ出力26
も接続されており、出力切換端子SW1によってその出
力が切換えられる構造となっている。
The coincidence detection circuit section 20 of this encoding device is provided with text data input terminals TD0 and TD1 and node number input terminals ND0, ND1, ND2 and ND3. This node number input terminal ND0, ND1, N
The data input from D2 and ND3 is input to the node number setting circuit 22. Also, this node number setting circuit 22
Node number data output 26 from the encoding circuit 25
Is also connected, and its output is switched by the output switching terminal SW1.

【0027】一致検出回路部20の最左端に記入された
番号は、図1に示す木構造の各ノードのノード番号
(1),(2),(3),……,(12)を表わしてい
る。例えば、最下端行のノード番号(1)は、図1の木
構造データの上段の、テキストT0が配置されたノード
を表現している。また、この一致検出回路部20におい
ては、左右方向に一致検出回路21まで延びる、各ノー
ドに対応する線分と、縦方向に延びる、テキストデータ
入力端子TD0,TD1からのデータ線およびノード番
号設定回路22からのデータ線が交差している。この交
差点に、黒丸が表示されているものはそのデータ線のデ
ータが正転データ’1’であるとき、また黒丸がないも
のはそのデータ線が反転データ’0’である時に、一致
検出回路21の出力が’1’(アクティブ)となるよう
に構成されている。即ち、ノード番号(1)のものは、
テキストデータ入力端子TD0,TD1およびノード番
号設定回路22からの出力の全てが’0’のときノード
番号(1)に対応する一致検出回路21の出力が’1’
となる。
The numbers written at the leftmost end of the coincidence detection circuit section 20 represent the node numbers (1), (2), (3), ..., (12) of each node of the tree structure shown in FIG. ing. For example, the node number (1) in the bottom line represents the node in which the text T0 is arranged in the upper row of the tree structure data in FIG. In the match detection circuit unit 20, line segments corresponding to each node extending to the match detection circuit 21 in the left-right direction and data lines from the text data input terminals TD0 and TD1 and node numbers set in the vertical direction are set. The data lines from circuit 22 intersect. A black circle is displayed at this intersection when the data of the data line is the normal data "1", and a black circle is displayed when the data line is the inverted data "0". The output of 21 is configured to be "1" (active). That is, the node number (1) is
When all the outputs from the text data input terminals TD0 and TD1 and the node number setting circuit 22 are "0", the output of the match detection circuit 21 corresponding to the node number (1) is "1".
Becomes

【0028】ここで、ノード番号設定回路22に、図1
に示す頂点のノードのノード番号(0)(データ’00
00’)を設定し、その状態でテキストデータ入力端子
TD0,TD1からテキストT0のデータ’00’が入
力されると、ノード番号(1)に対応する一致検出回路
21の出力が’1’となる。すると、同図右部の符号化
回路部25の最下端の行がアクティブとなり、白丸27
が存在する交点をもつ出力回路28の出力が’1’とな
る。具体的には、ノード番号データ出力26から’00
01’、コードバリッドビット出力29から’1’、お
よびチェインコードデータ出力30から’000000
0001’が出力される。ここで、コードバリッドビッ
ト出力29は、チェインコード出力30から出力された
データが有効か無効を示すものであり、即ちノード番号
データ出力26から出力されたノード番号が付されたノ
ードにコード番号が付されているか否かを示すものであ
る。ここではこのコードバリッドビット出力29は’
1’であるため、チェインコードデータ出力30から出
力されたデータは有効ではあるが、ここではチェインコ
ード出力30から出力されたデータは求めるべきコード
番号としては使用しない。ノード番号データ出力26か
ら出力されたデータ’0001’はノード番号設定回路
22に入力される。
Here, in the node number setting circuit 22,
Node number (0) of the vertex node shown in (data '00
00 ') is set and the data' 00 'of the text T0 is inputted from the text data input terminals TD0 and TD1 in that state, the output of the coincidence detection circuit 21 corresponding to the node number (1) becomes'1'. Become. Then, the bottommost row of the encoding circuit section 25 on the right side of FIG.
The output of the output circuit 28 having an intersection point where there is is "1". Specifically, from the node number data output 26 to '00
01 ', code valid bit output 29 to' 1 ', and chain code data output 30 to' 000000
0001 'is output. Here, the code valid bit output 29 indicates whether the data output from the chain code output 30 is valid or invalid, that is, the node with the node number output from the node number data output 26 has a code number It indicates whether or not it is attached. Here, this code valid bit output 29 is'
Since it is 1 ', the data output from the chain code data output 30 is valid, but the data output from the chain code output 30 is not used as the code number to be obtained here. The data “0001” output from the node number data output 26 is input to the node number setting circuit 22.

【0029】次に、テキストデータ入力端子TD0,T
D1にテキストT1のデータ’01’が入力されると、
ノード番号設定回路22の出力は前回のテキストT0の
検索結果からの値’0001’となっているため、一致
検出回路部20の入力は、今度は’010001’とな
る。このパターンで一致するものはテキストT1が配置
されたノード番号(4)である(図1参照)。この結
果、ノード番号(4)に対応する一致検出回路21の出
力が’1’となり、符号化回路部25の下から4行目の
行がアクティブとなる。このため、コードバリッドビッ
ト出力が’1’、チェインコードデータ出力が’000
0000100’となり、最終的にこのチェインコード
がコード番号として得られる。尚、この時同時にノード
番号データ’0100’を得るがここではこれは用いな
い。
Next, the text data input terminals TD0, T
When the data '01' of the text T1 is input to D1,
Since the output of the node number setting circuit 22 is the value "0001" from the previous search result of the text T0, the input of the match detection circuit unit 20 is "010001" this time. The match in this pattern is the node number (4) in which the text T1 is arranged (see FIG. 1). As a result, the output of the match detection circuit 21 corresponding to the node number (4) becomes "1", and the fourth row from the bottom of the encoding circuit section 25 becomes active. Therefore, the code valid bit output is "1" and the chain code data output is "000".
0000100 ', and finally this chain code is obtained as a code number. At this time, node number data "0100" is obtained at the same time, but this is not used here.

【0030】このように、入力データとノード番号との
双方を参照することにより、各ノードから多数の枝が分
岐している場合であっても、高速に検索,一致比較が行
われ、ひいては符号化の高速化が実現される。ここで、
一致検出回路部20は、各検索データに対して必ず1つ
の行の一致検出回路21の出力のみが’1’となるよう
に構成することが望ましい。もし、これが実現されず、
複数の一致検出回路21の出力が同時に1’となる構成
とした場合は符号化回路部25のデータの決定の仕方が
複雑になってしまうこととなる。もちろん、複数の一致
検出回路21の出力が同時に’1’となることを許容
し、この同時に’1’となった複数の出力を1つづつ順
次出力するようにハードウェアを構成することも可能で
あるが、それよりも同時には1つの出力のみが’1’と
なるように木構造のデータの作り方を工夫したほうがハ
ードウェアコストを低減することができる。
As described above, by referring to both the input data and the node number, even when a large number of branches are branched from each node, high-speed search and match comparison are performed, and eventually the code is Speeding up is realized. here,
It is desirable that the match detection circuit unit 20 be configured so that only the output of the match detection circuit 21 in one row is always “1” for each search data. If this is not realized,
When the outputs of the plurality of coincidence detection circuits 21 are simultaneously set to 1 ', the method of determining the data in the encoding circuit unit 25 becomes complicated. Of course, it is also possible to allow the outputs of the plurality of coincidence detection circuits 21 to be "1" at the same time, and to configure the hardware so that the plurality of outputs that simultaneously become "1" are sequentially output one by one. However, the hardware cost can be reduced by devising the method of creating the tree-structured data so that only one output is '1' at the same time.

【0031】図3は、図2に示す符号化装置の一部を取
出して示した回路図、図4は、図3に示す回路をさらに
具体化した回路図である。この図3,図4は、’110
111’の入力データ(テキストデータ’11’および
ノード番号設定回路22からの出力が’0111’)に
対して、一致検出回路21の出力が’1’となる、図2
のノード番号(12)に相当する回路図である。
FIG. 3 is a circuit diagram showing a part of the encoding device shown in FIG. 2, and FIG. 4 is a circuit diagram further embodying the circuit shown in FIG. These FIGS. 3 and 4 show '110
For the input data of 111 '(text data' 11 'and output from the node number setting circuit 22 is'0111'), the output of the match detection circuit 21 is' 1 '.
6 is a circuit diagram corresponding to the node number (12) of FIG.

【0032】図4に示すように、一致検出回路部20
は、一致検出回路21と、互いにシリーズに接続された
7個のトランジスタTr1,Tr2,Tr3,Tr4,
Tr5,Tr6;Tr11からなる、多数の一致比較回
路201から構成されており、これら7個のトランジス
タTr1,Tr2,Tr3,Tr4,Tr5,Tr6;
Tr11のうち6個のトランジスタTr1,Tr2,T
r3,Tr4,Tr5,Tr6の各ゲートにデータ線D
L1,DL2,DL3,DL4,DL5,DL6および
データバー線DBL1,DBL2,DBL3,DBL
4,DBL5,DBL6のいずれかが接続されている。
また、プリチャージ用トランジスタTr10が設けられ
ており、このトランジスタTr10は、A点電位のプリ
チャージ用のPチャンネルトランジスタである。またト
ランジスタTr11はトランジスタTr1と接地線の間
に設けられたNチャンネルトランジスタであって、プリ
チャージ時のA点電位のディスチャージを抑制してい
る。また、一致検出回路21はインバータ20’と帰還
型PチャンネルトランジスタTr12で構成されてい
る。
As shown in FIG. 4, the match detection circuit section 20
Is a match detection circuit 21 and seven transistors Tr1, Tr2, Tr3, Tr4 connected in series with each other.
It is composed of a number of coincidence comparison circuits 201 composed of Tr5, Tr6; Tr11, and these seven transistors Tr1, Tr2, Tr3, Tr4, Tr5, Tr6;
6 transistors of Tr11, Tr1, Tr2, T
Data line D is provided to each gate of r3, Tr4, Tr5, Tr6.
L1, DL2, DL3, DL4, DL5, DL6 and data bar lines DBL1, DBL2, DBL3, DBL
Any one of 4, DBL5 and DBL6 is connected.
Further, a precharging transistor Tr10 is provided, and the transistor Tr10 is a P-channel transistor for precharging the potential at the point A. The transistor Tr11 is an N-channel transistor provided between the transistor Tr1 and the ground line, and suppresses discharge of the potential at the point A during precharge. The coincidence detection circuit 21 is composed of an inverter 20 'and a feedback P-channel transistor Tr12.

【0033】また、符号化回路部25では、インバータ
20’の出力が、メモリトランジスタMTr1,MTr
2,MTr3,MTr4の各ゲートに接続されている。
この各メモリトランジスタMTr1,MTr2,MTr
3,MTr4は一方が各々データ出力線DOL3,DO
L4,DOL5,DOL6に、他方が接地線に接続され
ている。
In the encoding circuit section 25, the output of the inverter 20 'is the memory transistors MTr1 and MTr.
2, the gates of MTr3 and MTr4 are connected.
These memory transistors MTr1, MTr2, MTr
One of the data output lines DOL3, DO
The other of L4, DOL5, and DOL6 is connected to the ground line.

【0034】さらに、この各データ出力線DOL1,…
…,DOL15の一端には、プリチャージ用チャンネル
トランジスタTr1,……,PTr15が構成されてお
り、また他端には、インバータ21’と帰還型Pチャン
ネルトランジスタTr13が各々構成されている。ここ
で、まず初期化のためのプリチャージ制御端子31に’
0’が印加されると、A点電位が’1’に設定される。
これに伴い、このA点電位のインバータ出力である一致
検出回路21の出力が’0’となる。この一致検出回路
21の出力が’0’となることにより各メモリトランジ
スタMTr1,MTr2,MTr3,MTr4がオフと
なり、また、プリチャージ制御端子31に’0’が印加
されたことによりプリチャージ用Pチャンネルトランジ
スタPTr1,……,PTr15がオンとなり、各デー
タ出力線DOL1,……,DOL15は’1’の状態を
保ち、そのインバータ出力であるインバータ21’の出
力は’0’の状態を保つ。このとき、コードバリッドビ
ット出力も’0’を出力する。この信号出力によってチ
ェインコードデータの出力が無効データであることを知
ることができる。
Further, the respective data output lines DOL1, ...
, DOL15 has precharge channel transistors Tr1, ..., PTr15 at one end, and an inverter 21 'and a feedback P-channel transistor Tr13 at the other end. First, the precharge control terminal 31 for initialization is set to '
When 0'is applied, the potential at the point A is set to '1'.
Along with this, the output of the coincidence detection circuit 21, which is the inverter output of the point A potential, becomes "0". When the output of the coincidence detection circuit 21 becomes "0", the memory transistors MTr1, MTr2, MTr3, MTr4 are turned off, and when "0" is applied to the precharge control terminal 31, the precharge P The channel transistors PTr1, ..., PTr15 are turned on, the data output lines DOL1, ..., DOL15 maintain the state of "1", and the output of the inverter 21 ', which is the inverter output thereof, maintains the state of "0". At this time, the code valid bit output also outputs "0". By this signal output, it can be known that the output of the chain code data is invalid data.

【0035】ついで、テキストデータ入力端子TD0,
TD1から所望の入力データが印加され、かつノード番
号設定回路22からの出力が決定され、その後プリチャ
ージ制御端子31に’1’が印加されると、検索状態に
入る。この初期化状態と検索状態を各入力データの印加
と同期して繰り返し行うことにより、所望のチェインコ
ードデータ、即ちコード番号を得ることができる。
Then, the text data input terminals TD0,
When desired input data is applied from TD1 and the output from the node number setting circuit 22 is determined, and then "1" is applied to the precharge control terminal 31, the search state is entered. By repeating the initialization state and the search state in synchronization with the application of each input data, a desired chain code data, that is, a code number can be obtained.

【0036】以上が本発明の一実施例であるが、この符
号化装置に格納される木構造データは必ずしも1種類で
ある必要はなく、複数の木構造データを同時に内在させ
てもよい。ただし、この場合であっても、各木構造の各
ノードに付されるノード番号は、原則的には全ての木構
造の全てのノードにわたって互いに異なる番号とするこ
とが望ましい。
Although the above is one embodiment of the present invention, the tree structure data stored in this encoding device does not necessarily have to be of one type, and a plurality of tree structure data may be included at the same time. However, even in this case, in principle, it is desirable that the node numbers given to the respective nodes of the respective tree structures are different from each other across all the nodes of all the tree structures.

【0037】図4に示す一致比較回路201は、標準的
にあらかじめ多数作り込まれており、トランジスタTr
11のゲート11はプリチャージ制御端子31に接続さ
れ、6個の各トランジスタTr1,Tr2,Tr3,T
r4,Tr5,Tr6の各ゲートは、各データ線DL
1,DL2,DL3,DL4,DL5,DL6もしくは
各データバー線DBL1,DBL2,DBL3,DBL
4,DBL5,DBL6のいずれか一方と接続されてい
る。各一致比較回路201の6個のトランジスタTr
1,Tr2,Tr3,Tr4,Tr5,Tr6をそれぞ
れデータ線DL1,DL2,DL3,DL4,DL5,
DL6と接続するかあるいはデータバー線DBL1,D
BL2,DBL3,DBL4,DBL5,DBL6と接
続するかにより、入力されるテキストデータとノード番
号設定回路22にセットされるノード番号とにより定ま
るビットパターンと、インバータ20’の入力側がディ
スチャージされることによりそのインバータ20’の出
力がアクティブ(Hレベル)となる一致比較回路201
との対応関係が定められる。
The coincidence comparison circuit 201 shown in FIG. 4 is standardly pre-fabricated in a large number, and has a transistor Tr.
The gate 11 of 11 is connected to the precharge control terminal 31, and each of the six transistors Tr1, Tr2, Tr3, T
The gates of r4, Tr5 and Tr6 are connected to the data lines DL.
1, DL2, DL3, DL4, DL5, DL6 or each data bar line DBL1, DBL2, DBL3, DBL
It is connected to any one of 4, DBL5 and DBL6. Six transistors Tr of each match comparison circuit 201
1, Tr2, Tr3, Tr4, Tr5, Tr6 are connected to the data lines DL1, DL2, DL3, DL4, DL5, respectively.
Connect to DL6 or data bar lines DBL1, D
Depending on whether it is connected to BL2, DBL3, DBL4, DBL5, DBL6, the bit pattern determined by the input text data and the node number set in the node number setting circuit 22 and the input side of the inverter 20 'are discharged. The coincidence comparison circuit 201 in which the output of the inverter 20 'becomes active (H level)
Correspondence with is defined.

【0038】ここで、上述したように、図4に示すよう
な一致比較回路201は、標準的にあらかじめ多数作り
込まれているため、そこに構成する検索システム(木構
造)の規模によっては、一部の一致比較回路201が余
る場合がある。この場合に、その余った一致比較回路2
01のトランジスタTr1,Tr2,Tr3,Tr4,
Tr5,Tr6のゲートを適当にビット線DL1,DL
2,DL3,DL4,DL5,DL6ないしビットバー
線DBL1,DBL2,DBL3,DBL4,DBL
5,DBL6に接続するとその一致比較回路201のイ
ンバータ20’から不用意にHレベルの信号が出力され
ることとなり好ましくない。一方トランジスタTr1,
Tr2,Tr3,Tr4,Tr5,Tr6のゲートをビ
ット線DL1,DL2,DL3,DL4,DL5,DL
6にもビットバー線DBL1,DBL2,DBL3,D
BL4,DBL5,DBL6にも接続せずにフローティ
ングのままにしておくと、トランジスタTr11が導通
状態となったときにインバータ20’の入力側の電位が
安定的に一義的に定まらずに動作が不安定となるおそれ
がある。
Here, as described above, since a large number of match comparison circuits 201 as shown in FIG. 4 are standardly built in advance, depending on the scale of the search system (tree structure) configured therein, In some cases, some match comparison circuits 201 may be left over. In this case, the excess match comparison circuit 2
01 transistors Tr1, Tr2, Tr3, Tr4
The gates of Tr5 and Tr6 are appropriately connected to the bit lines DL1 and DL.
2, DL3, DL4, DL5, DL6 or bit bar lines DBL1, DBL2, DBL3, DBL4, DBL
5, if it is connected to DBL6, the inverter 20 'of the coincidence comparison circuit 201 inadvertently outputs an H level signal, which is not preferable. On the other hand, the transistor Tr1,
The gates of Tr2, Tr3, Tr4, Tr5, Tr6 are connected to the bit lines DL1, DL2, DL3, DL4, DL5, DL.
6 also has bit bar lines DBL1, DBL2, DBL3, D
If it is left floating without being connected to BL4, DBL5, and DBL6, the potential on the input side of the inverter 20 ′ is not stably and uniquely determined when the transistor Tr11 becomes conductive, and the operation is unsuccessful. It may be stable.

【0039】図5は、この対策を施した一致比較回路を
示した図である。図5(A)はトランジスタTr11の
ゲートがグラウンドに接続されており、図5(B)はト
ランジスタTr6のゲートがグラウンドに接続されてい
る。このように、直列に接続された7個のトランジスタ
Tr1,Tr2,Tr3,Tr4,Tr5,Tr6,T
r11のうちの少くとも1つのトランジスタのゲートを
確実にグラウンドに接続し非導通状態に保持しておくこ
とにより、インバータ20’の入力側にプリチャージさ
れた電荷はディスチャージされず、したがってインバー
タ20’の出力は常に安定的にLレベル(非アクティ
ブ)を維持することになる。
FIG. 5 is a diagram showing a coincidence comparison circuit provided with this measure. In FIG. 5A, the gate of the transistor Tr11 is connected to the ground, and in FIG. 5B, the gate of the transistor Tr6 is connected to the ground. In this way, the seven transistors Tr1, Tr2, Tr3, Tr4, Tr5, Tr6, T connected in series are connected.
By ensuring that the gate of at least one transistor of r11 is connected to ground and held in a non-conducting state, the precharged charge on the input side of the inverter 20 'will not be discharged and thus the inverter 20'. The output of is always stably maintained at the L level (inactive).

【0040】尚、ここでは、一致比較回路の一例とし
て、比較的消費電力の少ない、トランジスタをシリーズ
に接続したNAND型ダイナミックデコーダを挙げて説
明したが、本発明の符号化装置は必ずしもこの構造に限
定されるものでなく、一般的な連想メモリタイプの回路
構成であってもよい。次に複数のノードに同一のノード
番号が付される例について説明する。
Although a NAND type dynamic decoder in which transistors are connected in series and which consumes relatively little power has been described as an example of the coincidence comparison circuit, the encoding device of the present invention does not necessarily have this structure. The circuit configuration is not limited, and may be a general associative memory type circuit configuration. Next, an example in which the same node number is assigned to a plurality of nodes will be described.

【0041】図6は、本発明の他の実施例に係るデータ
構造(木構造)を示した図である。図1に示すデータ構
造(木構造)との相違点は、テキストT0が配置された
ノード番号(6)のノードから延びる枝とテキストT2
が配置されたノード番号(7)のノードから延びる枝先
のデータが異る点のみである。ただしこのノード番号
(13)のノードには、ノード番号(11)のノードに
付されたコード番号C11と同一のコード番号C11が
付されている。
FIG. 6 is a diagram showing a data structure (tree structure) according to another embodiment of the present invention. The difference from the data structure (tree structure) shown in FIG. 1 is that the branch extending from the node of the node number (6) where the text T0 is arranged and the text T2.
The only difference is that the data of the branch point extending from the node having the node number (7) in which is allocated is different. However, the same code number C11 as the code number C11 given to the node having the node number (11) is given to the node having the node number (13).

【0042】即ち、この木構造には、テキストT1が配
置されたノード番号(2)のノードからノード番号
(6)のノードとノード番号(7)のノードに枝分かれ
したその先端に、同一のテキストT1が配置され同一の
コード番号C11が付された2つのノード(ノード番号
(11)のノードとノード番号(13)のノード)がそ
れぞれ配置されている。このような場合は、データ構造
(木構造)を以下のように変更した方が、よりコンパク
トな構成をとることが出来る。
That is, in this tree structure, the same text is provided at the tip of the node having the node number (2) in which the text T1 is arranged and branched to the node having the node number (6) and the node having the node number (7). Two nodes (a node having a node number (11) and a node having a node number (13)) to which T1 is arranged and to which the same code number C11 is attached are arranged. In such a case, a more compact structure can be achieved by changing the data structure (tree structure) as follows.

【0043】図7は変更されたデータ構造(木構造)を
示した図である。この図7に示す木構造では、図6に示
す、テキストT1が配置されコード番号C11が付され
たノード番号(13)のノードに代え、図6に示すテキ
ストT0が配置されたノード番号(6)のノードのノー
ド番号を、テキストT2が配置されたノード番号(7)
のノードと同一のノード番号(7)に変更されるととも
にこのノードと、テキストT1が配置されたノード番号
(11)のノードとが枝で結ばれている。このように、
同一のテキストT1が配置され同一のコード番号C11
が付されたノードを1つに纏めることにより、ノードの
数が削減される。
FIG. 7 is a diagram showing a changed data structure (tree structure). In the tree structure shown in FIG. 7, instead of the node of the node number (13) shown in FIG. 6 where the text T1 is arranged and the code number C11 is attached, the node number (6 ), The node number of the node of (7)
The node number is changed to the same node number (7) as that of the node No., and this node and the node of the node number (11) where the text T1 is arranged are connected by a branch. in this way,
The same text T1 is arranged and the same code number C11
The number of nodes can be reduced by combining the nodes marked with.

【0044】図8は、図7に示す木構造のデータベース
をハードウェア化した符号化装置の一例を示す図であ
る。この図8に示す回路における、図1に示す回路との
相違点は、ノード番号10およびノード番号12がない
ことと、図1に示すノード番号(6)を(7)に書き直
したこと(この点については回路構造の実体には何ら変
更はない)、及び図1に示す回路に白丸27aが追加さ
れていることのみである。
FIG. 8 is a diagram showing an example of an encoding device in which the tree structure database shown in FIG. 7 is implemented as hardware. The difference between the circuit shown in FIG. 8 and the circuit shown in FIG. 1 is that there is no node number 10 and node number 12 and that the node number (6) shown in FIG. 1 is rewritten as (7). Regarding the point, there is no change in the substance of the circuit structure), and the white circle 27a is added to the circuit shown in FIG.

【0045】このように図6に示す木構造をそのままハ
ードウェア化することに代え、同一のテキストT1が配
置され同一のコード番号C11が付されたノードを1つ
に纏めた木構造を(図7)を構成したことにより、規模
の小さい回路構成で同等の機能が実現化される。尚、こ
の実施例では、テキストデータを一例として説明した
が、これは他の任意のデータであってもよいことはいう
までもない。
As described above, instead of hardware of the tree structure shown in FIG. 6 as it is, a tree structure in which the same text T1 is arranged and the nodes having the same code number C11 are gathered into one (see FIG. By configuring 7), equivalent functions can be realized with a small-scale circuit configuration. In this embodiment, the text data has been described as an example, but it goes without saying that this may be any other data.

【0046】[0046]

【発明の効果】以上説明したように、本発明の符号化方
法及び符号化装置は、入力されたテキストとともにノー
ド番号を参照して次に進むべきノードを決定する構成と
したものであり、このため、従来のような逐次比較が不
要となり、1つのノードから多数の枝が分岐している木
構造の場合であっても一回の検索動作で次のノードに進
むことができ、したがって所望のコード番号(チェイン
コードデータ)を極めて高速に得ることができる。
As described above, the coding method and the coding apparatus of the present invention are configured to determine the node to be advanced to next by referring to the node number together with the input text. Therefore, it is not necessary to perform successive comparison as in the conventional case, and even in the case of a tree structure in which a large number of branches branch from one node, it is possible to proceed to the next node with one search operation. The code number (chain code data) can be obtained extremely quickly.

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

【図1】本発明の一実施例に係るデータ構造(木構造)
を示した図である。
FIG. 1 is a data structure (tree structure) according to an embodiment of the present invention.
It is the figure which showed.

【図2】木構造のデータベースをハードウェア化した符
号化装置の一例を示す図である。
FIG. 2 is a diagram illustrating an example of an encoding device in which a tree structure database is implemented as hardware.

【図3】図2に示す符号化装置の一部を取出して示した
回路図である。
FIG. 3 is a circuit diagram showing a part of the encoding device shown in FIG.

【図4】図3に示す回路をさらに具体化した回路図であ
る。
FIG. 4 is a circuit diagram in which the circuit shown in FIG. 3 is further embodied.

【図5】不使用の一致比較回路を示した図である。FIG. 5 is a diagram showing an unused coincidence comparison circuit.

【図6】本発明の他の実施例に係るデータ構造(木構
造)を示した図である。
FIG. 6 is a diagram showing a data structure (tree structure) according to another embodiment of the present invention.

【図7】変更されたデータ構造(木構造)を示した図で
ある。
FIG. 7 is a diagram showing a changed data structure (tree structure).

【図8】図7に示す木構造のデータベースをハードウェ
ア化した符号化装置の一例を示す図である。
8 is a diagram illustrating an example of an encoding device in which the tree-structure database illustrated in FIG. 7 is implemented as hardware.

【図9】木構造に配列されたテキストの一例を表わした
図である。
FIG. 9 is a diagram showing an example of text arranged in a tree structure.

【符号の説明】[Explanation of symbols]

20 一致検出回路部 21 一致検出回路 22 ノード番号設定回路 25 符号化回路部 26 ノード番号データ出力 29 コードバリッドビット出力 30 チェインコードデータ出力 201 一致比較回路 20 Match Detection Circuit Section 21 Match Detection Circuit 22 Node Number Setting Circuit 25 Encoding Circuit Section 26 Node Number Data Output 29 Code Valid Bit Output 30 Chain Code Data Output 201 Match Comparison Circuit

【手続補正書】[Procedure amendment]

【提出日】平成5年4月20日[Submission date] April 20, 1993

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0003[Name of item to be corrected] 0003

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0003】[0003]

【表1】 [Table 1]

【手続補正2】[Procedure Amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0004[Correction target item name] 0004

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【0004】[0004]

【表2】 表1は、各テキストT0,T1,T2,T3と、これら
の各テキストT0,T1,T2,T3と同一視される2
ビットからなるテキストコードとの対応表であり、表2
は、テキストが配列されてなるテキストチェインとその
テキストチェインに付されたコード番号との対応表であ
る。ここで10ビットからなるチェインコードは、コー
ド番号を2進符号で表わしたものである。
[Table 2] In Table 1, each text T0, T1, T2, T3 is identified with each text T0, T1, T2, T3.
Table 2 is a correspondence table with a text code consisting of bits.
Is a correspondence table of a text chain in which texts are arranged and code numbers attached to the text chain. The 10-bit chain code is a code number represented by a binary code.

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 複数のテキストが再出現を許容して木構
造の各ノードに配列され、該各ノードに必要に応じてコ
ード番号が付され、前記木構造の枝を辿り辿った先に存
在するノードに付されたコード番号を求めることによ
り、辿った道筋に沿う順序に前記テキストが配列されて
なるテキストチェインをコード番号に変換する符号化方
法において、 前記木構造の各ノードにノード番号を付しておき、 前記テキストが入力された際に、入力されたテキストと
現在位置するノードのノード番号とに基づいて次に進む
べきノードを求めることを特徴とする符号化方法。
1. A plurality of texts are arranged at each node of a tree structure allowing reappearance, a code number is given to each node as needed, and the text exists at a destination after tracing a branch of the tree structure. In the encoding method for converting the text chain in which the texts are arranged in the order along the traced path into the code number by obtaining the code number assigned to the node, the node number is assigned to each node of the tree structure. Note that, when the text is input, a node to be advanced to the next is obtained based on the input text and the node number of the node currently located.
【請求項2】 前記木構造の各ノードに互いに異なるノ
ード番号を付することを特徴とする請求項1記載の符号
化方法。
2. The encoding method according to claim 1, wherein different nodes are assigned to the respective nodes of the tree structure.
【請求項3】 先端側の同一のノードに枝が延びる複数
のノードが存在する場合に該複数のノードに同一のノー
ド番号を付することを特徴とする請求項1記載の符号化
方法。
3. The encoding method according to claim 1, wherein when there are a plurality of nodes whose branches extend to the same node on the leading end side, the same node number is assigned to the plurality of nodes.
【請求項4】 複数のテキストが再出現を許容して木構
造の各ノードに配列され、各ノードに必要に応じてコー
ド番号が付され、前記木構造の枝を辿り辿った先に存在
するノードに付されたコード番号を求めることにより、
辿った道筋に沿う順序に前記テキストが配列されてなる
テキストチェインをコード番号に変換する符号化装置に
おいて、 前記テキストを入力するテキスト入力部と、前記各ノー
ドに付されたノード番号をラッチするラッチ回路を有し
このラッチ回路にラッチされた前記ノード番号を入力す
るノード番号入力部と、入力された前記テキスト及び前
記ノード番号に基づいて、これら入力されたテキスト及
びノード番号により定められるノードと一致するノード
を検出する一致検出部とを備えた一致検出回路部、およ
び前記一致検出部で検出されたノードに付されたノード
番号を出力して前記ラッチ回路に入力するノード番号出
力部と、前記一致検出部で検出されたノードに前記コー
ド番号が付されている場合に該コード番号を出力するコ
ード番号出力部とを備えた符号化回路部を具備すること
を特徴とする符号化装置。
4. A plurality of texts are arranged at each node of a tree structure allowing re-appearance, a code number is given to each node as necessary, and the text exists at the end of the branch of the tree structure. By finding the code number attached to the node,
In a coding device for converting a text chain, in which the texts are arranged in a sequence along a traced path, into code numbers, a text input unit for inputting the texts, and a latch for latching node numbers assigned to the respective nodes A node number input section having a circuit for inputting the node number latched in the latch circuit, and based on the input text and the node number, coincides with a node defined by the input text and the node number A coincidence detection circuit section including a coincidence detection section for detecting a node, and a node number output section for outputting the node number attached to the node detected by the coincidence detection section and inputting it to the latch circuit; Code number that outputs the code number when the code number is attached to the node detected by the match detection unit An encoding device comprising an encoding circuit unit having an output unit.
【請求項5】 前記一致検出部が、 バッファもしくはインバータと、該バッファもしくはイ
ンバータの入力側とグラウンドとの間に互いに直列に接
続された複数のトランジスタとを有する多数の一致比較
回路、および該多数の一致比較回路それぞれの前記バッ
ファもしくはインバータの入力側を、次のノードの検索
に先立って充電するプリチャージ回路を有し、 互いに異なる前記テキストと互いに異なる前記ノード番
号との組合せにより定まる互いに異なるビットパターン
のうちのいずれかのビットパターンによりいずれかの前
記一致比較回路の前記バッファもしくはインバータの入
力側が放電されるように、前記多数の一致比較回路のう
ちの一部の一致比較回路を除く他の一致比較回路の前記
トランジスタのゲートが前記テキスト入力部および前記
ノード番号入力部と接続されるとともに、 前記一部の一致比較回路を構成する前記トランジスタの
うちの該一部の一致比較回路それぞれについて少くとも
各1つずつのトランジスタが遮断状態となるように、該
少くとも各1つずつのトランジスタのゲートが電源もし
くはグラウンドに接続されてなることを特徴とする請求
項4記載の符号化装置。
5. A large number of coincidence comparison circuits, wherein the coincidence detection unit has a buffer or an inverter and a plurality of transistors connected in series with each other between an input side of the buffer or the inverter and a ground, and the large number of coincidence comparison circuits. Match comparator circuit has a precharge circuit that charges the input side of each buffer or inverter prior to the search of the next node, and different bits determined by the combination of the different text and the different node number In order to discharge the input side of the buffer or the inverter of any one of the match comparison circuits by any one of the bit patterns of the patterns, other than some match comparison circuits of the plurality of match comparison circuits, The gate of the transistor of the match comparison circuit is connected to the text input section. And the node number input section, and at least one transistor of each of the transistors forming the part of the match comparison circuit is turned off. 5. The encoding device according to claim 4, wherein the at least one transistor gate is connected to a power supply or a ground.
JP28626192A 1992-04-08 1992-10-23 Coding method and coder Withdrawn JPH0677835A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP28626192A JPH0677835A (en) 1992-04-08 1992-10-23 Coding method and coder
US08/044,195 US5675668A (en) 1992-04-08 1993-04-08 Coding method, semiconductor memory for implementing coding method, decoder for semiconductor memory and method for identification of hand-written characters
US08/927,461 US5946418A (en) 1992-04-08 1997-09-11 Coding method, semiconductor memory for implementing coding method, decoder for semiconductor memory and method for identification of hand-written characters

Applications Claiming Priority (5)

Application Number Priority Date Filing Date Title
JP4-87219 1992-04-08
JP8721992 1992-04-08
JP18391792 1992-07-10
JP4-183917 1992-07-10
JP28626192A JPH0677835A (en) 1992-04-08 1992-10-23 Coding method and coder

Publications (1)

Publication Number Publication Date
JPH0677835A true JPH0677835A (en) 1994-03-18

Family

ID=27305448

Family Applications (1)

Application Number Title Priority Date Filing Date
JP28626192A Withdrawn JPH0677835A (en) 1992-04-08 1992-10-23 Coding method and coder

Country Status (1)

Country Link
JP (1) JPH0677835A (en)

Similar Documents

Publication Publication Date Title
US7042748B2 (en) Content addressable memory with cascaded array
US6295576B1 (en) Associative memory having a mask function for use in a network router
US7502245B2 (en) Content addressable memory architecture
US4943801A (en) Graphics display controller equipped with boundary searching circuit
US5905668A (en) Content addressable memory device
US6751701B1 (en) Method and apparatus for detecting a multiple match in an intra-row configurable CAM system
US6718433B1 (en) Match and priority encoding logic circuit
US5745401A (en) High-speed programmable read only memory
US6799243B1 (en) Method and apparatus for detecting a match in an intra-row configurable cam system
JPH0677835A (en) Coding method and coder
WO2014038306A1 (en) Full-text search system using non-volatile content addressable memory, and text string comparison method employing same
JP2875126B2 (en) Encoding device
JP3110585B2 (en) Semiconductor memory
JPH0668307A (en) Handwritten character recognizing method
JPH06139781A (en) Semiconductor memory
JPH06139782A (en) Decoding circuit of semiconductor memory
US5946418A (en) Coding method, semiconductor memory for implementing coding method, decoder for semiconductor memory and method for identification of hand-written characters
JPH06243694A (en) Semiconductor memory
US7257671B2 (en) Content addressable memory capable of changing priority in priority encoder
JP2838033B2 (en) Content addressable memory
JP3605168B2 (en) Associative memory
JP3187203B2 (en) Associative memory circuit
JPH07226089A (en) Using method for associative memory and associative memory
JPH1063675A (en) Data retrieving method and data retrieving device applying the method
JPH0969111A (en) Associative memory

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20000104