KR930011444B1 - Transforming method for korean alphabet code - Google Patents
Transforming method for korean alphabet code Download PDFInfo
- Publication number
- KR930011444B1 KR930011444B1 KR1019880005084A KR880005084A KR930011444B1 KR 930011444 B1 KR930011444 B1 KR 930011444B1 KR 1019880005084 A KR1019880005084 A KR 1019880005084A KR 880005084 A KR880005084 A KR 880005084A KR 930011444 B1 KR930011444 B1 KR 930011444B1
- Authority
- KR
- South Korea
- Prior art keywords
- code
- value
- byte
- bitmap
- combined
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Document Processing Apparatus (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
제1도는 종래의 한글조합형 코드의 변환방법에 사용되는 인덱스 테이블 및 코드테이블 구성예시도.1 is an example of an index table and a code table structure used in a conventional Hangul combination code conversion method.
제2도는 본 발명의 한글조합형 코드의 변환방법에 사용되는 인덱스 테이블, 비트수 테이블 및 비트맵 테이블 구성예시도.2 is an exemplary configuration diagram of an index table, a bit number table, and a bitmap table used in the method for converting a Hangul combination code according to the present invention.
제3도는 제2도에 따른 본 발명의 한글조합형 코드변환 흐름도.3 is a Hangul combination code conversion flow chart of the present invention according to FIG.
제4도는 본 발명의 한글조합형 코드변환 방법에 사용되는 인덱스 테이블 및 코드테이블의 다른 구성예시도.4 is another configuration example of an index table and a code table used in the Hangul combinational code conversion method of the present invention.
제5도는 제4도에 따른 본 발명의 한글조합형 코드변환 흐름도.5 is a Hangul combination code conversion flow chart of the present invention according to FIG.
본 발명은 불연속적인 한국표준 2바이트 한글 조합형 코드를 연속적인 한국표준 2바이트 한글완성형 코드로 변환하는 한글조합형 코드의 변환방법에 관한것으로, 특히 불연속적인 한글조합형 코드의 존재 여부를 표시하는 비트맵과 누적값 테이블을 이용하여 테이블이 차지하는 메모리 공간을 축소시키고, 코드변환을 보다 빠르게 수행할 수 있게한 한글조합형 코드의 변환방법에 관한 것이다.The present invention relates to a method for converting a Hangul combined code for converting a discontinuous Korean standard 2-byte Hangul combined code into a continuous Korean standard 2-byte Hangul complete code. The present invention relates to a method of converting a Hangul combination code that reduces a memory space occupied by a table using a cumulative value table and performs code conversion faster.
종래의 한글조합형 코드를 한글완성형 코드로 변화함에 있어서는 제1a도에 도시한 바와같은 인덱스 테이블 및 제1b도에 도시된 바와같은 코드테이블을 이용하여 조합형 코드열(a)에서 변환하고자 하는 조합형 코드를 검색하고, 그 검색한 조합형 코드위치로 부터 완성형 코드값을 계산하였다.In converting a conventional Hangul combined code into a Hangul complete code, the combined code to be converted in the combined code string (a) using an index table as shown in FIG. 1a and a code table as shown in FIG. The completed code value was calculated from the retrieved combined code position.
일예로, 한글 "웹"의 조합형 코드 "8953"를 완성형 코드로 변환하기 위해서는 조합형코드열(a)을 검색하여 "8953"을 찾고, 그 "8953" 코드위치로부터 연속코드값(b)에 "55"로부터 완성형코드를 계산해 내었다.For example, in order to convert the combined code "8953" of Hangul "Web 로 into a complete code, the combination code string (a) is searched for" 8953 ", and the 코드 8953" code position is converted into a continuous code value (b). Completion code was calculated from 55 ".
한편, 상기에서 조합형코드열(a)을 검색할때 그 연속코드값(b)이 존재하지 않는다면 완성형코드에서는 그 조합형코드가 존재하지 않는 것이다.On the other hand, if the continuous code value (b) does not exist when searching for the combined code string (a) above, the combined code does not exist in the completed code.
그런데, 조합형코드의 갯수는 총 2350(94×25)개 이므로 2350번의 검색을 수행하여야만 연속코드값(b)을 얻을 수 있게 된다.However, since the total number of combined codes is 2350 (94 × 25), the continuous code value (b) can be obtained only after 2350 searches.
따라서 제1a도에 도시된 바와 같은 인덱스 테이블을 두어 검색의 범위를 좁혀서 사용하고 있는 실정이다. 여기서, C는 조합형코드값을 나타내고, d는 테이블 포인터를 나타낸다.Therefore, an index table as shown in FIG. 1A is used to narrow down the search. Where C represents a combined type code value and d represents a table pointer.
따라서, 이러한 종래의 방식에 있어서는 코드변환을 하기 위해 여러번 검색을 하여야 하므로 코드변환에 많은 시간이 소요되어 시스템의 수행능력을 저하시키고, 실제로 인덱스 테이블을 사용하더라도 20-65번의 검색을 수행해야 하며, 또 검색범위를 좁히기 위해 인덱스 테이블을 크게하는 경우에는 전체적으로 메모리 공간을 많이 소요하기 때문에 퍼스널컴퓨터의 한글처리 시스템 소프트웨어로서 부적합하게 되는 결점이 있었다.Therefore, in this conventional method, since a number of searches have to be performed for transcoding, it takes a lot of time for transcoding and degrades the performance of the system, and even 20-65 retrieval should be performed even if the index table is actually used. In addition, when the index table is enlarged to narrow the search range, a large amount of memory space is required, which makes it unsuitable as a Hangul processing system software for a personal computer.
본 발명은 이러한 종래의 결점을 해결하기 위하여, 한글조합형 코드의 존재여부를 나타내는 비트맵과 누적값 테이블등을 이용하여 코드변환을 보다 빠르게 수행할 수 있고, 테이블이 차지하는 메모리 공간을 축소 시킬 수 있게 창안한 것으로, 이를 첨부된 도면을 참조하여 상세히 설명하면 다음과 같다.In order to solve the above-mentioned drawbacks, the present invention can perform code conversion more quickly by using a bitmap and a cumulative value table indicating whether a Hangul combinational code exists and reduce the memory space occupied by the table. The invention is described in detail with reference to the accompanying drawings as follows.
제2a, b, c도는 본 발명의 인덱스 테이블 , 비트수 테이블, 비트맵 테이블을 각각 나타낸다.2a, b, and c show an index table, a bit number table, and a bitmap table, respectively, of the present invention.
즉, 제2a도는 조합형 코드값(a)으로 비트맵의 시작번지를 빠르게 찾기 위한 인덱스 테이블로, 조합형코드값(a)의 하이 바이트값(일예로, 88,89, ...)으로 해당 내용을 찾고, 그 내용은 비트맵 테이블의 시작점에 대한 비트맵 포인터(f)와 연속코드 시작값(b)를 표시한다.That is, FIG. 2A is an index table for quickly finding the start address of a bitmap using a combination code value (a). Finds the bitmap pointer (f) and the continuation code start value (b) for the beginning of the bitmap table.
제2b도는 한 바이트내에 비트 "1"의 갯수를 표시하는 비트수 테이블로서 각 바이트값(g)에 대하여 비트수(n)를 표시한다.FIG. 2B is a bit number table that shows the number of
제2c도는 비트맵 테이블로서 이에 도시한 바와 같이 비트맵열 및 누적값열로 구성되는데, 비트맵열에는 조합형코드의 둘째 바이트당 한 비트를 할당하여 존재하면 "1"을, 존재하지 않으면 "0"을 기록하고,누적값열에는 비트맵열의 비트 "1"의 갯수에 대한 누적값을 바이트 단위로 기록한다.FIG. 2C is a bitmap table, which is composed of a bitmap string and a cumulative value string as shown therein. In the bitmap string, one bit is allocated to the second byte of the combined code, where '1' is present, and '0' is not present. In the cumulative value column, the accumulated value for the number of
이와같이 구성된 발명을 제3도의 흐름도를 참조하여 상세히 설명한다.The invention thus constructed will be described in detail with reference to the flowchart of FIG.
먼저, 조합형 코드값(a)의 하이바이트로 제2a도에 도시한 인덱스 테이블을 참조하여 연속코드 시작값(e)과 비트맵 포인터(f)를 구하고, 그 연속코드시작값(e)을 저장하여 둔다.First, the continuous code start value (e) and the bitmap pointer (f) are obtained by referring to the index table shown in FIG. Leave it.
여기서는 "웹"의 조합형코드 "8953H"를 완성형코드로 변환하는 경우를 예로들어 설명한다.Here, an example will be described in which the combination code "8953H" of the "web" is converted into a complete code.
따라서, 그 "웹"의 조합형코드값(a) "8953H"의 하이바이트 "89"로 인덱스 테이블을 참조하여 연속코드 시작값(e)"5"을 얻어 저장함과 아울러 비트맵 포인터(f)를 얻는다.Therefore, by referring to the index table with the
이후, 그 조합형코드값 "8953H"의 로우바이트 "53H" 값으로부터 조합형코드 로우바이트 시작값인 고정값 "41H"를 감하여 "12H"를 얻고, 그 값 "12H"를 "8"로 나누어 몫(Q)"1"과 나머지(R) "2"를 얻는다.Subsequently, the
이후, 상기 몫(Q)"1"에 의해 제2b도의 비트맵 테이블에서 2번째 누적값열의 2째바이트를 참조하여 연속코드 누적값 3을 구하여 저장한다.Subsequently, the cumulative
이후 모든 조합형 코드의 고정값 "10000000"(80H)를 상기 나머지(R)"2"번 만큼 오른족으로 시프트시켜 값(C)"00100000"을 비트맵 테이블의 비트맵 바이트값 "10101000"과 앤드화시켜 "00100000"을 얻는다. 이 값"00100000"은 "0"이 아니므로 완성형 코드가 존재하는 것으로 판별한다.After that, the fixed value? 10000000 "(80H) of all the combined codes is shifted to the right by the remainder (R)" 2 "times, and the value (C)" 00100000 "is replaced with the bitmap byte value # 10101000" of the bitmap table. To obtain "00100000". Since this value # 00100000 is not "0", it is determined that a completion code exists.
이와같이 완성형 코드가 존재하면, 상기 모든 조합형 코드의 고정값 "10000000"을 나머지 2-1, 즉 1번만큼 비트복사(Arithmetic Shift)하여 값(D)"11000000"을 얻고, 이 값(D)"11000000"을 비트맵 바이트값"10101000"과 앤드시켜 값(E)"10000000"을 얻는다. 이 값(E)"10000000" 즉, "80H"으로 제2b도에 도시한 비트수 테이블을 참조하여 비트수 값(E)"1"을 얻고, 이후 그 비트수 값(E)"1"을 상기 저장시켜 두었던 연속코드 시작값(e)"51" 및 연속코드 누적값 "3"에 더하여 연속코드값 "55"를 얻는다.If there is a complete code like this, the fixed value "10000000 의 of all the combined codes is bit-copied by the remaining 2-1, i.e., one time to obtain the value (D)" 11000000 ,, and this value (D) " 11000000 ms is drawn with the bitmap byte value # 10101000 ms to obtain the value E10000000 ms. With this value (E) # 10000000 \, i.e., # 80H \, the bit number value (E) # 1 \ is obtained by referring to the bit number table shown in FIG. 2B. In addition to the stored continuous code start value (e) # 51 s and the continuous code accumulated value # 3 s, the continuous code value # 55 s is obtained.
따라서, 이 연속코드값 "55"로부터 "웹"에 대한 완성형 코드값 "B0D8H"을 계산해 낼수 있게된다.Therefore, it is possible to calculate the completed code value "B0D8H" for "web" from this continuous code value "55".
제4a, b도는 본 발명의 다른 인덱스 테이블 및 코드테이블을 각각 나타낸다. 즉, 제4a도는 조합형 코드의 하이바이트로로 그 조합형 코드의 범위를 찾을 수 있게한 테이블로 조합형 코드와 완성형 코드의 상호관계로부터 만들어지고, 그 번호(NO)란에는 조합형 코드의 하이바이트를 "0"으로 마스킹 값을 나타낸다.4A and 4B show another index table and code table of the present invention, respectively. That is, Figure 4a is a high byte of the combined code, a table that allows the range of the combined code to be found. It is created from the interrelationship between the combined code and the completed code, and the number (NO) indicates the high byte of the combined code. The masking value is represented by 0 ms.
제4b도는 조합형 코드의 로우바이트 값만을 비교하여 빠른속도로 바이너리 검색할 수 있도록 한 코드테이블로 완성형 코드의 순서대로 테이블을 잡고, 각 위치에는 그 글자가 조합형으로 나타나질때 갖는 로우바이트 값을 기억시켜 둔다.Figure 4b is a code table that compares only the low byte values of the combined code and searches the table in the order of the complete code in order to make binary search faster, and stores the low byte values when the letters appear in the combined type at each position. Put it.
이와 같이 구성된 본 발명의 코드변환 방식을 제5도의 흐름도를 참조하여 상세히 설명하면 다음과 같다.The code conversion method of the present invention configured as described above will be described in detail with reference to the flowchart of FIG. 5.
여기서는 "격"자의 조합형 코드 "8541H"인 경우를 예로들어 설명한다.Here, a case where the combination code of the supervisor "8541H" is taken as an example will be described.
먼저, "격"자의 조합형코드 "8541H"의 하이바이트 "85H"를 읽어 그 하이바이트 "85H"의 MSB를 마스킹시켜 "05H"를 얻고, 이 "05H" 값으로 제4a도에 도시한 인덱스 테이블로부터 범위내용값 59-111을 읽고, 이후 상기 "격"자의 조합형코드 "8541H"의 로우바이트 "41H"를 읽어 그 "41H" 값이 제4b도에 도시된 코드테이블 범위 위치 59-111 사이에 있는지 바이너리 검색하고 이때 그 코드테이블 범위 60번째에 "41H"가 있으므로, 코드테이블 범위값 60을 94로 나누어 몫(Q)"0"과 나머지 (R)"60"을 구한다.First, by reading the high byte "85H" of the combination code "8541H" of the subtractor and masking the MSB of the high byte "85H" to obtain "05H", the index table shown in FIG. Read the range content value 59-111 from the code, and then read the low byte "41H" of the combination code "8541H" of the code ", and the value of" 41H "between the code table range positions 59-111 shown in Fig. 4B. If the code table range 60th is "41H" at this time, divide the
이후 그 몫(Q)"0" 및 나머지(R)"60"을 하기식에 의해 "격"자에 대한 완성형 코드로 변환한다.Thereafter, the quotient (Q) '0' and the rest (R) '60 'are converted into the complete code for the case by the following equation.
하이바이트 값=B0H+QHigh Byte Value = B0H + Q
로우바이트 값=A1H+RLow Byte Value = A1H + R
여기서, B0H는 완성형 코드의 최초 하이바이트값이고, A1는 완성형 코드의 최초 로우바이트값이다.Here, B0H is the first high byte value of the complete code, and A1 is the first low byte value of the complete code.
즉, 상기 몫(Q)"0"을 "B0H"에 더하여 완성형 코드의 하이바이트값 "B0H"를 얻고, 상기 나머지(R)"60H"를 "A1H"에 더하여 "DDH"를 얻어 코드값 "B0DDH"로 변환하고, 이 코드값"B0DDH"은 "격"자에 대한 완성형 코드값이다.That is, the quotient (Q) '0' is added to 'B0H' to obtain the high byte value 'B0H' of the completed code, and the remainder (R) '60H' is added to 'A1H' to obtain 'DDH' to obtain the code value ' Converted to B0DDH ', this code value "B0DDH" is a complete code value for the test character.
이상에서 상세히 설명한 바와같이 본 발명의 전자방식에 있어서는 테이블을 검색하지 않고 비트맵 정보에 의해 연속코드값을 계산해 내므로 코드변환속도가 빠르게 되고, 테이블 및 프로그램에 소요되는 메모리 공간이 작게되며, 또한 본 발명의 후자방식도 코드테이블에 로우바이트만을 저장하고 있으므로 테이블이 차지하는 메모리 공간이 작게되고, 바이너리 탐색할때 로우바이트만 비교하면 되므로 코드변환속도가 빠르게 되는 효과가 있다.As described in detail above, in the electronic method of the present invention, since a continuous code value is calculated by bitmap information without searching a table, a code conversion speed is increased, and a memory space required for a table and a program is reduced. Since the latter method stores only the low bytes in the code table, the memory space occupied by the table is small, and only the low bytes are compared in the binary search, thereby increasing the code conversion speed.
또, 본 발명은 불연속, 불규칙적인 코드를 규칙적이며 연속적인 모든 코드변환에 적용이 가능하고, 일예로 한자코드변환시 한자를 갖는 한글의 코드로부터 해당한자 코드를 얻는데 적용이 가능하게되게 되는 효과가 있다.In addition, the present invention can be applied to all the regular and continuous code conversion of the discontinuous, irregular code, for example, there is an effect that can be applied to obtain the corresponding Hanja code from the Hangul code having the Hanja in Hanja code conversion .
Claims (2)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019880005084A KR930011444B1 (en) | 1988-04-30 | 1988-04-30 | Transforming method for korean alphabet code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1019880005084A KR930011444B1 (en) | 1988-04-30 | 1988-04-30 | Transforming method for korean alphabet code |
Publications (2)
Publication Number | Publication Date |
---|---|
KR890016449A KR890016449A (en) | 1989-11-29 |
KR930011444B1 true KR930011444B1 (en) | 1993-12-08 |
Family
ID=19274091
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1019880005084A KR930011444B1 (en) | 1988-04-30 | 1988-04-30 | Transforming method for korean alphabet code |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR930011444B1 (en) |
-
1988
- 1988-04-30 KR KR1019880005084A patent/KR930011444B1/en not_active IP Right Cessation
Also Published As
Publication number | Publication date |
---|---|
KR890016449A (en) | 1989-11-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5153591A (en) | Method and apparatus for encoding, decoding and transmitting data in compressed form | |
US5357431A (en) | Character string retrieval system using index and unit for making the index | |
US5546578A (en) | Data base retrieval system utilizing stored vicinity feature values | |
EP0293161B1 (en) | Character processing system with spelling check function | |
US6212525B1 (en) | Hash-based system and method with primary and secondary hash functions for rapidly identifying the existence and location of an item in a file | |
JP2000517086A (en) | Generate full hash using offset table | |
US20140082021A1 (en) | Hierarchical ordering of strings | |
JP2769065B2 (en) | Method and apparatus for use in a digital data processing system | |
JPH05225238A (en) | Data base retrieval system | |
KR930011444B1 (en) | Transforming method for korean alphabet code | |
JP2010198425A (en) | Document management method and device | |
US6886161B1 (en) | Method and data structure for compressing file-reference information | |
WO2009001174A1 (en) | System and method for data compression and storage allowing fast retrieval | |
KR920702514A (en) | Processor equipped system and address translation method in system | |
JP3288063B2 (en) | Variable length data storage and reference system | |
JP2993540B2 (en) | Ascending integer sequence data compression and decoding system | |
JP2785168B2 (en) | Electronic dictionary compression method and apparatus for word search | |
JPWO2002101935A1 (en) | Decoding device, decoding method, lookup table, and decoding program | |
JP3344755B2 (en) | Ascending integer sequence data compression and decoding system | |
JP3115459B2 (en) | Method of constructing and retrieving character recognition dictionary | |
JP2874810B2 (en) | Key memory allocation method | |
JP2993539B2 (en) | Database search system and method | |
JPH0471228B2 (en) | ||
JPH0822475A (en) | Character string information retrieval device | |
JP3018579B2 (en) | Name search processor |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
G160 | Decision to publish patent application | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
LAPS | Lapse due to unpaid annual fee |