KR20220065522A - Hostile paraphrase sentence automatic generation system - Google Patents

Hostile paraphrase sentence automatic generation system Download PDF

Info

Publication number
KR20220065522A
KR20220065522A KR1020200152126A KR20200152126A KR20220065522A KR 20220065522 A KR20220065522 A KR 20220065522A KR 1020200152126 A KR1020200152126 A KR 1020200152126A KR 20200152126 A KR20200152126 A KR 20200152126A KR 20220065522 A KR20220065522 A KR 20220065522A
Authority
KR
South Korea
Prior art keywords
hostile
paraphrase
sentence
candidate
natural language
Prior art date
Application number
KR1020200152126A
Other languages
Korean (ko)
Other versions
KR102648782B1 (en
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 한국전자통신연구원
Priority to KR1020200152126A priority Critical patent/KR102648782B1/en
Publication of KR20220065522A publication Critical patent/KR20220065522A/en
Application granted granted Critical
Publication of KR102648782B1 publication Critical patent/KR102648782B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • G06F40/35Discourse or dialogue representation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Abstract

The present invention relates to a system for automatically generating a hostile paraphrase sentence. The present invention comprises the steps of: receiving a natural language sentence input; recognizing whether hostile paraphrase is possible or not in the inputted natural language sentence; determining whether the hostile paraphrase is possible or not; generating a candidate sentence of the hostile paraphrase from the inputted natural language sentence when the hostile paraphrase is possible or not is recognized in the determining step; calculating each sentence score with respect to the generated candidate sentences of the hostile paraphrase; and selecting a hostile paraphrase sentence according to a sentence score result of the candidate sentence of the hostile paraphrase according to the generated sentence score. According to one embodiment of the present invention, the hostile paraphrase sentence can be generated into a hostile paraphrase sentence of a single object substitution type or an antonym type.

Description

적대적 패러프레이즈 문장 자동 생성 시스템{Hostile paraphrase sentence automatic generation system}Hostile paraphrase sentence automatic generation system

본 발명은 자연어 문장 이해 기술에 관한 것으로, 더욱 상세하게는 자연어 문장에서 적대적 패러프레이즈 문장을 생성하는 적대적 패러프레이즈 문장 자동 생성 시스템에 관한 것이다.The present invention relates to a technology for understanding natural language sentences, and more particularly, to a system for automatically generating an adversarial paraphrase sentence for generating an adversarial paraphrase sentence from a natural language sentence.

딥러닝 인공 신경망 기술의 발전과 함께 자연어를 이해하는 기술의 급속한 발전이 이루어지고 있다. With the development of deep learning artificial neural network technology, the technology to understand natural language is rapidly developing.

이러한 자연어 이해를 위해서는 문장 유사도 인식 기술 중 보통의 경우 두 문장의 어휘 공유율이 높을수록 동일 의미를 가질 가능성이 높다. For this natural language understanding, in general among sentence similarity recognition techniques, the higher the vocabulary sharing rate of two sentences, the higher the probability of having the same meaning.

일 예로, 적대적 패러프레이즈는 높은 어휘 공유율(Overlap)을 가지지만, 하기의 [표 1]에서와 같이, 동일 의미가 아닌 다른 의미를 가지도록 적대적 패러프레이즈만을 생성할 수 있다. As an example, although the hostile paraphrase has a high vocabulary overlap, as shown in [Table 1] below, only the hostile paraphrase can be generated to have a different meaning rather than the same meaning.

(문장1) 경찰청장은 아이유에게 홍보대사 임명장을 수여하였다.
(문장2) 아이유는 경찰청장에게 홍보대사 임명장을 수여하였다.
(Sentence 1) The Commissioner General of the National Police Agency awarded IU a letter of appointment as a public relations ambassador.
(Sentence 2) IU awarded the Commissioner General of the National Police Agency a letter of appointment as a public relations ambassador.
패러프레이즈 여부: X (양방향 개체 교환형 적대적 패러프레이즈)Paraphrase or not: X (two-way object exchange type hostile paraphrase)

이와 같이, 인공 신경망 모델은 자연어 처리 분야에서 이전과는 다른 높은 성능 향상을 보여주었다. As such, the artificial neural network model showed a high performance improvement unlike before in the field of natural language processing.

하지만, 적대적 예제 상황을 제대로 인식하지 못하는 단점이 발견됨에 따라, 최근 적대적 예제 말뭉치에 대해 학습을 수행하여 적대적 예제에 대한 견고성을 확보할 수 있다는 연구 결과가 나왔다. However, as the disadvantage of not properly recognizing adversarial example situations was discovered, a recent study showed that robustness against adversarial examples can be secured by learning the adversarial example corpus.

그러나, 종래 양방향 개체 교환형의 적대적 패러프레이즈 예제의 경우, 두 가지 관점에서 기술의 한계점을 확인하였다. 제 1 기술의 한계점은 실제 언어 환경에는 교환형 이외의 다양한 타입의 적대적 패러프레이즈 예제가 존재한다. However, in the case of the conventional two-way object exchange-type hostile paraphrase example, the limitations of the technology were confirmed from two viewpoints. The limitation of the first technique is that examples of hostile paraphrase of various types other than exchange type exist in the real language environment.

그중, 적대적 패러프레이즈의 경우, 단일 개체 대체형 타입(아래 예제 참조), 반의형 타입(아래 예제 참조), 부정형 타입, 수치 값 변형 타입 등이 존재한다. Among them, in the case of the hostile paraphrase, there are a single entity substitution type (see the example below), a antonym type (see the example below), an indeterminate type, and a numeric value transformation type.

그러나 일반적으로 인공신경망 기술에서 특정 타입을 학습하기 위해서는 해당 타입의 데이터가 필요하다. However, in general, in order to learn a specific type in artificial neural network technology, data of that type is required.

예를 들어 기계독해를 위해서는 기계독해 타입의 학습데이터가 필요하다. 하지만, 종래기술은 주로 개체 교환형 타입의 적대적 패러프레이즈만을 다루고 있다.For example, machine reading type learning data is needed for machine reading. However, the prior art mainly deals with only the hostile paraphrase of the object exchange type.

따라서, 종래 인공신경망 학습을 위해서는 대량의 적대적 예제 말뭉치 구축이 필요하나 사람이 직접 생성하게 되면 높은 비용 문제가 발생하는 문제점이 있다.Therefore, in order to learn the conventional artificial neural network, it is necessary to construct a large amount of hostile example corpus, but there is a problem in that a high cost problem occurs when a person directly creates it.

본 발명은 앞에서 언급한 종래기술의 한계점을 극복하기 위한 것으로, 적대적 패러프레이즈 문장을 자동으로 생성하는 방법 및 시스템을 제시하고자 한다. The present invention is to overcome the above-mentioned limitations of the prior art, and to present a method and system for automatically generating a hostile paraphrase sentence.

특히, 종래기술에서 다루지 않은 단일 개체 대체형 타입과 반의어형 타입의 적대적 패러프레이즈 문장을 자동으로 생성할 수 있는 기술을 제시하고자 한다.In particular, it is intended to present a technology capable of automatically generating hostile paraphrase sentences of single entity substitution type and antonym type, which are not addressed in the prior art.

본 발명의 목적은 이상에서 언급한 목적으로 제한되지 않으며, 언급되지 않은 또 다른 목적들은 아래의 기재로부터 당업자에게 명확하게 이해될 수 있을 것이다.The object of the present invention is not limited to the object mentioned above, and other objects not mentioned will be clearly understood by those skilled in the art from the following description.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 시스템은 입력된 자연어 문장에서 적대적 패러프레이즈 후보 문장을 생성하는 후보 문장 생성부; 상기 생성된 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산하는 문장성 스코어 계산부; 및 상기 생성된 문장성 스코어에 따라 적대적 패러프레이즈 후보 문장의 문장성 스코어 결과에 따라 적대적 패러프레이즈 문장을 선정하는 문장 선정부를 포함한다. In order to achieve the above object, an automatic hostile paraphrase sentence generation system according to an embodiment of the present invention includes: a candidate sentence generator for generating a hostile paraphrase candidate sentence from an input natural language sentence; a grammatical score calculation unit for calculating a grammatical score for each of the generated hostile paraphrase candidate sentences; and a sentence selection unit configured to select a hostile paraphrase sentence according to the grammatical score result of the hostile paraphrase candidate sentence according to the generated grammatical score.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 방법은 자연어 문장 입력을 입력받는 단계; 상기 입력된 자연어 문장에서 적대적 패러프레이즈 가능 여부를 인식하는 단계; 적대적 패러프레이즈 가능 여부가 인식되는 지를 판단하는 단계; 상기 판단 단계에서, 적대적 패러프레이즈 가능 여부가 인식되면, 입력된 자연어 문장에서 적대적 패러프레이즈 후보 문장을 생성하는 단계; 상기 생성된 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산하는 단계; 및 상기 생성된 문장성 스코어에 따라 적대적 패러프레이즈 후보 문장의 문장성 스코어 결과에 따라 적대적 패러프레이즈 문장을 선정하는 단계를 포함한다. According to an embodiment of the present invention for achieving the above object, there is provided a method for automatically generating a hostile paraphrase sentence, the method comprising: receiving a natural language sentence input; recognizing whether a hostile paraphrase is possible in the input natural language sentence; determining whether hostile paraphrase is possible; generating an adversarial paraphrase candidate sentence from the input natural language sentence if it is recognized in the determining step whether a hostile paraphrase is possible; calculating a grammatical score for each of the generated hostile paraphrase candidate sentences; and selecting a hostile paraphrase sentence according to a grammatical score result of the antagonistic paraphrase candidate sentence according to the generated grammatical score.

한편, 상기 적대적 패러프레이즈 후보 문장은 단일 개체 대체형의 적대적 패러프레이즈, 반의어형 적대적 패러프레이즈 중 하나 이상이다. On the other hand, the antagonistic paraphrase candidate sentence is at least one of a single entity substitution type hostile paraphrase and an antonym type hostile paraphrase.

여기서, 상기 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산하는 단계는, bi-gram와 같은 언어 모델을 이용하여 계산할 수 있다. Here, the step of calculating the grammatical score of each of the adversarial paraphrase candidate sentences may be calculated using a language model such as a bi-gram.

상기 적대적 패러프레이즈 문장을 선정하는 단계는, 기설정된 임계 스코어 이하인 적대적 패러프레이즈 후보 문장을 적대적 패러프레이즈 문장으로 선정할 수 있다. In the selecting of the hostile paraphrase sentence, a hostile paraphrase candidate sentence having a predetermined threshold score or less may be selected as the hostile paraphrase sentence.

상기 적대적 패러프레이즈 문장을 선정하는 단계는, 상기 적대적 패러프레이즈 후보 문장 중 스코어가 높은 top-K 개를 최종 결과로 선정할 수 있다. In the selecting of the hostile paraphrase sentences, top-K pieces of the hostile paraphrase candidate sentences having a high score may be selected as a final result.

상기 적대적 패러프레이즈 문장을 선정하는 단계는, 상기 적대적 패러프레이즈 후보 문장 중 스코어가 높은 top-N 개를 선택한 후에 랜덤하게 K개를 최종 결과로 선정할 수 있다. In the selecting of the hostile paraphrase sentences, the top-N pieces of the hostile paraphrase candidate sentences having a high score may be selected, and then K may be randomly selected as the final result.

상기 적대적 패러프레이즈 후보 문장을 생성하는 단계는, 입력되는 자연어 문장에 개체명이 존재하는지를 판단하는 단계; 상기 판단 단계에서 입력되는 자연어 문장에 개체명이 존재하면, 개체 대체형 타입의 적대적 패러프레이즈 문장을 생성하는 단계를 포함한다. The generating of the hostile paraphrase candidate sentence may include: determining whether an entity name exists in an input natural language sentence; and generating a hostile paraphrase sentence of the entity substitution type if the entity name exists in the natural language sentence input in the determining step.

그리고, 개체 대체형 타입의 적대적 패러프레이즈 문장을 생성하는 단계는, And, the step of generating a hostile paraphrase sentence of the object substitution type is,

대체 대상 개체명들을 선택하는 단계; 유사 의미 개체명의 선정 제거를 위해, 개체명 사이의 종속 관계 정보를 포함하는 개체명 사전을 통해 선택된 대체 대상 개체명을 선정하는 단계; 및 상기 입력 문장에서 상기 선정된 대체 대상 개체명으로 개체명을 대체하는 단계를 포함한다. selecting replacement target entity names; selecting a replacement target entity name selected through an entity name dictionary including information on a dependency relationship between entity names in order to select and remove similar semantic entity names; and substituting an entity name in the input sentence with the selected replacement target entity name.

그리고, 상기 대체할 개체명을 선정할 때에는 종속관계나 유사관계의 개체명은 제외하는 것이 바람직하다. In addition, when selecting the name of the entity to be replaced, it is preferable to exclude the name of the entity having a dependent relationship or similar relationship.

본 발명의 일 실시예에 따르면, 적대적 패러프레이즈 문장을 단일 개체 대체형 타입과 반의어형 타입의 적대적 패러프레이즈 문장으로 생성할 수 있는 효과가 있다. According to an embodiment of the present invention, there is an effect that a hostile paraphrase sentence can be generated as a hostile paraphrase sentence of a single entity substitution type and an antonym type.

도 1은 본 발명에 따른 적대적 패러프레이즈 문장 자동 생성 시스템을 설명하기 위한 구성블록도.
도 2는 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 방법을 설명하기 위한 순서도.
도 3은 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 방법 중 반의어형의 적대적 패러프레이즈 문장 생성 방법을 설명하기 위한 순서도.
도 4는 본 발명의 일 실시예에 따른 상기 적대적 패러프레이즈 후보 문장을 생성하는 단계의 세부 단계를 설명하기 위한 순서도.
도 5는 본 발명의 일 실시예에서 개체 대체형 타입의 적대적 패러프레이즈 문장을 생성하는 단계의 세부 단계를 설명하기 위한 순서도.
도 6은 본 발명의 일 실시예에서 대체 대상 개체명을 선정하는 단계의 세부 단계를 설명하기 위한 순서도.
도 7은 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장을 선정하는 단계의 세부 단계를 설명하기 위한 순서도이다.
1 is a block diagram illustrating an automatic hostile paraphrase sentence generation system according to the present invention.
2 is a flowchart for explaining a method for automatically generating a hostile paraphrase sentence according to an embodiment of the present invention.
3 is a flowchart for explaining a method for generating a hostile paraphrase sentence of an antonym among a method for automatically generating a hostile paraphrase sentence according to an embodiment of the present invention;
4 is a flowchart for explaining the detailed steps of generating the hostile paraphrase candidate sentence according to an embodiment of the present invention.
5 is a flowchart for explaining detailed steps of generating an object substitution type hostile paraphrase sentence in an embodiment of the present invention;
6 is a flowchart for explaining the detailed steps of the step of selecting a replacement object name in an embodiment of the present invention.
7 is a flowchart for explaining the detailed steps of selecting a hostile paraphrase sentence according to an embodiment of the present invention.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 후술되어 있는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 이하에서 개시되는 실시예들에 한정되는 것이 아니라 서로 다른 다양한 형태로 구현될 것이며, 단지 본 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이며, 본 발명은 청구항의 범주에 의해 정의될 뿐이다. 한편, 본 명세서에서 사용된 용어는 실시예들을 설명하기 위한 것이며 본 발명을 제한하고자 하는 것은 아니다. 본 명세서에서, 단수형은 문구에서 특별히 언급하지 않는 한 복수형도 포함한다. 명세서에서 사용되는 "포함한다(comprises)" 및/또는 "포함하는(comprising)"은 언급된 구성소자, 단계, 동작 및/또는 소자는 하나 이상의 다른 구성소자, 단계, 동작 및/또는 소자의 존재 또는 추가를 배제하지 않는다. Advantages and features of the present invention and methods of achieving them will become apparent with reference to the embodiments described below in detail in conjunction with the accompanying drawings. However, the present invention is not limited to the embodiments disclosed below, but will be implemented in a variety of different forms, and only these embodiments allow the disclosure of the present invention to be complete, and common knowledge in the technical field to which the present invention belongs It is provided to fully inform the possessor of the scope of the invention, and the present invention is only defined by the scope of the claims. On the other hand, the terms used herein are for the purpose of describing the embodiments and are not intended to limit the present invention. In this specification, the singular also includes the plural unless specifically stated otherwise in the phrase. As used herein, "comprises" and/or "comprising" refers to the presence of one or more other components, steps, operations and/or elements mentioned. or addition is not excluded.

도 1은 본 발명에 따른 적대적 패러프레이즈(다른 표현으로 바꿔쓰기 또는 의역) 문장 자동 생성 시스템을 설명하기 위한 구성블록도이다. 1 is a block diagram illustrating an automatic hostile paraphrase (rewriting or paraphrasing) sentence automatic generation system according to the present invention.

도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 시스템은 후보 문장 생성부(100), 문장성 스코어 계산부(200) 및 문장 선정부(300)를 포함한다. As shown in FIG. 1 , the system for automatically generating hostile paraphrase sentences according to an embodiment of the present invention includes a candidate sentence generation unit 100 , a punctuation score calculation unit 200 , and a sentence selection unit 300 . .

후보 문장 생성부(100)는 입력된 자연어 문장에서 적대적 패러프레이즈 후보 문장을 생성한다. The candidate sentence generating unit 100 generates a hostile paraphrase candidate sentence from the input natural language sentence.

그리고 문장성 스코어 계산부(200)는 상기 생성된 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산한다. In addition, the grammatical score calculation unit 200 calculates a grammatical score for each of the generated hostile paraphrase candidate sentences.

또한 문장 선정부(300)는 상기 생성된 문장성 스코어에 따라 적대적 패러프레이즈 후보 문장의 문장성 스코어 결과에 따라 적대적 패러프레이즈 문장을 선정한다. In addition, the sentence selection unit 300 selects the hostile paraphrase sentence according to the grammatical score result of the hostile paraphrase candidate sentence according to the generated grammatical score.

도 2는 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 방법을 설명하기 위한 순서도이다. 2 is a flowchart illustrating a method for automatically generating a hostile paraphrase sentence according to an embodiment of the present invention.

이하, 하기에서는 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 방법에 대하여 도 2를 참조하여 설명하기로 한다. Hereinafter, a method for automatically generating a hostile paraphrase sentence according to an embodiment of the present invention will be described with reference to FIG. 2 .

자연어 문장 입력을 입력받는다(S100). A natural language sentence input is received (S100).

입력된 자연어 문장에서 적대적 패러프레이즈 가능 여부를 인식한다(S200). It is recognized whether a hostile paraphrase is possible in the input natural language sentence (S200).

이후, 적대적 패러프레이즈 가능 여부가 인식되는 지를 판단한다(S300). Thereafter, it is determined whether the hostile paraphrase is possible or not (S300).

상기 판단 단계(S300)에서, 적대적 패러프레이즈 가능 여부가 인식되면(YES), 입력된 자연어 문장에서 적대적 패러프레이즈 후보 문장을 생성하고(S400), 적대적 패러프레이즈 가능 여부가 인식되지 않으면(YES) 종료한다. In the determination step (S300), if hostile paraphrase possibility is recognized (YES), a hostile paraphrase candidate sentence is generated from the input natural language sentence (S400), and if hostile paraphrase possibility is not recognized (YES), it ends do.

본 실시예에서의 상기 적대적 패러프레이즈 후보 문장은 단일 개체 대체형의 적대적 패러프레이즈, 반의어형 적대적 패러프레이즈 중 하나 이상이다. The antagonistic paraphrase candidate sentences in this embodiment are at least one of a single entity substitution type hostile paraphrase and an antonym type hostile paraphrase.

이하, 하기에서는 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장 자동 생성 방법 중 반의어형의 적대적 패러프레이즈 문장 생성 방법에 대하여 도 3을 참조하여 설명하기로 한다. Hereinafter, a method for generating a hostile paraphrase sentence of an antonym among a method for automatically generating a hostile paraphrase sentence according to an embodiment of the present invention will be described with reference to FIG. 3 .

아래에서는 반의어형의 적대적 패러프레이즈 문장 생성에 대해 좀 더 상세하게 다룬다. Below, we deal in more detail with the creation of antonyms of hostile paraphrase sentences.

먼저, 입력되는 자연어 문장에서 어휘를 분리하여 추출한다(S400-b10). 본 실시예에서의 어휘 분리 추출은 중의성이 해소(Word Sense Disambiguation)된 단위인 것을 특징으로 한다. First, the vocabulary is separated and extracted from the input natural language sentence (S400-b10). Vocabulary separation extraction in this embodiment is characterized in that it is a word sense disambiguation unit.

이어서, 교체 가능한 어휘가 존재하는지 판단한다(S400-b20). 이때, 교체 가능 여부는 반의어 사전(420)을 이용하여 판단한다. 즉, 해당 어휘가 반의어 사전(420)에 존재하는 경우 교체 가능함을 의미하며, 존재하는 경우가 적대적 패러프레이즈 가능을 의미한다. Next, it is determined whether a replaceable vocabulary exists (S400-b20). In this case, whether the replacement is possible is determined using the antonym dictionary 420 . That is, if the corresponding vocabulary exists in the antonym dictionary 420, it means that it is replaceable, and if it exists, it means that a hostile paraphrase is possible.

교체 가능한 각각의 어휘에 대해 반의어 어휘로 교체를 하여 후보 문장을 생성한다. Candidate sentences are generated by replacing each replaceable vocabulary with an antonym vocabulary.

이후, 상기 생성된 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산한다(S500). 여기서, 상기 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산하는 단계(S500)는 bi-gram와 같은 언어 모델을 이용하여 계산할 수 있다. 이외의 다른 모델의 적용도 가능하다. Thereafter, each punctuation score is calculated for the generated hostile paraphrase candidate sentences (S500). Here, the step ( S500 ) of calculating each grammatical score for the adversarial paraphrase candidate sentences may be calculated using a language model such as a bi-gram. Other models can also be applied.

[수학식 1] [Equation 1]

Figure pat00001
Figure pat00001

여기서, perplexity(PPL)는 문장성 스코어이다. Here, perplexity (PPL) is a sentence sentence score.

그리고 상기 bi-gram와 같은 언어 모델을 이용한 스코어는, [수학식 2]와 같이 표현될 수 있다. And the score using a language model such as the bi-gram can be expressed as [Equation 2].

[수학식 2][Equation 2]

Figure pat00002
Figure pat00002

이하, 하기에서는 본 발명의 일 실시예에 따른 상기 적대적 패러프레이즈 후보 문장을 생성하는 단계(S500)의 세부 단계에 대하여 도 4를 참조하여 설명하기로 한다. Hereinafter, detailed steps of generating the hostile paraphrase candidate sentence ( S500 ) according to an embodiment of the present invention will be described with reference to FIG. 4 .

먼저, 입력되는 자연어 문장에 개체명이 존재하는지를 판단한다(S310). First, it is determined whether an entity name exists in the input natural language sentence (S310).

상기 판단 단계(S310)에서 입력되는 자연어 문장에 개체명이 존재하면(YES), 개체 대체형 타입의 적대적 패러프레이즈 문장을 생성한다(S410). If the entity name exists in the natural language sentence input in the determination step S310 (YES), a hostile paraphrase sentence of the entity substitution type is generated (S410).

이하, 하기에서는 개체 대체형 타입의 적대적 패러프레이즈 문장을 생성하는 단계(S410)에 대하여 도 5를 참조하여 설명하기로 한다. Hereinafter, the step ( S410 ) of generating the object substitution type hostile paraphrase sentence will be described with reference to FIG. 5 .

대체 대상 개체명들을 선택한다(S411). Substitute object names are selected (S411).

유사 의미 개체명의 선정 제거를 위해, 개체명 사이의 종속 관계 정보를 포함하는 개체명 사전(410)을 통해 선택된 대체 대상 개체명을 선정한다(S412). In order to select and remove similar semantic entity names, a selected replacement target entity name is selected through the entity name dictionary 410 including information on the dependency relationship between entity names ( S412 ).

상기 입력 문장에서 상기 선정된 대체 대상 개체명으로 개체명을 대체한다(S413). The entity name is replaced with the selected replacement target entity name in the input sentence (S413).

상기 대체할 개체명을 선정할 때에는 종속관계나 유사관계의 개체명은 제외하는 것이 바람직하다. 본 발명의 일 실시예에서의 종속 관계는 “대전지방경찰청 > 대전서부경찰서”, 유사관계는 “도룡동경찰파출소 > 도룡동경찰지구대”와 같을 수 있다. When selecting the name of the entity to be replaced, it is preferable to exclude the name of the entity in the dependent or similar relation. In an embodiment of the present invention, the subordinate relationship may be "Daejeon Provincial Police Agency > Daejeon Western Police Station", and the similar relationship may be "Doryong-dong Police Station > Doryong-dong Police Division".

이하, 하기에서는 대체 대상 개체명을 대체할 개체명으로 대체한 예에 대하여 설명하기로 한다. Hereinafter, an example in which the name of the object to be replaced is replaced with the name of the object to be replaced will be described.

(입력문장) '경찰청장은 아이유에게 홍보대사 임명장을 수여하였다.' (Input sentence) 'The Commissioner of the National Police Agency awarded IU a letter of appointment as a public relations ambassador.'

대체 대상 개체명: '경찰청장', 대체할 개체명: '질병관리청장' Substituted entity name: 'President of the National Police Agency', Substituted entity name: 'KCDC'

(신규 생성 문장) '질병관리청장은 아이유에게 홍보대사 임명장을 수여하였다.'와 같이, 검출된 대체 대상 개체명을 변경해 가면서, 적대적 패러프레이즈 문장들을 생성할 수 있다. (Newly generated sentences) As in 'The Director of the Centers for Disease Control and Prevention has awarded IU a letter of appointment as a public relations ambassador.'

유사 의미 개체명의 선정 제거를 위해, 개체명 사이의 종속 관계 정보를 포함하는 개체명 사전(410)을 통해 선택된 대체 대상 개체명을 선정한다. In order to select and remove similar semantic entity names, the selected replacement target entity name is selected through the entity name dictionary 410 including information on the dependency relationship between entity names.

상기 대체 개체명 선정 시, 종속관계 및 유사관계 정보를 이용하는 방법은 다음과 같다. The method of using the dependency relationship and similarity relationship information when selecting the alternative entity name is as follows.

먼저, 대체 대상 개체명이 선정되면, 개체명 사전(410)을 통해 대체 개체명 후보를 다수개 선정한다. 여기서, 대체 개체명 후보는 개체명 사전(410)에서 랜덤하게 선정할 수도 있다. 단 개체명 사전(410)에서 후보 집합은 동일 카테고리 내의 개체명으로 한정할 수 있다.First, when a replacement target entity name is selected, a plurality of replacement entity name candidates are selected through the entity name dictionary 410 . Here, the alternative entity name candidates may be randomly selected from the entity name dictionary 410 . However, the candidate set in the entity name dictionary 410 may be limited to entity names within the same category.

동일 카테고리라 함은 “개체명:개체타입”에서 “개체타입”이 동일함을 의미한다. 예를 들어, 대체할 개체명이 “경찰청장:PS_POSITION”이면, 개체타입이 “PS_POSITION”인 개체명이 후보가 될 수 있다.The same category means that “object type” in “object name: object type” is the same. For example, if the name of the entity to be replaced is “The Commissioner of the National Police Agency: PS_POSITION”, the entity name whose entity type is “PS_POSITION” can be a candidate.

상기 유사 의미 개체명의 선정 제거를 위해, 개체명 사이의 종속 관계 정보를 포함하는 개체명 사전(410)을 통해 선택된 대체 대상 개체명을 선정하는 단계(S412)의 세부 단계에 대하여 도 6을 참조하여 설명하기로 한다. For the detailed steps of selecting a replacement target entity name selected through the entity name dictionary 410 including dependency relationship information between entity names (S412) in order to select and remove the similar semantic entity names, refer to FIG. 6 to explain

먼저, 개체명 사전(410)으로부터 대체 개체명 후보 다수개를 선정한다(S412-b21). 여기서, 대체 개체명 후보는 개체명 사전(410)에서 랜덤하게 선정할 수 있다. 단, 개체명 사전(410)에서 후보 집합은 동일 카테고리 내의 개체명으로 한정할 수 있다. 그리고, 동일 카테고리라 함은 “개체명:개체타입”에서 “개체타입”이 동일함을 의미한다. 예를 들어, 대체할 개체명이 “경찰청장:PS_POSITION”이면, 개체타입이 “PS_POSITION”인 개체명이 후보가 될 수 있다. First, a plurality of alternative object name candidates are selected from the object name dictionary 410 (S412-b21). Here, the alternative entity name candidates may be randomly selected from the entity name dictionary 410 . However, the candidate set in the entity name dictionary 410 may be limited to entity names within the same category. And, the same category means that “object type” in “object name: object type” is the same. For example, if the name of the entity to be replaced is “The Commissioner of the National Police Agency: PS_POSITION”, the entity name whose entity type is “PS_POSITION” can be a candidate.

이후, 인공신경망 표현(representation) 사전(430)에서 대체 대상 개체명 및 후보 개체명 각각에 대해 인공신경망 표현(representation)을 로딩한다(S412-b22). 여기서, 개체명에 대한 인공 신경망 표현은 word2vec[1]이나 Glove[2] 등과 같은 인공 신경망 학습에 의해 구축된 실수 벡터 형식을 가진다. Thereafter, the artificial neural network representation is loaded for each of the replacement target entity name and the candidate entity name in the artificial neural network representation dictionary 430 ( S412-b22 ). Here, the artificial neural network representation for the entity name has a real vector format constructed by artificial neural network learning such as word2vec[1] or Glove[2].

이어서, 앞서 로딩된 개체명 인공신경망 표현을 이용하여 대체 대상 개체명과 후보 개체명 각각에 대한 유사도를 계산한다(S412-b23). 본 실시예에서의 유사도 계산은 벡터 표현(vector representation)에 적용 가능한 방법들 중에서 선택이 가능하다. 예를 들어, 코사인 유사도, 벡터 내적(inner product) 등이 유사도 계산에 적용될 수 있다. Next, the degree of similarity for each of the object name to be replaced and the name of the candidate object is calculated using the previously loaded artificial neural network expression for the object name (S412-b23). The similarity calculation in this embodiment can be selected from among methods applicable to a vector representation. For example, cosine similarity, vector inner product, etc. may be applied to the similarity calculation.

이후, 대체 대상 개체명과 유사도가 낮은 순으로 N개의 후보 개체명을 선정한다(S412-b24). 본 실시예에서는 적대적 패러프레이즈 생성을 위한 의미관계가 먼 개체명을 선택하기 위해서 유사도가 낮은 개체명을 선택하였다. Thereafter, N candidate object names are selected in the order of lower similarity to the replacement object names (S412-b24). In this embodiment, in order to select an entity name with a distant semantic relationship for generating a hostile paraphrase, an entity name with a low similarity is selected.

이후, 문장성 스코어 결과에 따라, 적대적 패러프레이즈 문장을 선정한다(S600). Thereafter, a hostile paraphrase sentence is selected according to the sentence sentence score result (S600).

이하, 하기에서는 본 발명의 일 실시예에 따른 적대적 패러프레이즈 문장을 선정하는 단계(S600)의 세부 단계에 대하여 도 7을 참조하여 설명하기로 한다. Hereinafter, detailed steps of the step ( S600 ) of selecting a hostile paraphrase sentence according to an embodiment of the present invention will be described with reference to FIG. 7 .

먼저, 상기 입력되는 자연어 문장에 포함된 어휘 중에서 대체 대상 어휘를 선택한다(S421). 여기서, 대체 가능한 어휘는 동사, 형용사 명사, 부사로 한정할 수 있다. 명사는 서술성 명사로 한정할 수 있다. 서술성 명사는 '하다', '되다' 등의 어미를 붙여서 동사형으로 만들 수 있는 명사를 의미한다. 예를 들어, 강요(하다), 잠식(하다) 등이 서술성 명사에 해당된다. First, a replacement target vocabulary is selected from among the vocabulary included in the input natural language sentence (S421). Here, the replaceable vocabulary may be limited to verbs, adjectives, nouns, and adverbs. Nouns can be limited to descriptive nouns. A descriptive noun means a noun that can be made into a verb form by adding endings such as 'have' or 'become'. For example, coercion (have) and encroach (have) are descriptive nouns.

이어서, 교체 가능한 후보 어휘에 대해 반의어 사전(420)으로부터 반의어를 선정한다(S422).Next, an antonym is selected from the antonym dictionary 420 for the replaceable candidate vocabulary ( S422 ).

이후, 대체 대상 어휘를 대체할 반의어로 대체하여 새로운 적대적 패러프레이즈 문장을 생성한다(S423).Thereafter, a new hostile paraphrase sentence is generated by replacing the replacement target vocabulary with the replacement antonym (S423).

이와 같이, 상기 과정을 통해 대체 가능한 어휘들에 대해 반복하여 다수개의 적대적 패러프레이즈 문장을 생성할 수 있다. In this way, it is possible to generate a plurality of hostile paraphrase sentences by repeating the replaceable vocabulary through the above process.

상기 생성된 문장성 스코어에 따라 적대적 패러프레이즈 후보 문장의 문장성 스코어 결과에 따라 적대적 패러프레이즈 문장을 선정한다(S600). 여기서, 상기 적대적 패러프레이즈 문장을 선정하는 단계(S600)는, 기설정된 임계 스코어 이하인 적대적 패러프레이즈 후보 문장을 적대적 패러프레이즈 문장으로 선정한다. A hostile paraphrase sentence is selected according to the grammatical score result of the hostile paraphrase candidate sentence according to the generated grammatical score (S600). Here, in the step of selecting the hostile paraphrase sentence ( S600 ), a hostile paraphrase candidate sentence having a preset threshold score or less is selected as the hostile paraphrase sentence.

한편, 상기 적대적 패러프레이즈 문장을 선정하는 단계(S600)는 상기 적대적 패러프레이즈 후보 문장 중 스코어가 높은 top-K 개를 최종 결과로 선정할 수도 있다. On the other hand, in the step of selecting the hostile paraphrase sentence ( S600 ), the top-K pieces of the hostile paraphrase candidate sentences having a high score may be selected as the final result.

그리고, 상기 적대적 패러프레이즈 문장을 선정하는 단계(S600)는 상기 적대적 패러프레이즈 후보 문장 중 스코어가 높은 top-N 개를 선택한 후에 랜덤하게 K개를 최종 결과로 선정할 수도 있다. In addition, in the step of selecting the hostile paraphrase sentences ( S600 ), after selecting the top-N pieces of the hostile paraphrase candidate sentences with a high score, K may be randomly selected as the final result.

이상, 본 발명의 구성에 대하여 첨부 도면을 참조하여 상세히 설명하였으나, 이는 예시에 불과한 것으로서, 본 발명이 속하는 기술분야에 통상의 지식을 가진자라면 본 발명의 기술적 사상의 범위 내에서 다양한 변형과 변경이 가능함은 물론이다. 따라서 본 발명의 보호 범위는 전술한 실시예에 국한되어서는 아니되며 이하의 특허청구범위의 기재에 의하여 정해져야 할 것이다.As mentioned above, although the configuration of the present invention has been described in detail with reference to the accompanying drawings, this is merely an example, and those skilled in the art to which the present invention pertains can make various modifications and changes within the scope of the technical spirit of the present invention. Of course, this is possible. Therefore, the protection scope of the present invention should not be limited to the above-described embodiments and should be defined by the description of the following claims.

Claims (1)

자연어 문장 입력을 입력받는 단계;
상기 입력된 자연어 문장에서 적대적 패러프레이즈 가능 여부를 인식하는 단계;
적대적 패러프레이즈 가능 여부가 인식되는 지를 판단하는 단계;
상기 판단 단계에서, 적대적 패러프레이즈 가능 여부가 인식되면,
입력된 자연어 문장에서 적대적 패러프레이즈 후보 문장을 생성하는 단계;
상기 생성된 적대적 패러프레이즈 후보 문장들에 대하여 각각의 문장성 스코어를 계산하는 단계; 및
상기 생성된 문장성 스코어에 따라 적대적 패러프레이즈 후보 문장의 문장성 스코어 결과에 따라 적대적 패러프레이즈 문장을 선정하는 단계를 포함하는 적대적 패러프레이즈 문장 자동 생성 방법.
receiving a natural language sentence input;
recognizing whether a hostile paraphrase is possible in the input natural language sentence;
determining whether hostile paraphrase is possible;
In the determination step, if it is recognized whether a hostile paraphrase is possible,
generating an adversarial paraphrase candidate sentence from the input natural language sentence;
calculating a grammatical score for each of the generated hostile paraphrase candidate sentences; and
and selecting a hostile paraphrase sentence according to the syntactic score result of the hostile paraphrase candidate sentence according to the generated grammatical score.
KR1020200152126A 2020-11-13 2020-11-13 Hostile paraphrase sentence automatic generation system KR102648782B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020200152126A KR102648782B1 (en) 2020-11-13 2020-11-13 Hostile paraphrase sentence automatic generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200152126A KR102648782B1 (en) 2020-11-13 2020-11-13 Hostile paraphrase sentence automatic generation system

Publications (2)

Publication Number Publication Date
KR20220065522A true KR20220065522A (en) 2022-05-20
KR102648782B1 KR102648782B1 (en) 2024-03-19

Family

ID=81798372

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200152126A KR102648782B1 (en) 2020-11-13 2020-11-13 Hostile paraphrase sentence automatic generation system

Country Status (1)

Country Link
KR (1) KR102648782B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170025424A (en) * 2015-08-28 2017-03-08 한국과학기술원 Paraphrase sentence generation method for a korean language sentence
JP2017156799A (en) * 2016-02-29 2017-09-07 学校法人甲南学園 Script automatic creation device, script automatic creation method, and script automatic creation program
KR20190133931A (en) * 2018-05-24 2019-12-04 한국과학기술원 Method to response based on sentence paraphrase recognition for a dialog system
KR20200061877A (en) * 2018-11-26 2020-06-03 주식회사 솔트룩스 System and method for generating paraphrase sentence based on ontology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170025424A (en) * 2015-08-28 2017-03-08 한국과학기술원 Paraphrase sentence generation method for a korean language sentence
JP2017156799A (en) * 2016-02-29 2017-09-07 学校法人甲南学園 Script automatic creation device, script automatic creation method, and script automatic creation program
KR20190133931A (en) * 2018-05-24 2019-12-04 한국과학기술원 Method to response based on sentence paraphrase recognition for a dialog system
KR20200061877A (en) * 2018-11-26 2020-06-03 주식회사 솔트룩스 System and method for generating paraphrase sentence based on ontology

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"자연어처리 : 언어모델 : Perplexity", [url:https://mambo-coding-note.tistory.com/250], 2020.03.06, pp.1-5. 1부.* *
Javid Ebrahimi 외 3명, "HotFlip: White-Box Adversarial Examples for Text Classification", arXiv:1712.06751v2, 2018.05., pp.1-6. 1부.* *

Also Published As

Publication number Publication date
KR102648782B1 (en) 2024-03-19

Similar Documents

Publication Publication Date Title
US10176804B2 (en) Analyzing textual data
US10796105B2 (en) Device and method for converting dialect into standard language
US11151318B2 (en) System and method for detecting undesirable and potentially harmful online behavior
US7295965B2 (en) Method and apparatus for determining a measure of similarity between natural language sentences
US7412385B2 (en) System for identifying paraphrases using machine translation
JP2764343B2 (en) Clause / phrase boundary extraction method
CN102439590A (en) System and method for automatic semantic labeling of natural language texts
JP2008539476A (en) Spelling presentation generation method and system
Dien et al. POS-tagger for English-Vietnamese bilingual corpus
KR20200014047A (en) Method, system and computer program for knowledge extension based on triple-semantic
CN110678868A (en) Translation support system and the like
KR20190065665A (en) Apparatus and method for recognizing Korean named entity using deep-learning
US20220019737A1 (en) Language correction system, method therefor, and language correction model learning method of system
Grif et al. Semantic analyses of text to translate to Russian sign language
JP2019144706A (en) Device, method and program for learning relationship estimation model
KR20220065522A (en) Hostile paraphrase sentence automatic generation system
Baker et al. Semantically-informed syntactic machine translation: A tree-grafting approach
Shivahare et al. Survey Paper: Study of Sentiment Analysis and Machine Translation using Natural Language Processing and its Applications
Khan et al. Enhancement of sentiment analysis by utilizing noisy social media texts
Singh et al. Iit (bhu) varanasi at msr-srst 2018: A language model based approach for natural language generation
US20240160839A1 (en) Language correction system, method therefor, and language correction model learning method of system
CN117473961B (en) Market document generation method and system based on large language model
Schlippe et al. Multilingual Text Simplification and its Performance on Social Sciences Coursebooks
KR102571400B1 (en) Apparatus and method for retrieval of clinical trial data
JP3100556B2 (en) Part-of-speech device

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant