KR20230044914A - Korean relation extraciton model and method with entity positon information - Google Patents

Korean relation extraciton model and method with entity positon information Download PDF

Info

Publication number
KR20230044914A
KR20230044914A KR1020220019416A KR20220019416A KR20230044914A KR 20230044914 A KR20230044914 A KR 20230044914A KR 1020220019416 A KR1020220019416 A KR 1020220019416A KR 20220019416 A KR20220019416 A KR 20220019416A KR 20230044914 A KR20230044914 A KR 20230044914A
Authority
KR
South Korea
Prior art keywords
korean
entity
special
token
relationship
Prior art date
Application number
KR1020220019416A
Other languages
Korean (ko)
Inventor
임희석
허윤아
Original Assignee
고려대학교 산학협력단
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 고려대학교 산학협력단 filed Critical 고려대학교 산학협력단
Publication of KR20230044914A publication Critical patent/KR20230044914A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)

Abstract

The present invention relates to a technology for predicting relationships between entities which are related to each other among entities existing in Korean sentences or documents. A Korean relationship extraction model according to the embodiment of the present application includes: a preprocessing unit which adds a special token to at least one location before or after the entity included in the Korean input sentence; and a Korean relationship extraction unit which predicts relationships between entities included in the Korean input sentence through the special token. The Korean relationship extraction model according to the present invention can accurately predict relationships between entities.

Description

엔터티의 위치 정보를 활용한 한국어 관계 추출 모델 및 방법{KOREAN RELATION EXTRACITON MODEL AND METHOD WITH ENTITY POSITON INFORMATION}Korean relationship extraction model and method using entity location information {KOREAN RELATION EXTRACITON MODEL AND METHOD WITH ENTITY POSITON INFORMATION}

본 발명은 한국어 문장이나 문서에 존재하는 엔터티들 중 서로 연관성을 갖는 엔터티의 관계를 예측하는 기술에 대한 것이다. The present invention relates to a technique for predicting a relationship between entities that are related to each other among entities existing in Korean sentences or documents.

비정형 문서들이 방대해짐에 따라, 중요한 정보를 정형화된 정보로 자동으로 추출하는 정보 추출(information extraction)에 대한 관심이 증가하고 있다. 정보 추출 기술은 구조화된 정보를 추출할 수 있기 때문에 지식 기반(knowledge base)을 확장하는데 중요한 기술이다. As unstructured documents become massive, interest in information extraction, which automatically extracts important information as structured information, is increasing. Information extraction technology is an important technology for expanding the knowledge base because it can extract structured information.

정보 추출 기술의 하위 분야인 관계 추출(relation extraction)은 주어진 문장이나 문서에 존재하는 엔터티(entity)들 중에서 서로 연관성을 갖는 엔터티를 찾아내고 그 관계(relation)를 예측하는 것을 목표로 한다. 관계 추출에 대한 연구는 주로 영어를 기반으로 하여 진행되고 있으며, 한국어를 대상으로 하는 관계 추출에 대한 연구는 거의 전무한 실정이다. Relation extraction, a sub-field of information extraction technology, aims to find entities that are related to each other among entities existing in a given sentence or document and predict the relationship. Research on relationship extraction is mainly conducted based on English, and there is almost no research on relationship extraction targeting Korean.

더욱이, 한국어는 영어와 달리 크게 2가지 다른 특성이 있다, 첫 번째로, 한국어는 어근과 접사로 이루어졌을 때에 실질적인 의미를 갖는 단어가 된다. 두 번째로 한국어는 후핵 언어로 서술어가 대부분 문장의 끝에서 표현되며, 이에 따라 문장이 평서문인지 의문문인지를 알기 위해서는 문장을 끝까지 확인해야 한다. 이러한 한국어 고유의 특성으로 인하여, 영어 기반의 관계 추출에 대한 연구를 한국어에 적용하였을 때에 그 예측이 정확하지 않은 문제가 있다. Moreover, unlike English, Korean has two different characteristics. First, Korean becomes a word with a substantial meaning when it consists of a root and an affix. Second, Korean is a postnuclear language, and predicates are mostly expressed at the end of sentences. Accordingly, in order to know whether a sentence is a declarative sentence or an interrogative sentence, you must check the sentence to the end. Due to these unique characteristics of Korean, there is a problem that the prediction is not accurate when the study on English-based relationship extraction is applied to Korean.

본 발명의 목적은 한국어 문장에 존재하는 엔터티들의 관계를 정확하게 예측할 수 있는 한국어 관계 추출 모델 및 한국어 관계 추출 방법을 제공하는데 있다.An object of the present invention is to provide a Korean relationship extraction model and a Korean relationship extraction method capable of accurately predicting relationships between entities existing in Korean sentences.

본 출원의 실시 예에 따른 한국어 관계 추출 모델은, 한국어 입력 문장에 포함된 엔터티의 앞 또는 뒤 중 적어도 하나의 위치에 특수 토큰을 추가하는 전처리부; 및 상기 특수 토큰을 통하여, 상기 한국어 입력 문장에 포함된 엔터티 사이의 관계를 예측하는 한국어 관계 추출부를 포함한다.A Korean relationship extraction model according to an embodiment of the present application includes a pre-processor that adds a special token to at least one position before or after an entity included in a Korean input sentence; and a Korean relationship extraction unit that predicts a relationship between entities included in the Korean input sentence through the special token.

실시 예에 있어서, 상기 한국어 입력 문장은 제1 엔터티 및 제2 엔터티를 포함하며, 상기 전처리부는 상기 제1 엔터티의 앞과 뒤에 각각 제1 및 제2 특수 토큰을 추가하고, 상기 제2 엔터티의 앞과 뒤에 각각 제1 및 제2 특수 토큰을 추가한다.In an embodiment, the Korean input sentence includes a first entity and a second entity, and the preprocessor adds first and second special tokens before and after the first entity, respectively, and before the second entity. First and second special tokens are added after and respectively.

실시 예에 있어서, 상기 전처리부는 상기 한국어 입력 문장 앞에 [CLS] 토큰을 추가하고, 상기 한국어 입력 문장 뒤에 [SEP] 토큰을 추가한다.In an embodiment, the pre-processor adds a [CLS] token before the Korean input sentence and adds a [SEP] token after the Korean input sentence.

실시 예에 있어서, 상기 한국어 관계 추출부는 상기 전처리부로부터 특수 토큰이 추가된 입력 문장을 수신하는 한국어 언어모델; 상기 한국어 언어모델과 연동하여 동작하며, 상기 특수 토큰에 기초하여 히든 스테이트를 출력하는 엔터티 인식부; 및 상기 히든 스테이트에 기초하여, 엔터티 사이의 관계를 분류하는 관계 분류부를 포함한다.In an embodiment, the Korean language relation extracting unit may include a Korean language model for receiving an input sentence to which a special token is added from the pre-processing unit; an entity recognizer that operates in conjunction with the Korean language model and outputs a hidden state based on the special token; and a relationship classification unit that classifies relationships between entities based on the hidden state.

실시 예에 있어서, 상기 한국어 언어 모델은 KoBERT, HanBERT, KorBERT, KoELECTRA, KcELECTRA 중 어느 하나이다.In an embodiment, the Korean language model is any one of KoBERT, HanBERT, KorBERT, KoELECTRA, and KcELECTRA.

실시 예에 있어서, 상기 엔터티 인식부는 특수 토큰 중 엔터티 앞에 추가된 특수 토큰에 기초하여 히든 스테이를 출력하는 K-EPICs를 포함한다.In an embodiment, the entity recognizing unit includes K-EPICs that output hidden stays based on a special token added before an entity among special tokens.

실시 예에 있어서, 상기 엔터티 인식부는 특수 토큰 중 엔터티 뒤에 추가된 특수 토큰에 기초하여 히든 스테이를 출력하는 K-EPICe를 더 포함한다.In an embodiment, the entity recognizing unit further includes a K-EPICe that outputs a hidden stay based on a special token added after an entity among special tokens.

실시 예에 있어서, 상기 엔터티 인식부는 특수 토큰 중 엔터티 앞과 뒤 양쪽에 추가된 특수 토큰에 기초하여 히든 스테이를 출력하는 K-EPICse를 더 포함한다.In an embodiment, the entity recognizing unit further includes a K-EPICse that outputs a hidden stay based on a special token added to both the front and back of the entity among the special tokens.

실시 예에 있어서, 상기 엔터티 인식부는 상기 한국어 입력 문장의 제일 앞에 추가된 [CLS] 토큰에 기초하여 히든 스테이를 출력하는 K-EPICv를 더 포함한다.In an embodiment, the entity recognition unit further includes a K-EPICv outputting a hidden stay based on the [CLS] token added to the front of the Korean input sentence.

실시 예에 있어서, 상기 관계 분류부는 상기 히든 스테이트에 소프트맥스를 적용하여 엔터티 사이의 관계를 예측한다.In an embodiment, the relationship classification unit predicts a relationship between entities by applying a softmax to the hidden state.

본 출원의 실시 예에 따른 한국어 관계 추출 방법은 한국어 입력 문장에 엔터티의 위치 정보를 포함하는 특수 토큰을 추가하는 단계; 상기 특수 토큰에 기초하여, 엔터티 정보가 반영된 히든 스테이트를 출력하는 단계; 및 상기 히든 스테이트에 소프트맥스를 적용하여, 엔터티 사이의 관계를 추출하는 단계를 포함한다.A Korean relationship extraction method according to an embodiment of the present application includes adding a special token including location information of an entity to a Korean input sentence; outputting a hidden state reflecting entity information based on the special token; and extracting relationships between entities by applying softmax to the hidden state.

실시 예에 있어서, 상기 특수 토큰을 추가하는 단계는 상기 엔터티의 앞과 뒤 중 적어도 하나의 위치에 특수 토큰을 추가하는 단계; 및 상기 한국어 입력 문장의 앞과 뒤에 토큰을 추가하는 단계를 포함한다.In an embodiment, the adding of the special token may include adding the special token to at least one position of the front and back of the entity; and adding tokens before and after the Korean input sentence.

실시 예에 있어서, 상기 히든 스테이트를 출력하는 단계는 상기 특수 토큰 중 상기 엔터티의 앞에 추가된 특수 토큰을 활용하는 K-EPICs를 적용하여 히든 스테이트를 출력한다.In an embodiment, the outputting of the hidden state outputs the hidden state by applying K-EPICs utilizing a special token added in front of the entity among the special tokens.

실시 예에 있어서, 상기 히든 스테이트를 출력하는 단계는 상기 특수 토큰 중 상기 엔터티의 뒤에 추가된 특수 토큰을 활용하는 K-EPICe를 적용하여 히든 스테이트를 출력한다.In an embodiment, the outputting of the hidden state outputs the hidden state by applying K-EPICe utilizing a special token added to the end of the entity among the special tokens.

실시 예에 있어서, 상기 히든 스테이트를 출력하는 단계는 상기 특수 토큰 중 상기 엔터티의 앞과 뒤 양쪽에 추가된 특수 토큰을 활용하는 K-EPICse를 적용하여 히든 스테이트를 출력한다.In an embodiment, the outputting of the hidden state outputs the hidden state by applying K-EPICse utilizing special tokens added to both the front and back of the entity among the special tokens.

본 발명에 따른 한국어 관계 추출 모델 및 한국어 관계 추출 방법은 엔터티에 대한 정보를 잘 반영한 출력을 갖도록 특수 토큰(special token)을 한국어 문장에 추가하고, 특수 토큰을 활용하여 엔터티들 사이의 관계를 예측한다. 이를 통하여, 본 발명에 따른 한국어 관계 추출 모델 및 한국어 관계 추출 방법은 정확하게 엔터티들 사이의 관계를 예측할 수 있다.The Korean relationship extraction model and the Korean relationship extraction method according to the present invention add special tokens to Korean sentences to have an output that reflects information about entities well, and predict relationships between entities by using the special tokens. . Through this, the Korean relationship extraction model and the Korean relationship extraction method according to the present invention can accurately predict relationships between entities.

도 1은 본 출원의 실시 예에 따른 한국어 관계 추출 모델(10)을 보여주는 블록도이다.
도 2는 도 1의 한국어 관계 추출부(200)를 좀 더 자세히 보여주는 블록도이다.
도 3은 도 1의 전처리부(100)의 동작의 일 예를 보여주는 도면이다.
도 4는 엔터티 인식부(220) 중 K-EPCIv(221)과 관련된 동작의 일 예를 보여준다.
도 5는 엔터티 인식부(220) 중 K-EPCIs(222)과 관련된 동작의 일 예를 보여준다.
도 6은 엔터티 인식부(220) 중 K-EPCIe(223)과 관련된 동작의 일 예를 보여준다.
도 7은 엔터티 인식부(220) 중 K-EPCIse(224)과 관련된 동작의 일 예를 보여준다.
도 8은 도 1의 도 1의 한국어 관계 추출 모델(10)의 성능을 실험한 결과를 보여주는 도면이다.
도 9는 본 출원의 다른 실시 예에 따른 한국어 관계 추출 모델(20)을 보여주는 블록도이다.
도 10은 도 9의 한국어 관계 추출 모델(20)의 동작을 예시적으로 보여주는 도면이다.
도 11은 본 출원의 실시 예에 따른 한국어 관계 추출 방법을 보여주는 순서도이다.
도 12는 일 실시예에 따른 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다.
1 is a block diagram showing a Korean relationship extraction model 10 according to an embodiment of the present application.
FIG. 2 is a block diagram showing the Korean relationship extractor 200 of FIG. 1 in more detail.
FIG. 3 is a diagram showing an example of an operation of the pre-processing unit 100 of FIG. 1 .
4 shows an example of an operation related to the K-EPCIv 221 of the entity recognizing unit 220.
5 shows an example of an operation related to the K-EPCIs 222 of the entity recognition unit 220.
6 shows an example of an operation related to the K-EPCIe 223 of the entity recognition unit 220.
7 shows an example of an operation related to the K-EPCIse 224 of the entity recognition unit 220.
FIG. 8 is a diagram showing the results of testing the performance of the Korean relationship extraction model 10 of FIG. 1 in FIG. 1 .
9 is a block diagram showing a Korean relationship extraction model 20 according to another embodiment of the present application.
10 is a diagram showing the operation of the Korean relationship extraction model 20 of FIG. 9 as an example.
11 is a flow chart showing a Korean relationship extraction method according to an embodiment of the present application.
12 is a block diagram illustrating a computing environment including a computing device according to an exemplary embodiment.

이하에서는, 본 출원의 기술적 사상에 따른 실시 예들이 첨부된 도면을 참조하여 좀 더 자세히 설명될 것이다.Hereinafter, embodiments according to the technical idea of the present application will be described in more detail with reference to the accompanying drawings.

도 1은 본 출원의 실시 예에 따른 한국어 관계 추출 모델(10)을 보여주는 블록도이다. 도 1을 참조하면, 본 출원의 실시 예에 따른 한국어 관계 추출 모델(10)은 전처리부(100) 및 한국어 관계 추출부(200)를 포함한다. 1 is a block diagram showing a Korean relationship extraction model 10 according to an embodiment of the present application. Referring to FIG. 1 , a Korean relationship extraction model 10 according to an embodiment of the present application includes a preprocessor 100 and a Korean relationship extraction unit 200.

전처리부(100)는 한국어로 이루어진 입력 문장(Sn)을 수신한다. 전처리부(100)는 수신된 입력 문장(Sn)에 대한 전처리 동작을 수행하여 전처리된 입력 문장(SI)을 생성한다. The pre-processing unit 100 receives an input sentence (Sn) composed of Korean. The preprocessor 100 performs a preprocessing operation on the received input sentence Sn to generate a preprocessed input sentence SI.

구체적으로, 전처리부(100)는 입력 문장을 공백 단위로 분절(split)할 수 있다. 이 때, 분절된 각 객체는 토큰(token)이라 칭해질 수 있다. 전처리부(100)는 복수의 토큰들 중 제1 엔터티(entity 1)와 제2 엔터티(entity 2)에 해당하는 토큰들 주위에 특수 토큰(special token)을 추가할 수 있다. 예를 들어, 전처리부(100)는 제1 및 제2 엔터티의 앞과 뒤 양 쪽에 특수 토큰을 추가할 수 있다. 엔터티의 앞 및/또는 뒤에 추가되는 특수 토큰은 엔터티의 위치 정보를 포함하기 때문에, 특수 토큰은 엔터티 위치 토큰(entity position token)이라고 칭해질 수 있다. Specifically, the pre-processing unit 100 may split the input sentence in blank units. At this time, each segmented object may be referred to as a token. The preprocessor 100 may add special tokens around tokens corresponding to the first entity (entity 1) and the second entity (entity 2) among the plurality of tokens. For example, the pre-processing unit 100 may add special tokens to both the front and back of the first and second entities. Since a special token added before and/or after an entity includes entity position information, the special token may be referred to as an entity position token.

한국어 관계 추출부(200)는 전처리부(100)로부터 전처리된 입력 문장(SI)을 수신한다. 한국어 관계 추출부(200)는 전처리된 입력 문장(SI)에 포함된 특수 토큰의 전부 또는 일부를 활용하여 제1 엔터티와 제2 엔터티 사이의 관계를 예측할 수 있다. The Korean relationship extractor 200 receives the preprocessed input sentence SI from the preprocessor 100. The Korean relationship extractor 200 may predict the relationship between the first entity and the second entity by using all or some of the special tokens included in the preprocessed input sentence SI.

예를 들어, 한국어 관계 추출부(200)는 제1 및 제2 엔터티의 앞에 추가된 특수 토큰을 활용하여 제1 엔터티와 제2 엔터티 사이의 관계를 예측할 수 있다. 다른 예로, 한국어 관계 추출부(200)는 제1 및 제2 엔터티의 뒤에 추가된 특수 토큰을 활용하여 제1 엔터티와 제2 엔터티 사이의 관계를 예측할 수 있다. 다른 예로, 한국어 관계 추출부(200)는 제1 및 제2 엔터티의 앞과 뒤 양쪽에 추가된 특수 토큰을 활용하여 제1 엔터티와 제2 엔터티 사이의 관계를 예측할 수 있다.For example, the Korean relationship extractor 200 may predict a relationship between the first entity and the second entity by using a special token added to the front of the first and second entities. As another example, the Korean relationship extractor 200 may predict a relationship between the first entity and the second entity by using a special token added after the first and second entities. As another example, the Korean relationship extractor 200 may predict a relationship between the first entity and the second entity by utilizing special tokens added to both the front and rear of the first and second entities.

상술한 바와 같이, 본 출원의 실시 예에 따른 한국어 관계 추출 모델(10)은 엔터티에 대한 정보를 잘 반영하도록 특수 토큰을 한국어 입력 문장에 추가하고, 특수 토큰을 활용하여 엔터티들 사이의 관계를 예측한다. 이를 통하여, 본 출원의 실시 예에 따른 한국어 관계 추출 모델(10)은 정확하게 엔터티들 사이의 관계를 예측할 수 있다.As described above, the Korean relationship extraction model 10 according to an embodiment of the present application adds special tokens to Korean input sentences to reflect information about entities well, and predicts relationships between entities by utilizing special tokens. do. Through this, the Korean relationship extraction model 10 according to an embodiment of the present application can accurately predict relationships between entities.

도 2는 도 1의 한국어 관계 추출부(200)를 좀 더 자세히 보여주는 블록도이다. 도 2를 참조하면, 한국어 관계 추출부(200)는 한국어 언어모델(210), 엔터티 인식부(220) 및 관계 분류부(230)를 포함한다.FIG. 2 is a block diagram showing the Korean relationship extractor 200 of FIG. 1 in more detail. Referring to FIG. 2 , the Korean relationship extraction unit 200 includes a Korean language model 210, an entity recognition unit 220, and a relationship classification unit 230.

한국어 언어모델(210)은 전처리된 입력 문장(SI)을 수신한다. 한국어 언어모델(210)은 대용량의 코퍼스를 기반으로 문장에서 문맥을 이해할 수 있도록 학습시킨 사전학습 언어모델(Pre-trained Language Model)일 수 있다. 예를 들어, 한국어 언어 모델(210)은 KoBERT, HanBERT, KorBERT, KoELECTRA, KcELECTRA, mBERT와 같은 사전학습 언어모델일 수 있다. 다만, 이는 예시적인 것이며, 본 출원의 기술적 사상에 따른 사전학습 언어모델은 이에 한정되지는 않는다. The Korean language model 210 receives preprocessed input sentences (SI). The Korean language model 210 may be a pre-trained language model trained to understand context in sentences based on a large corpus. For example, the Korean language model 210 may be a pretraining language model such as KoBERT, HanBERT, KorBERT, KoELECTRA, KcELECTRA, and mBERT. However, this is an example, and the pre-learning language model according to the technical idea of the present application is not limited thereto.

엔터티 인식부(220)는 한국어 언어모델과 연동하여 동작하며, 토큰을 활용하여 히든 스테이트(hidden state)를 출력한다. 엔터티 인식부(220)는 K-EPICv(221), K-EPICs(222), K-EPICe(223) 및 K-EPICse(224)을 포함한다. The entity recognition unit 220 operates in conjunction with the Korean language model and outputs a hidden state using tokens. The entity recognizer 220 includes K-EPICv 221 , K-EPICs 222 , K-EPICe 223 and K-EPICse 224 .

K-EPICv(221)는 전처리된 입력 문장(SI)의 토큰들 중 [CLS] 토큰을 사용하여 히든 스테이트를 출력한다. 여기서, [CLS] 토큰은 문장의 제일 앞에 추가된 토큰을 가리킨다. The K-EPICv 221 outputs a hidden state using a [CLS] token among tokens of the preprocessed input sentence (SI). Here, the [CLS] token refers to the token added at the beginning of the sentence.

K-EPICs(222), K-EPCIe(223) 및 K-EPICse(224)는 전처리된 입력 무장(SI)의 토큰들 중 적어도 두 개의 특수 토큰(special token)을 사용하여 히든 스테이트를 출력한다. 예를 들어, K-EPICs(222)는 특수 토큰들 중 제1 엔터티 앞에 추가된 [e1sp] 토큰과 제2 엔터티 앞에 추가된 [e2sp] 토큰을 사용하여 히든 스테이트를 출력한다. 예를 들어, K-EPCIe(223)는 특수 토큰들 중 제1 엔터티 뒤에 추가된 [e1ep] 토큰과 제2 엔터티 뒤에 추가된 [e2ep] 토큰을 사용하여 히든 스테이트를 출력한다. 예를 들어, K-EPCIse(224)는 특수 토큰들 중 제1 및 제2 엔터티의 앞과 뒤에 추가된 [e1sp] 토큰, [e1ep] 토큰, [e2sp] 토큰, [e2ep] 토큰을 사용하여 히든 스테이트를 출력한다.K-EPICs (222), K-EPCIe (223), and K-EPICse (224) use at least two special tokens (special token) of the tokens of the pre-processed input armament (SI) to output the hidden state. For example, the K-EPICs 222 outputs a hidden state using an [e1sp] token added before a first entity and an [e2sp] token added before a second entity among special tokens. For example, the K-EPCIe 223 outputs a hidden state using an [e1ep] token added after a first entity and an [e2ep] token added after a second entity among special tokens. For example, the K-EPCIse 224 uses an [e1sp] token, an [e1ep] token, an [e2sp] token, and an [e2ep] token added before and after the first and second entities among the special tokens to hide hidden information. output state

서로 다른 토큰을 사용하기 때문에, K-EPICv(221), K-EPICs(222), K-EPCIe(223) 및 K-EPICse(224)의 히든 스테이트는 서로 다를 수 있다.Since different tokens are used, the hidden states of K-EPICv (221), K-EPICs (222), K-EPCIe (223), and K-EPICse (224) may be different.

관계 분류부(230)는 엔터티 인식부(220)로부터 히든 스테이트를 수신한다. 관계 분류부(230)는 수신된 히든 스테이트에 소프트맥스(softmax)를 적용하여 관계 분류(relation classification)을 진행함으로써, 제1 엔터티와 제2 엔터티 사이의 최종 관계(final relation)를 예측할 수 있다. The relationship classification unit 230 receives the hidden state from the entity recognizing unit 220 . The relation classification unit 230 may predict a final relation between the first entity and the second entity by performing relation classification by applying softmax to the received hidden state.

도 3은 도 1의 전처리부(100)의 동작의 일 예를 보여주는 도면이다. 도 3에서는, 예시적으로, 한국어 입력 문장(S)으로 "KBS 제1라디오는 대한민국의 방송국 한국방송공사에서 운영ㆍ방송하는 라디오 채널이다"이 제공된다고 가정된다. 또한, 제1 엔터티(entity 1)는 "한국방송공사에서"라고 가정되고, 제2 엔터티(entity 2)는 "대한민국의"라고 가정된다.FIG. 3 is a diagram showing an example of an operation of the pre-processing unit 100 of FIG. 1 . In FIG. 3, it is exemplarily assumed that "KBS Radio 1 is a radio channel operated and broadcast by Korea Broadcasting Corporation, a broadcasting station in Korea" is provided as a Korean input sentence (S). In addition, the first entity (entity 1) is assumed to be "at the Korea Broadcasting Corporation", and the second entity (entity 2) is assumed to be "of the Republic of Korea".

전처리부(100)는 입력 문장(S)을 공백 단위로 분절(split)하여 복수의 토큰들로 표현할 것이다. 전처리부(100)는 입력 문장(S)의 제일 앞에는 [CLS] 토큰을 추가하고, 입력 문장(S)의 제일 뒤에는 [SEP] 토큰을 추가할 것이다. 전처리부(100)는 제1 엔터티인 "대한민국의" 앞과 뒤에 각각 [e1sp] 토큰과 [e1ep] 토큰을 추가할 것이다. 전처리부(200)는 제2 엔터티인 "한국방송공사에서"의 앞과 뒤에는 각각 [e2sp] 토큰과 [e2ep] 토큰을 추가할 것이다. The pre-processing unit 100 will split the input sentence S into space units and express it as a plurality of tokens. The pre-processing unit 100 will add a [CLS] token at the beginning of the input sentence (S), and will add a [SEP] token at the end of the input sentence (S). The preprocessing unit 100 will add an [e1sp] token and an [e1ep] token before and after the first entity "Korea", respectively. The pre-processing unit 200 will add an [e2sp] token and an [e2ep] token before and after the second entity "at Korea Broadcasting Corporation", respectively.

이러한 전처리 동작을 통하여, 전처리부(100)는 도 3에 도시된 바와 같은 전처리된 입력 문장(SI)을 생성할 수 있다. Through this preprocessing operation, the preprocessor 100 may generate the preprocessed input sentence SI as shown in FIG. 3 .

도 4 내지 도 7은 도 2의 한국어 언어모델(210) 및 엔터티 인식부(220)의 동작의 일 예들을 보여주는 도면들이다. 구체적으로, 도 4는 엔터티 인식부(220) 중 K-EPCIv(221)과 관련된 동작의 일 예를 보여준다. 도 5는 엔터티 인식부(220) 중 K-EPCIs(222)과 관련된 동작의 일 예를 보여준다. 도 6은 엔터티 인식부(220) 중 K-EPCIe(223)과 관련된 동작의 일 예를 보여준다. 도 7은 엔터티 인식부(220) 중 K-EPCIse(224)과 관련된 동작의 일 예를 보여준다.4 to 7 are diagrams showing examples of operations of the Korean language model 210 and entity recognition unit 220 of FIG. 2 . Specifically, FIG. 4 shows an example of an operation related to the K-EPCIv 221 of the entity recognition unit 220. 5 shows an example of an operation related to the K-EPCIs 222 of the entity recognition unit 220. 6 shows an example of an operation related to the K-EPCIe 223 of the entity recognition unit 220. 7 shows an example of an operation related to the K-EPCIse 224 of the entity recognition unit 220.

도 4를 참조하면, 전처리된 입력 문장(SI)이 한국어 언어모델(210)에 제공되고, K-EPICv(221)은 한국어 언어모델(210)과 연동하여 히든 스테이트(hv)를 출력한다. Referring to FIG. 4 , the preprocessed input sentence (SI) is provided to the Korean language model 210, and the K-EPICv 221 interlocks with the Korean language model 210 to output a hidden state (hv).

이 때, K-EPICv(221)은 전처리된 입력 문장(SI)에 포함된 토큰들 중 [CLS] 토큰을 사용하여 히든 스테이트(hv)를 출력할 것이다. At this time, the K-EPICv 221 will output the hidden state (hv) using the [CLS] token among the tokens included in the preprocessed input sentence (SI).

도 5를 참조하면, 전처리된 입력 문장(SI)이 한국어 언어모델(210)에 제공되고, K-EPICs(222)은 한국어 언어모델(210)과 연동하여 히든 스테이트(hs)를 출력한다. Referring to FIG. 5 , the preprocessed input sentences (SI) are provided to the Korean language model 210, and the K-EPICs 222 interlock with the Korean language model 210 to output hidden states (hs).

이 때, K-EPICs(222)은 전처리된 입력 문장(SI)에 포함된 토큰들 중 제1 엔터티의 앞과 제2 엔터티의 앞에 각각 위치하는 [e1sp] 토큰과 [e2sp] 토큰을 사용하여 히든 스테이트(hs)를 출력할 것이다. At this time, the K-EPICs 222 use [e1sp] tokens and [e2sp] tokens located in front of the first entity and in front of the second entity among the tokens included in the preprocessed input sentence (SI), respectively. will output the state (hs).

도 6을 참조하면, 전처리된 입력 문장(SI)이 한국어 언어모델(210)에 제공되고, K-EPICe(223)은 한국어 언어모델(210)과 연동하여 히든 스테이트(he)를 출력한다. Referring to FIG. 6 , the preprocessed input sentence (SI) is provided to the Korean language model 210, and the K-EPICe 223 interlocks with the Korean language model 210 to output a hidden state (he).

이 때, K-EPICe(223)은 전처리된 입력 문장(SI)에 포함된 토큰들 중 제1 엔터티의 뒤와 제2 엔터티의 뒤에 각각 위치하는 [e1ep] 토큰과 [e2ep] 토큰을 사용하여 히든 스테이트(he)를 출력할 것이다. At this time, the K-EPICe 223 uses the [e1ep] token and the [e2ep] token located behind the first entity and the second entity among the tokens included in the preprocessed input sentence (SI), respectively. will output the state (he).

도 7을 참조하면, 전처리된 입력 문장(SI)이 한국어 언어모델(210)에 제공되고, K-EPICse(224)은 한국어 언어모델(210)과 연동하여 히든 스테이트(hse)를 출력한다. Referring to FIG. 7 , the preprocessed input sentence (SI) is provided to the Korean language model 210, and the K-EPICse 224 interlocks with the Korean language model 210 to output a hidden state (hse).

이 때, K-EPICse(224)은 전처리된 입력 문장(SI)에 포함된 토큰들 중 제1 엔터티와 제2 엔터티의 앞과 뒤에 각각 위치하는 [e1sp] 토큰, [e1ep] 토큰, [e2sp] 토큰, [e2ep] 토큰을 사용하여 히든 스테이트(hse)를 출력할 것이다. At this time, the K-EPICse 224 is [e1sp] token, [e1ep] token, and [e2sp] located before and after the first entity and the second entity, respectively, among the tokens included in the preprocessed input sentence (SI). We will use the token, the [e2ep] token, to output the hidden state (hse).

도 4 내지 도 7에서 출력된 히든 스테이트들(hv, hs, he, hse)는 각각 서로 다른 출력 값을 가질 것이다. 따라서, 관계 분류부(230)에서 예측된 제1 엔터티와 제2 엔터티 사이의 최종 관계는 출력된 히든 스테이트들(hv, hs, he, hse)에 따라 다를 수 있다. The hidden states (hv, hs, he, and hse) output in FIGS. 4 to 7 will have different output values. Accordingly, the final relationship between the first entity and the second entity predicted by the relationship classification unit 230 may differ according to the output hidden states hv, hs, he, and hse.

도 8은 도 1의 도 1의 한국어 관계 추출 모델(10)의 성능을 실험한 결과를 보여주는 도면이다.FIG. 8 is a diagram showing the results of testing the performance of the Korean relationship extraction model 10 of FIG. 1 in FIG. 1 .

예시적으로, BERT-Ko-RE Dataset과 KLUE-RE Dataset을 사용하여 실험을 진행하였다. 또한 한국어의 특성을 고려할 수 있도록 대용량의 한국어 데이터로 학습시킨 한국어 언어모델인 HanBERT, KLUE-BERT, KoBERT, KorBERT, KoELECTRA를 적용하였으며, 한국어를 번역하여 학습시킨 mBERT와도 비교를 하였다.As an example, experiments were conducted using the BERT-Ko-RE Dataset and the KLUE-RE Dataset. In addition, HanBERT, KLUE-BERT, KoBERT, KorBERT, and KoELECTRA, which are Korean language models trained with large amounts of Korean data, were applied to consider the characteristics of Korean, and compared with mBERT, which was trained by translating Korean.

도 8에서, EPIC_V, EPIC_S, EPIC_E, EPIC_SE는 각각 K-EPICv(221), K-EPICs(222), K-EPICe(223), K-EPICse(224)를 적용한 실험결과를 나타낸다. non_EPIC은 K-EPICv(221) 내지 K-PEICse(224)를 적용하지 않았을 때의 실험결과를 나타낸다.In FIG. 8, EPIC_V, EPIC_S, EPIC_E, and EPIC_SE represent experimental results applying K-EPICv (221), K-EPICs (222), K-EPICe (223), and K-EPICse (224), respectively. non_EPIC represents the experimental results when K-EPICv (221) to K-PEICse (224) are not applied.

또한, 도 8에서, Micro는 Micro-f1을 의미하고 Weighted는 Weighted f1을 의미한다. 구체적으로, 관계 추출은 관계(relation)를 예측하는 것을 목표로 하며, 관계의 수는 30가지 이상이고 관계마다 데이터 분포도 다르다. 따라서, Micro의 경우 전체 관계에서 나온 f1 결과의 평균을 의미하며, Weighted f1은 각 관계를 데이터 분포에 맞게 도출한 f1 결과에 평균을 낸 것을 의미한다.Also, in FIG. 8 , Micro means Micro-f1 and Weighted means Weighted f1. Specifically, relation extraction aims to predict relations, and the number of relations is more than 30, and the data distribution is different for each relation. Therefore, in the case of Micro, it means the average of the f1 results from all relationships, and Weighted f1 means the average of the f1 results derived from each relationship according to the data distribution.

도 8을 참조하면, 도 1 내지 도 7에서 설명된 K-EPICv(221), K-EPICs(222), K-EPICe(223), K-EPICse(224)을 적용하였을 때에 성능이 향상되는 것을 확인할 수 있다. Referring to FIG. 8, when the K-EPICv (221), K-EPICs (222), K-EPICe (223), and K-EPICse (224) described in FIGS. 1 to 7 are applied, performance is improved. You can check.

특히, 도 8에서 확인되는 것과 같이, EPIC_S와 EPIC_SE의 성능 결과가 대체로 좋은 것을 확인할 수 있다. 따라서 특수 토큰 중 엔터티 앞에 있는 토큰과 엔터티의 앞 및 뒤에 있는 토큰이 엔터티에 대한 정보를 대체로 많이 반영하고 있는 것으로 확인할 수 있다.In particular, as confirmed in FIG. 8 , it can be seen that the performance results of EPIC_S and EPIC_SE are generally good. Therefore, among the special tokens, it can be confirmed that the tokens in front of the entity and the tokens in front and behind the entity generally reflect a lot of information about the entity.

한편, 도 1 내지 도 8의 설명은 예시적인 것이며, 본 출원의 기술적 사상은 이에 한정되지 않음이 이해될 것이다. 예를 들어, 도 1 및 도 2에서 엔터티 인식부(220)는 K-EPICv(221), K-EPICs(222), K-EPICe(223), K-EPICse(224)를 모두 포함하는 것으로 설명되었다. 다만, 이는 예시적인 것이며, 엔터티 인식부(220)는 이 K-EPICv(221), K-EPICs(222), K-EPICe(223), K-EPICse(224) 중에서 일부만을 포함하도로 구현될 수 있다. Meanwhile, it will be understood that the description of FIGS. 1 to 8 is exemplary, and the technical spirit of the present application is not limited thereto. For example, in FIGS. 1 and 2, the entity recognition unit 220 is described as including K-EPICv 221, K-EPICs 222, K-EPICe 223, and K-EPICse 224. It became. However, this is exemplary, and the entity recognition unit 220 may be implemented by including only some of K-EPICv (221), K-EPICs (222), K-EPICe (223), and K-EPICse (224). can

일 실시 예에 있어서, 엔터티 인식부(220)는 1개의 K-EPIC만을 포함하도록 구현될 수 있다. 예를 들어, 엔터티 인식부(220)는 K-EPICs(222)만을 포함하도로 구현되거나, K-EPICse(224)만을 포함하도록 구현될 수 있다. In one embodiment, the entity recognizing unit 220 may be implemented to include only one K-EPIC. For example, the entity recognizing unit 220 may be implemented to include only K-EPICs 222 or only K-EPICse 224 .

일 실시 예에 있어서, 엔터티 인식부(220)는 2개의 K-EPIC을 포함하도록 구현될 수 있다. 예를 들어, 엔터티 인식부(220)는 K-EPICs(222) 및 K-EPICse(224)만을 포함하도록 구현될 수 있으며, 선택적으로 이 중 하나를 적용하도록 구현될 수도 있다. In one embodiment, the entity recognizing unit 220 may be implemented to include two K-EPICs. For example, the entity recognizing unit 220 may be implemented to include only K-EPICs 222 and K-EPICse 224, and may be implemented to selectively apply one of them.

도 9는 본 출원의 다른 실시 예에 따른 한국어 관계 추출 모델(20)을 보여주는 블록도이다. 도 9의 한국어 관계 추출 모델(20)은 도 1 및 도 2의 한국어 관계 추출 모델(10)과 유사하다. 따라서, 동일하거나 유사한 구성은 동일하거나 유사한 참조번호를 사용하여 표기하였으며, 중복되는 설명은 간략한 설명을 위하여 이하 생략될 것이다.9 is a block diagram showing a Korean relationship extraction model 20 according to another embodiment of the present application. The Korean relationship extraction model 20 of FIG. 9 is similar to the Korean relationship extraction model 10 of FIGS. 1 and 2 . Accordingly, the same or similar components are denoted using the same or similar reference numerals, and overlapping descriptions will be omitted for brevity.

도 9를 참조하면, 한국어 관계 추출 모델(20)은 전처리부(100_1), 한국어 언어모델(210), 엔터티 인식부(220_1) 및 관계 분류부(230)를 포함한다. Referring to FIG. 9 , the Korean relationship extraction model 20 includes a preprocessing unit 100_1, a Korean language model 210, an entity recognition unit 220_1, and a relationship classification unit 230.

도 9의 엔터티 인식부(220_1)는 도 2의 엔터티 인식부(220)와 달리 하나의 K-EPIC만을 포함하도록 구현된다. 예를 들어, 도 9의 엔터티 인식부(220_1)는 K-EPIC들 중 K-EPICs(222)만을 포함하도록 구현될 수 있다.The entity recognizing unit 220_1 of FIG. 9 is implemented to include only one K-EPIC, unlike the entity recognizing unit 220 of FIG. 2 . For example, the entity recognizer 220_1 of FIG. 9 may be implemented to include only K-EPICs 222 among K-EPICs.

또한, 도 9의 전처리부(100_1)는 특수 토큰을 추가할 때에 엔터티 인식부(220_1)의 K-EPIC에 대응하는 특수 토큰만을 추가하도록 전처리 동작을 수행한다. 예를 들어, 도 9와 같이 엔터티 인식부(220_1)가 K-EPICs(222)만을 포함하는 경우, 전처리부(100_1)는 특수 토큰을 추가할 때에 [e1sp] 토큰과 [e2sp] 토큰만을 추가하고, [e1ep] 토큰과 [e2ep] 토큰은 추가하지 않을 수 있다. In addition, when adding a special token, the preprocessing unit 100_1 of FIG. 9 performs a preprocessing operation to add only the special token corresponding to the K-EPIC of the entity recognizing unit 220_1. For example, as shown in FIG. 9, when the entity recognition unit 220_1 includes only K-EPICs 222, the preprocessor 100_1 adds only [e1sp] tokens and [e2sp] tokens when adding special tokens, and , [e1ep] token and [e2ep] token may not be added.

도 10은 도 9의 한국어 관계 추출 모델(20)의 동작을 예시적으로 보여주는 도면이다.10 is a diagram showing the operation of the Korean relationship extraction model 20 of FIG. 9 as an example.

도 10에 도시된 바와 같이, 전처리부(100_1)에 의하여 생성된 전처리된 입력 문장(SI)은 특수 토큰들 중 [e1ep] 토큰과 [e2ep] 토큰은 포함하지 않는다. 전처리된 입력 문장(SI)은 한국어 언어모델(210)에 제공되며, K-EPICs(220_1)는 [e1sp] 토큰과 [e2sp] 토큰을 적용하여 히든 스테이트를 출력한다.As shown in FIG. 10 , the preprocessed input sentence SI generated by the preprocessor 100_1 does not include the [e1ep] token and the [e2ep] token among special tokens. The preprocessed input sentence (SI) is provided to the Korean language model 210, and the K-EPICs (220_1) outputs the hidden state by applying the [e1sp] token and the [e2sp] token.

상술한 바와 같이, 본 출원의 실시 예에 따른 한국어 관계 추출 모델(20)은 하나의 K-EPIC을 사용하도록 구현될 수 있으며, 이 경우에 전처리부(100_1)는 해당 K-EPIC에서 사용되는 특수 토큰만을 추가하도록 전처리 동작을 수행할 수 있다. 따라서, 전처리 동작을 좀 더 효율적으로 수행하는 것이 가능하다. As described above, the Korean relationship extraction model 20 according to the embodiment of the present application may be implemented to use one K-EPIC, and in this case, the pre-processing unit 100_1 is used in the K-EPIC. A preprocessing operation can be performed to add only the token. Therefore, it is possible to perform the preprocessing operation more efficiently.

도 11은 본 출원의 실시 예에 따른 한국어 관계 추출 방법을 보여주는 순서도이다. 11 is a flow chart showing a Korean relationship extraction method according to an embodiment of the present application.

S110 단계에서, 입력 문장에 엔터티 정보를 학습하기 위한 특수 토큰들을 추가하는 전처리 동작이 수행된다. 예를 들어, 전처리 동작은 두 개의 엔터티의 앞 및/또는 뒤에 특수 토큰을 추가하도록 수행될 수 있다. 또한, 전처리 동작은 입력 문장의 제일 앞과 제일 뒤에 [CLS] 토큰과 [SEP] 토큰을 추가할 수도 있다. In step S110, a preprocessing operation of adding special tokens for learning entity information to an input sentence is performed. For example, pre-processing operations can be performed to add special tokens before and/or after the two entities. In addition, the pre-processing operation may add [CLS] tokens and [SEP] tokens at the beginning and end of the input sentence.

S120 단계에서, 특수 토큰을 활용하여, 엔터티 정보가 반영된 히든 스테이트를 출력하는 동작이 수행된다. 예를 들어, K-EPICs를 적용하여 모델이 구현된 경우, 각 엔터티의 앞에 추가된 특수 토큰을 활용하여 히든 스테이트가 출력될 수 있다. 다른 예로, K-EPICe를 적용하여 모델이 구현된 경우, 각 엔터티의 뒤에 추가된 특수 토큰을 활용하여 히든 스테이트가 출력될 수 있다. 다른 예로, K-EPICse를 적용하여 모델이 구현된 경우, 각 엔터티의 앞과 뒤에 추가된 특수 토큰을 활용하여 히든 스테이트가 출력될 수 있다. 또한, K-EPICv를 적용하여 모델이 구현된 경우, 특수 토큰이 아닌 [CLS] 토큰만을 활용하여 히든 스테이트가 출력될 수도 있다.In step S120, an operation of outputting a hidden state in which entity information is reflected is performed using a special token. For example, if the model is implemented by applying K-EPICs, the hidden state can be output using a special token added in front of each entity. As another example, when a model is implemented by applying K-EPICe, a hidden state may be output using a special token added at the end of each entity. As another example, when the model is implemented by applying K-EPICse, the hidden state may be output using special tokens added before and after each entity. In addition, when the model is implemented by applying K-EPICv, the hidden state may be output using only the [CLS] token, not the special token.

S130 단계에서, 출력된 히든 스테이트에 소프트맥스를 적용하여 엔터티 사이의 최종 관계가 예측된다. In step S130, a final relationship between entities is predicted by applying softmax to the output hidden state.

도 12는 일 실시예에 따른 컴퓨팅 장치를 포함하는 컴퓨팅 환경을 예시하여 설명하기 위한 블록도이다.12 is a block diagram illustrating a computing environment including a computing device according to an exemplary embodiment.

도시된 실시예에서, 각 컴포넌트들은 이하에 기술된 것 이외에 상이한 기능 및 능력을 가질 수 있고, 이하에 기술되지 것 이외에도 추가적인 컴포넌트를 포함할 수 있다.In the illustrated embodiment, each component may have different functions and capabilities other than those described below, and may include additional components other than those described below.

도 12를 참조하면, 컴퓨팅 환경은 컴퓨팅 장치(1000)를 포함하며, 컴퓨팅 장치(1000)는 도 1 내지 도 11에서 설명된 한국어 관계 추출 모델 및/또는 한국어 관계 추출 방법을 포함하도록 구현된 컴포넌트일 수 있다. 컴퓨팅 장치(1000)는 적어도 하나의 프로세서(1100), 컴퓨터 판독 가능 저장 매체(1200) 및 통신 버스를 포함한다. Referring to FIG. 12, the computing environment includes a computing device 1000, which may be a component implemented to include the Korean relationship extraction model and/or the Korean relationship extraction method described in FIGS. 1 to 11. can The computing device 1000 includes at least one processor 1100, a computer readable storage medium 1200 and a communication bus.

프로세서(1100)는 컴퓨팅 장치(1000)로 하여금 앞서 설명된 한국어 관계 추출 모델 및/또는 한국어 관계 추출 방법에 따라 동작하도록 할 수 있다. 예를 들어, 프로세서(1100)는 컴퓨터 판독 가능 저장 매체(1200)에 저장된 하나 이상의 프로그램들(1210)을 실행할 수 있다. 상기 하나 이상의 프로그램들은 하나 이상의 컴퓨터 실행 가능 명령어를 포함할 수 있으며, 상기 컴퓨터 실행 가능 명령어는 프로세서(1100)에 의해 실행되는 경우 컴퓨팅 장치(1000)로 하여금 한국어 관계 추출 모델 및/또는 한국어 관계 추출 방법에 따른 동작들을 수행하도록 구성될 수 있다.The processor 1100 may cause the computing device 1000 to operate according to the Korean relationship extraction model and/or the Korean relationship extraction method described above. For example, the processor 1100 may execute one or more programs 1210 stored in the computer readable storage medium 1200 . The one or more programs may include one or more computer executable instructions, and the computer executable instructions, when executed by the processor 1100, cause the computing device 1000 to extract a Korean relationship model and/or a Korean relationship extraction method. It can be configured to perform operations according to.

컴퓨터 판독 가능 저장 매체(1200)는 컴퓨터 실행 가능 명령어 내지 프로그램 코드, 프로그램 데이터 및/또는 다른 적합한 형태의 정보를 저장하도록 구성된다. 컴퓨터 판독 가능 저장 매체(1200)에 저장된 프로그램(1210)은 프로세서(1100)에 의해 실행 가능한 명령어의 집합을 포함한다. 일 실시예에서, 컴퓨터 판독 가능 저장 매체(1200)는 메모리(랜덤 액세스 메모리와 같은 휘발성 메모리, 비휘발성 메모리, 또는 이들의 적절한 조합), 하나 이상의 자기 디스크 저장 디바이스들, 광학 디스크 저장 디바이스들, 플래시 메모리 디바이스들, 그 밖에 컴퓨팅 장치(1000)에 의해 액세스되고 원하는 정보를 저장할 수 있는 다른 형태의 저장 매체, 또는 이들의 적합한 조합일 수 있다.Computer-readable storage medium 1200 is configured to store computer-executable instructions or program code, program data, and/or other suitable forms of information. The program 1210 stored in the computer readable storage medium 1200 includes a set of instructions executable by the processor 1100 . In one embodiment, computer readable storage medium 1200 may include memory (volatile memory such as random access memory, non-volatile memory, or a suitable combination thereof), one or more magnetic disk storage devices, optical disk storage devices, flash It may be memory devices, other forms of storage media that can be accessed by the computing device 1000 and store desired information, or a suitable combination thereof.

통신 버스는 프로세서(1100), 컴퓨터 판독 가능 저장 매체(1200)를 포함하여 컴퓨팅 장치(1000)의 다른 다양한 컴포넌트들을 상호 연결한다.The communication bus interconnects the processor 1100, the computer readable storage medium 1200, and various other components of the computing device 1000.

컴퓨팅 장치(1000)는 또한 하나 이상의 입출력 장치(2000)를 위한 인터페이스를 제공하는 하나 이상의 입출력 인터페이스(1300) 및 하나 이상의 네트워크 통신 인터페이스(1400)를 포함할 수 있다. 입출력 인터페이스(1300) 및 네트워크 통신 인터페이스(1400)는 통신 버스에 연결된다. 입출력 장치(2000)는 입출력 인터페이스(1300)를 통해 컴퓨팅 장치(1000)의 다른 컴포넌트들에 연결될 수 있다. 예시적인 입출력 장치(2000)는 포인팅 장치(마우스 또는 트랙패드 등), 키보드, 터치 입력 장치(터치패드 또는 터치스크린 등), 음성 또는 소리 입력 장치, 다양한 종류의 센서 장치 및/또는 촬영 장치와 같은 입력 장치, 및/또는 디스플레이 장치, 프린터, 스피커 및/또는 네트워크 카드와 같은 출력 장치를 포함할 수 있다. 예시적인 입출력 장치(2000)는 컴퓨팅 장치(1000)를 구성하는 일 컴포넌트로서 컴퓨팅 장치(1000)의 내부에 포함될 수도 있고, 컴퓨팅 장치(1000)와는 구별되는 별개의 장치로 컴퓨팅 장치(1000)와 연결될 수도 있다.Computing device 1000 may also include one or more input/output interfaces 1300 and one or more network communication interfaces 1400 that provide interfaces for one or more input/output devices 2000 . The input/output interface 1300 and the network communication interface 1400 are connected to a communication bus. The input/output device 2000 may be connected to other components of the computing device 1000 through the input/output interface 1300 . The exemplary input/output device 2000 includes a pointing device (such as a mouse or trackpad), a keyboard, a touch input device (such as a touchpad or touchscreen), a voice or sound input device, various types of sensor devices, and/or a photographing device. input devices, and/or output devices such as display devices, printers, speakers, and/or network cards. The exemplary input/output device 2000 may be included inside the computing device 1000 as a component constituting the computing device 1000, or may be connected to the computing device 1000 as a separate device distinct from the computing device 1000. may be

이상에서 대표적인 실시예를 통하여 본 발명에 대하여 상세하게 설명하였으나, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자는 전술한 실시예에 대하여 본 발명의 범주에서 벗어나지 않는 한도 내에서 다양한 변형이 가능함을 이해할 것이다. 그러므로 본 발명의 권리범위는 설명된 실시예에 국한되어 정해져서는 안 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.Although the present invention has been described in detail through representative examples above, those skilled in the art can make various modifications to the above-described embodiments without departing from the scope of the present invention. will understand Therefore, the scope of the present invention should not be limited to the described embodiments and should not be defined, and should be defined by not only the claims to be described later, but also those equivalent to these claims.

10, 20: 한국어 관계 추출 모델
100, 100_1: 전처리부
200: 한국어 관계 추출부
210: 한국어 언어모델
220: 엔터티 인식부
230: 관계 분류부
10, 20: Korean relationship extraction model
100, 100_1: pre-processing unit
200: Korean relationship extraction unit
210: Korean language model
220: entity recognition unit
230: relationship classification unit

Claims (15)

한국어 입력 문장에 포함된 엔터티의 앞 또는 뒤 중 적어도 하나의 위치에 특수 토큰을 추가하는 전처리부; 및
상기 특수 토큰을 통하여, 상기 한국어 입력 문장에 포함된 엔터티 사이의 관계를 예측하는 한국어 관계 추출부를 포함하는, 엔터티 위치 정보를 활용한 한국어 관계 추출 모델.
a pre-processing unit that adds a special token to at least one position before or after an entity included in a Korean input sentence; and
A Korean relationship extraction model using entity location information, including a Korean relationship extraction unit that predicts a relationship between entities included in the Korean input sentence through the special token.
제1 항에 있어서,
상기 한국어 입력 문장은 제1 엔터티 및 제2 엔터티를 포함하며,
상기 전처리부는 상기 제1 엔터티의 앞과 뒤에 각각 제1 및 제2 특수 토큰을 추가하고, 상기 제2 엔터티의 앞과 뒤에 각각 제1 및 제2 특수 토큰을 추가하는, 한국어 관계 추출 모델.
According to claim 1,
The Korean input sentence includes a first entity and a second entity,
Wherein the pre-processing unit adds first and second special tokens before and after the first entity, respectively, and adds first and second special tokens before and after the second entity, respectively.
제2 항에 있어서,
상기 전처리부는 상기 한국어 입력 문장 앞에 [CLS] 토큰을 추가하고, 상기 한국어 입력 문장 뒤에 [SEP] 토큰을 추가하는, 한국어 관계 추출 모델.
According to claim 2,
The Korean relationship extraction model, wherein the preprocessor adds a [CLS] token before the Korean input sentence and adds a [SEP] token after the Korean input sentence.
제1 항에 있어서,
상기 한국어 관계 추출부는
상기 전처리부로부터 특수 토큰이 추가된 입력 문장을 수신하는 한국어 언어모델;
상기 한국어 언어모델과 연동하여 동작하며, 상기 특수 토큰에 기초하여 히든 스테이트를 출력하는 엔터티 인식부; 및
상기 히든 스테이트에 기초하여, 엔터티 사이의 관계를 분류하는 관계 분류부를 포함하는, 한국어 관계 추출 모델.
According to claim 1,
The Korean relationship extraction unit
a Korean language model that receives an input sentence to which a special token is added from the pre-processing unit;
an entity recognizer that operates in conjunction with the Korean language model and outputs a hidden state based on the special token; and
A Korean relationship extraction model comprising a relationship classification unit that classifies relationships between entities based on the hidden state.
제4 항에 있어서,
상기 한국어 언어 모델은 KoBERT, HanBERT, KorBERT, KoELECTRA, KcELECTRA 중 어느 하나인, 한국어 관계 추출 모델.
According to claim 4,
The Korean language model is any one of KoBERT, HanBERT, KorBERT, KoELECTRA, and KcELECTRA, a Korean relation extraction model.
제4 항에 있어서,
상기 엔터티 인식부는
특수 토큰 중 엔터티 앞에 추가된 특수 토큰에 기초하여 히든 스테이를 출력하는 K-EPICs를 포함하는, 한국어 관계 추출 모델.
According to claim 4,
The entity recognition unit
Korean relation extraction model, including K-EPICs that output hidden stays based on special tokens added in front of entities among special tokens.
제6 항에 있어서,
상기 엔터티 인식부는
특수 토큰 중 엔터티 뒤에 추가된 특수 토큰에 기초하여 히든 스테이를 출력하는 K-EPICe를 더 포함하는, 한국어 관계 추출 모델.
According to claim 6,
The entity recognition unit
A Korean relationship extraction model further comprising K-EPICe that outputs a hidden stay based on a special token added after an entity among special tokens.
제7 항에 있어서,
상기 엔터티 인식부는
특수 토큰 중 엔터티 앞과 뒤 양쪽에 추가된 특수 토큰에 기초하여 히든 스테이를 출력하는 K-EPICse를 더 포함하는, 한국어 관계 추출 모델.
According to claim 7,
The entity recognition unit
Korean relationship extraction model, further comprising K-EPICse that outputs hidden stays based on special tokens added to both the front and back of the entity among the special tokens.
제8 항에 있어서,
상기 엔터티 인식부는
상기 한국어 입력 문장의 제일 앞에 추가된 [CLS] 토큰에 기초하여 히든 스테이를 출력하는 K-EPICv를 더 포함하는, 한국어 관계 추출 모델.
According to claim 8,
The entity recognition unit
Korean relationship extraction model further comprising a K-EPICv that outputs a hidden stay based on the [CLS] token added to the front of the Korean input sentence.
제4 항에 있어서,
상기 관계 분류부는 상기 히든 스테이트에 소프트맥스를 적용하여 엔터티 사이의 관계를 예측하는, 한국어 관계 추출 모델.
According to claim 4,
The Korean relationship extraction model, wherein the relationship classification unit predicts a relationship between entities by applying softmax to the hidden state.
한국어 입력 문장에 엔터티의 위치 정보를 포함하는 특수 토큰을 추가하는 단계;
상기 특수 토큰에 기초하여, 엔터티 정보가 반영된 히든 스테이트를 출력하는 단계; 및
상기 히든 스테이트에 소프트맥스를 적용하여, 엔터티 사이의 관계를 추출하는 단계를 포함하는, 한국어 관계 추출 방법.
Adding a special token including entity location information to a Korean input sentence;
outputting a hidden state reflecting entity information based on the special token; and
A Korean relationship extraction method comprising the step of extracting a relationship between entities by applying softmax to the hidden state.
제11 항에 있어서,
상기 특수 토큰을 추가하는 단계는
상기 엔터티의 앞과 뒤 중 적어도 하나의 위치에 특수 토큰을 추가하는 단계; 및
상기 한국어 입력 문장의 앞과 뒤에 토큰을 추가하는 단계를 포함하는, 한국어 관계 추출 방법.
According to claim 11,
The step of adding the special token is
adding a special token to at least one of the front and back of the entity; and
A Korean relationship extraction method comprising adding tokens before and after the Korean input sentence.
제11 항에 있어서,
상기 히든 스테이트를 출력하는 단계는
상기 특수 토큰 중 상기 엔터티의 앞에 추가된 특수 토큰을 활용하는 K-EPICs를 적용하여 히든 스테이트를 출력하는, 한국어 관계 추출 방법.
According to claim 11,
The step of outputting the hidden state is
Korean relationship extraction method for outputting a hidden state by applying K-EPICs that utilize a special token added in front of the entity among the special tokens.
제11 항에 있어서,
상기 히든 스테이트를 출력하는 단계는
상기 특수 토큰 중 상기 엔터티의 뒤에 추가된 특수 토큰을 활용하는 K-EPICe를 적용하여 히든 스테이트를 출력하는, 한국어 관계 추출 방법.
According to claim 11,
The step of outputting the hidden state is
Korean relationship extraction method for outputting a hidden state by applying K-EPICe that utilizes a special token added to the end of the entity among the special tokens.
제11 항에 있어서,
상기 히든 스테이트를 출력하는 단계는
상기 특수 토큰 중 상기 엔터티의 앞과 뒤 양쪽에 추가된 특수 토큰을 활용하는 K-EPICse를 적용하여 히든 스테이트를 출력하는, 한국어 관계 추출 방법.

According to claim 11,
The step of outputting the hidden state is
Korean relationship extraction method for outputting a hidden state by applying K-EPICse that utilizes special tokens added to both the front and back of the entity among the special tokens.

KR1020220019416A 2021-09-27 2022-02-15 Korean relation extraciton model and method with entity positon information KR20230044914A (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020210126945 2021-09-27
KR20210126945 2021-09-27

Publications (1)

Publication Number Publication Date
KR20230044914A true KR20230044914A (en) 2023-04-04

Family

ID=85928978

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220019416A KR20230044914A (en) 2021-09-27 2022-02-15 Korean relation extraciton model and method with entity positon information

Country Status (1)

Country Link
KR (1) KR20230044914A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102621869B1 (en) 2023-04-24 2024-01-05 고려대학교 산학협력단 Device and method for constructing dataset in korean document-level relation extraction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102621869B1 (en) 2023-04-24 2024-01-05 고려대학교 산학협력단 Device and method for constructing dataset in korean document-level relation extraction

Similar Documents

Publication Publication Date Title
CN110245348B (en) Intention recognition method and system
US10372821B2 (en) Identification of reading order text segments with a probabilistic language model
CN106897439B (en) Text emotion recognition method, device, server and storage medium
CN110276023B (en) POI transition event discovery method, device, computing equipment and medium
WO2020258502A1 (en) Text analysis method and apparatus, computer apparatus and computer storage medium
CN107688803B (en) Method and device for verifying recognition result in character recognition
KR20220122566A (en) Text recognition model training method, text recognition method, and apparatus
US10963647B2 (en) Predicting probability of occurrence of a string using sequence of vectors
US11875120B2 (en) Augmenting textual data for sentence classification using weakly-supervised multi-reward reinforcement learning
CN112906392A (en) Text enhancement method, text classification method and related device
KR20210149530A (en) Method for training image classification model and apparatus for executing the same
EP4170542A2 (en) Method for sample augmentation
KR20210065076A (en) Method, apparatus, device, and storage medium for obtaining document layout
KR20230044914A (en) Korean relation extraciton model and method with entity positon information
EP4060526A1 (en) Text processing method and device
CN113361523A (en) Text determination method and device, electronic equipment and computer readable storage medium
WO2024012284A1 (en) Audio recognition method and apparatus, and electronic device and computer program product
CN116167382A (en) Intention event extraction method and device, electronic equipment and storage medium
Kumari et al. A lexicon and depth-wise separable convolution based handwritten text recognition system
JP2017538226A (en) Scalable web data extraction
US20160078013A1 (en) Fault-tolerant input method editor
CN112801960B (en) Image processing method and device, storage medium and electronic equipment
CN106716308A (en) Input method editor for inputting names of geographic locations
CN115035890A (en) Training method and device of voice recognition model, electronic equipment and storage medium
CN114064010A (en) Front-end code generation method, device, system and storage medium

Legal Events

Date Code Title Description
E902 Notification of reason for refusal