KR20210086192A - Text summarization using sentiment score with sequence-to-sequence - Google Patents
Text summarization using sentiment score with sequence-to-sequence Download PDFInfo
- Publication number
- KR20210086192A KR20210086192A KR1020190179964A KR20190179964A KR20210086192A KR 20210086192 A KR20210086192 A KR 20210086192A KR 1020190179964 A KR1020190179964 A KR 1020190179964A KR 20190179964 A KR20190179964 A KR 20190179964A KR 20210086192 A KR20210086192 A KR 20210086192A
- Authority
- KR
- South Korea
- Prior art keywords
- sentences
- score
- extracting
- text
- processing method
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
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)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
본 명세서는 감정점수를 활용한 시퀀스-투-시퀀스 기반의 텍스트 요약에 관한 것이다.This specification relates to a sequence-to-sequence-based text summary using emotion scores.
인공지능 기술은 기계학습(딥러닝) 및 기계학습을 활용한 요소 기술들로 구성된다.Artificial intelligence technology consists of machine learning (deep learning) and elemental technologies using machine learning.
기계학습은 입력 데이터들의 특징을 스스로 분류/학습하는 알고리즘 기술이며, 요소기술은 딥러닝 등의 기계학습 알고리즘을 활용하여 인간 두뇌의 인지, 판단 등의 기능을 모사하는 기술로서, 언어적 이해, 시각적 이해, 추론/예측, 지식 표현, 동작 제어 등의 기술 분야로 구성된다.Machine learning is an algorithm technology that categorizes/learns the characteristics of input data by itself, and element technology uses machine learning algorithms such as deep learning to simulate functions such as cognition and judgment of the human brain. It consists of technical fields such as understanding, reasoning/prediction, knowledge expression, and motion control.
한편, 방대한 양의 데이터를 학습시키기 위하여 데이터의 길이를 잘라서 학습시키는 경우가 기계번역에서는 많다. 하지만, 데이터를 자르는 기준이 명확하지 않으므로 텍스트 데이터에서 중요한 부분을 누락하는 경우가 있다.On the other hand, there are many cases in machine translation where the length of data is cut to learn a large amount of data. However, since the criteria for truncating data are not clear, important parts of text data are sometimes omitted.
본 명세서는 전술한 필요성 및/또는 문제점을 해결하는 것을 목적으로 한다.SUMMARY OF THE INVENTION The present specification aims to solve the above-mentioned needs and/or problems.
또한, 본 명세서는, 학습 데이터의 길이를 처리하는 과정에서 중요한 문장 또는 단어를 누락하지 않을 수 있는 감정점수를 활용한 시퀀스-투-시퀀스 기반의 텍스트 요약을 구현하는 것을 목적으로 한다.In addition, the present specification aims to implement a sequence-to-sequence-based text summary using emotion scores that may not omit important sentences or words in the process of processing the length of training data.
또한, 본 명세서는, 감정인자를 이용하여 학습 데이터의 질이 향상하고, 좋은 학습 성능을 도출할 수 있는 감정점수를 활용한 시퀀스-투-시퀀스 기반의 텍스트 요약을 구현하는 것을 목적으로 한다.In addition, the present specification aims to implement a sequence-to-sequence-based text summary using emotional scores that can improve the quality of learning data and derive good learning performance using emotional factors.
본 명세서의 일 실시예에 따른 언어처리방법은 복수의 문서로부터 복수의 문장을 추출하는 단계;상기 복수의 문장의 감정점수를 생성하는 단계;상기 감정점수에 기반하여 상기 복수의 문장 중 적어도 일부를 추출하는 단계; 및 상기 추출된 문장을 입력으로 미리 학습된 언어모델(language model)에 적용하여, 적어도 하나의 후보 텍스트(text prediction candidates)를 생성하는 단계를 포함한다. A language processing method according to an embodiment of the present specification includes the steps of: extracting a plurality of sentences from a plurality of documents; generating emotional scores of the plurality of sentences; based on the emotional scores, at least some of the plurality of sentences extracting; and generating at least one text prediction candidates by applying the extracted sentences to a pre-trained language model as an input.
또한, 상기 복수의 문서는 복수의 도메인으로 설정된 문서를 포함할 수 있다. Also, the plurality of documents may include documents set to a plurality of domains.
또한, 상기 감정점수는 긍정점수, 부정점수, 중립점수, 또는 혼합점수를 포함할 수 있다.In addition, the emotional score may include a positive score, a negative score, a neutral score, or a mixed score.
또한, 상기 긍정점수는 +1, 상기 부정점수는 -1, 상기 중립점수는 0의 가중치를 가질 수 있고, 상기 혼합점수는 -1 내지 +1 사이의 값을 나타낼 수 있다. In addition, the positive score may have a weight of +1, the negative score may have a weight of -1, and the neutral score may have a weight of 0, and the mixed score may represent a value between -1 and +1.
또한, 상기 감정점수를 생성하는 단계는,상기 복수의 문장의 센텐스 벡터를 추출하는 단계; 및 상기 센텐스 벡터를 미리 학습된 감정모델(emotion model)에 입력으로 적용하여, 상기 감정점수를 생성하는 단계;를 포함할 수 있다.In addition, the step of generating the emotional score, Extracting a sense vector of the plurality of sentences; and generating the emotion score by applying the sense vector as an input to a pre-trained emotion model.
또한, 상기 복수의 문장 중 적어도 일부를 추출하는 단계는, 상기 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 최대인 구간을 확인하는 단계; 및 상기 확인된 구간에 포함된 적어도 둘의 문장을 추출하는 단계;를 포함할 수 있다.In addition, the step of extracting at least a portion of the plurality of sentences, comparing the emotional score corresponding to each of the plurality of sentences, and identifying a section in which the difference in the emotional score between adjacent sentences is maximum; and extracting at least two sentences included in the identified section.
또한, 상기 복수의 문장 중 적어도 일부를 추출하는 단계는, 상기 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 최대인 구간을 확인하는 단계; 및 상기 확인된 구간에 포함된 적어도 둘의 문장을 추출하는 단계;를 포함할 수 있다.In addition, the step of extracting at least a portion of the plurality of sentences, comparing the emotional score corresponding to each of the plurality of sentences, and identifying a section in which the difference in the emotional score between adjacent sentences is maximum; and extracting at least two sentences included in the identified section.
또한, 상기 복수의 문장 중 적어도 일부를 추출하는 단계는, 상기 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 미리 설정된 임계값 이상인 적어도 둘의 문장을 추출하는 단계;를 포함할 수 있다. In addition, the step of extracting at least a portion of the plurality of sentences, comparing the emotional score corresponding to each of the plurality of sentences, extracting at least two sentences in which a difference in emotional scores between adjacent sentences is equal to or greater than a preset threshold value ; may be included.
또한, 상기 복수의 문장을 추출하는 단계는, 상기 복수의 문서 중 상기 문서를 구성하는 문장의 수가 미리 설정된 임계치 미만인 제1 문서를 제외하고, 상기 문장의 수가 미리 설정된 임계치 이상인 제2 문서로부터 상기 복수의 문장을 추출할 수 있다.In addition, the extracting of the plurality of sentences may include excluding a first document in which the number of sentences constituting the document among the plurality of documents is less than a preset threshold, and the number of sentences is greater than or equal to a preset threshold from a second document. sentences can be extracted.
또한, 상기 미리 설정된 임계치는, 상기 언어모델의 입력으로 적용되는 문장의 수에 상응할 수 있다.In addition, the preset threshold may correspond to the number of sentences applied as an input of the language model.
또한, 상기 복수의 문서의 도메인을 분류하는 단계; 상기 분류된 도메인에 기반하여 적어도 하나의 추가문장을 추출하는 단계;를 더 포함할 수 있다.In addition, classifying the domains of the plurality of documents; It may further include; extracting at least one additional sentence based on the classified domain.
또한, 상기 복수의 문서의 도메인을 분류하는 단계는, 상기 복수의 문서를 구성하는 상기 복수의 텍스트로부터 센텐스 벡터를 추출하는 단계; 상기 센텐스 벡터를 미리 학습된 분류모델에 적용하여, 상기 복수의 텍스트에 대응하는 하나 이상의 후보 도메인(domaion prediction candidates)를 생성하는 단계;를 포함할 수 있다.In addition, classifying the domains of the plurality of documents may include: extracting a sense vector from the plurality of texts constituting the plurality of documents; and generating one or more candidate domains corresponding to the plurality of texts by applying the sense vector to a pre-trained classification model.
또한, 상기 추가문장을 추출하는 단계는, 상기 후보 도메인이 두괄식 문단으로 판단되면, 상기 두괄식 문단의 첫 번째 문장으로부터 순서대로 N 번째(N은 자연수)문장까지의 텍스트를 포함하는 추가 텍스트(additional text)을 추출할 수 있다.In addition, in the step of extracting the additional sentence, if it is determined that the candidate domain is a paragraph in brackets, additional text including text from the first sentence of the paragraph in brackets to the N-th (N is a natural number) sentence in order ) can be extracted.
또한, 상기 추가문장을 추출하는 단계는, 상기 후보 도메인이 미괄식 문단으로 판단되면, 상기 미괄식 문단의 마지막 문장으로부터 역순으로 M 번째(M은 자연수)문장까지의 텍스트를 포함하는 추가문장을 추출할 수 있다.In addition, in the step of extracting the additional sentence, if the candidate domain is determined to be a paragraph in parentheses, an additional sentence including text from the last sentence of the paragraph in brackets to the M-th (M is a natural number) sentence in reverse order can be extracted. have.
본 명세서의 일 실시예에 따른 감정점수를 활용한 시퀀스-투-시퀀스 기반의 텍스트 요약의 효과에 대해 설명하면 다음과 같다.The effect of a sequence-to-sequence-based text summary using emotion scores according to an embodiment of the present specification will be described as follows.
본 명세서는 학습 데이터의 길이를 처리하는 과정에서 중요한 문장 또는 단어를 누락하지 않을 수 있다.This specification may not omit important sentences or words in the process of processing the length of the training data.
또한, 본 명세서는 감정인자를 이용하여 학습 데이터의 질이 향상하고, 좋은 학습 성능을 도출할 수 있다.In addition, in the present specification, the quality of learning data can be improved and good learning performance can be derived by using emotional factors.
본 명세서에서 얻을 수 있는 효과는 이상에서 언급한 효과로 제한되지 않으며, 언급하지 않은 또 다른 효과들은 아래의 기재로부터 본 명세서가 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.The effects obtainable in the present specification are not limited to the above-mentioned effects, and other effects not mentioned will be clearly understood by those of ordinary skill in the art to which this specification belongs from the description below. .
본 명세서에 관한 이해를 돕기 위해 상세한 설명의 일부로 포함되는, 첨부 도면은 본 명세서에 대한 실시예를 제공하고, 상세한 설명과 함께 본 명세서의 기술적 특징을 설명한다.
도 1은 본 명세서의 일 실시예에 따른 텍스트 요약장치의 블록도이다.
도 2는 본 명세서의 일 실시예에 따른 언어처리방법의 순서도이다.
도 3 및 도 4는 본 명세서의 일 실시예에 따른 언어처리방법의 구현예를 설명하기 위한 도면이다.BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are included as a part of the detailed description to help the understanding of the present specification, provide embodiments of the present specification, and together with the detailed description, explain the technical features of the present specification.
1 is a block diagram of a text summarizing apparatus according to an embodiment of the present specification.
2 is a flowchart of a language processing method according to an embodiment of the present specification.
3 and 4 are diagrams for explaining an implementation example of a language processing method according to an embodiment of the present specification.
이하, 첨부된 도면을 참조하여 본 명세서에 개시된 실시예를 상세히 설명하되, 도면 부호에 관계없이 동일하거나 유사한 구성요소는 동일한 참조 번호를 부여하고 이에 대한 중복되는 설명은 생략하기로 한다. 이하의 설명에서 사용되는 구성요소에 대한 접미사 "모듈" 및 "부"는 명세서 작성의 용이함만이 고려되어 부여되거나 혼용되는 것으로서, 그 자체로 서로 구별되는 의미 또는 역할을 갖는 것은 아니다. 또한, 본 명세서에 개시된 실시예를 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 명세서에 개시된 실시예의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다. 또한, 첨부된 도면은 본 명세서에 개시된 실시예를 쉽게 이해할 수 있도록 하기 위한 것일 뿐, 첨부된 도면에 의해 본 명세서에 개시된 기술적 사상이 제한되지 않으며, 본 명세서의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. Hereinafter, the embodiments disclosed in the present specification will be described in detail with reference to the accompanying drawings, but the same or similar components are assigned the same reference numbers regardless of reference numerals, and redundant description thereof will be omitted. The suffixes "module" and "part" for the components used in the following description are given or mixed in consideration of only the ease of writing the specification, and do not have a meaning or role distinct from each other by themselves. In addition, in describing the embodiments disclosed in the present specification, if it is determined that detailed descriptions of related known technologies may obscure the gist of the embodiments disclosed in the present specification, the detailed description thereof will be omitted. In addition, the accompanying drawings are only for easy understanding of the embodiments disclosed in the present specification, and the technical spirit disclosed herein is not limited by the accompanying drawings, and all changes included in the spirit and scope of the present specification , should be understood to include equivalents or substitutes.
제1, 제2 등과 같이 서수를 포함하는 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되지는 않는다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다.Terms including an ordinal number such as first, second, etc. may be used to describe various elements, but the elements are not limited by the terms. The above terms are used only for the purpose of distinguishing one component from another.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다.When a component is referred to as being “connected” or “connected” to another component, it is understood that the other component may be directly connected or connected to the other component, but other components may exist in between. it should be On the other hand, when it is mentioned that a certain element is "directly connected" or "directly connected" to another element, it should be understood that the other element does not exist in the middle.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다.The singular expression includes the plural expression unless the context clearly dictates otherwise.
본 출원에서, "포함한다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.In the present application, terms such as "comprises" or "have" are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.
< 텍스트 요약 >< Text summary >
텍스트 요약(text summarization)은 주어진 문서에서 가장 중요한 정보들을 추출하여 문서의 핵심내용을 기술하는 방법이다. 텍스트 데이터가 증가함으로 인해 자연어처리 영역에서 텍스트의 전처리 및 요약은 중요시된다. 텍스트 요약에서 활용되는 기술은 크게 2 가지가 존재한다. 보다 구체적으로, 텍스트 요약에서 활용되는 기술은 문서에서 중요한 단어들을 추출한 뒤에 이를 나열하는 방법은 추출방법(extractive summarization)과 주어진 텍스트 문장에서 새로운 요약 문장을 만들어내는 생성요약방법(abstractive summarization)이 있으나, 이에 한정되는 것은 아니다. 또한, 하드웨어의 발전과 대량의 텍스트 데이터로 인하여, 생성요약방법에 딥러닝 모델(deep learning model)을 활용하는 방법도 있다. 특히, 딥러닝 모델 중 시퀀스-투-시퀀스(sequence-to-sequence) 모델이 텍스트 요약에서 용이하게 사용될 수 있다.Text summarization is a method of describing the core content of a document by extracting the most important information from a given document. Due to the increase in text data, preprocessing and summarization of text are important in the natural language processing area. There are mainly two techniques used in text summary. More specifically, the technique used in text summarization is extractive summarization and abstract summarization, which creates a new summary sentence from a given text sentence, and extracts important words from the document and lists them. The present invention is not limited thereto. In addition, due to the development of hardware and a large amount of text data, there is a method of using a deep learning model for the generation summary method. In particular, a sequence-to-sequence model among deep learning models can be easily used in text summarization.
텍스트 요약을 위한 시퀀스-투-시퀀스 모델은 인코더(encoder)와 디코더(decoder)를 LSTM(long short-term memory)로 활용한 모델, 합성곱신경망(convolutional neural network)을 활용한 모델이 있으나 이에 한정되는 것은 아니다. LSTM 모델은 문장의 길이가 긴 경우에 문장 간의 종속성을 상실하지 않기 위하여 개발된 모델이다. 하지만, 종속성 문제가 완전히 해결되지 않았고, 단점들을 보완하기 위해서 일 예는 주의 매커니즘(attention mechanism)을 이용하나, 학습문장의 길이가 늘어나거나 다중요약(multiple sentence summaries)의 경우 한 번에 학습시키는 데에 어려움이 존재한다. 이에 적은 컴퓨팅 리소스를 통해 효과적인 러닝모델을 생성하기 위하여 텍스트를 요약하는 전처리 방법이 제안될 필요가 있다. 일반적으로 텍스트 데이터에는 감정 표현(sentiment expression)이 포함되어 있고, 핵심적인 문장 또는 단어에서 상기 감정 표현을 나타내는 감정 점수(sentiment score)는 큰 폭으로 변화할 수 있다. 따라서, 상기 감정 점수의 변화에 기반하여 텍스트 데이터에 포함된 적어도 일부의 문장을 추출하고, 추출된 적어도 일부의 문장을 학습 데이터로 삼아 러닝모델을 생성하면 전술한 적은 컴퓨팅 리소스를 통해 러닝모델을 생성할 수 있다.The sequence-to-sequence model for text summarization includes a model using an encoder and a decoder as long short-term memory (LSTM), and a model using a convolutional neural network. it's not going to be The LSTM model is a model developed in order not to lose the dependency between sentences when the sentence length is long. However, the dependency problem has not been completely solved, and one example uses an attention mechanism to compensate for the shortcomings, but the length of the learning sentence is increased or in the case of multiple sentence summaries, it is difficult to learn at once. difficulties exist in Accordingly, it is necessary to propose a pre-processing method for summarizing texts in order to generate an effective learning model with a small amount of computing resources. In general, text data includes a sentiment expression, and a sentiment score representing the emotion expression in a key sentence or word may change significantly. Therefore, if at least some sentences included in the text data are extracted based on the change in the emotional score, and a learning model is generated using the extracted at least some sentences as training data, the learning model is generated using the aforementioned small computing resources. can do.
< 텍스트 요약장치 >< Text Summarization Device >
도 1은 본 명세서의 일 실시예에 따른 텍스트 요약장치의 블록도이다.1 is a block diagram of a text summarizing apparatus according to an embodiment of the present specification.
도 1을 참조하면, 텍스트 요약장치(100)는 적어도 하나의 프로세서(110), 메모리(120), 통신 모듈(130)을 포함할 수 있다.Referring to FIG. 1 , the
프로세서(110)는 하나 이상의 어플리케이션 프로세서(application processor, AP), 하나 이상의 커뮤니케이션 프로세서(communication processor, CP) 또는 적어도 하나 이상의 AI 프로세서(artificial intelligence processor)를 포함할 수 있다. 어플리케이션 프로세서, 커뮤니케이션 프로세서 또는 AI 프로세서(110)는 서로 다른 IC(integrated circuit) 패키지들 내에 각각 포함되거나 하나의 IC 패키지 내에 포함될 수 있다.The
어플리케이션 프로세서는 운영체제 또는 응용 프로그램을 구동하여 어플리케이션 프로세서에 연결된 다수의 하드웨어 또는 소프트웨어 구성요소들을 제어하고, 멀티미디어 데이터를 포함한 각종 데이터 처리/연산을 수행할 수 있다. 일 례로, 상기 어플리케이션 프로세서는 SoC(system on chip)로 구현될 수 있다. 프로세서(110)는 GPU(graphic prcessing unit, 미도시)를 더 포함할 수 있다.The application processor may control a plurality of hardware or software components connected to the application processor by driving an operating system or an application program, and may perform various data processing/operations including multimedia data. For example, the application processor may be implemented as a system on chip (SoC). The
커뮤니케이션 프로세서는 텍스트 요약장치(100)와 네트워크로 연결된 다른 전자 기기들 간의 통신에서 데이터 링크를 관리하고 통신 프로토콜을 변환하는 기능을 수행할 수 있다. 일 례로, 커뮤니케이션 프로세서는 SoC로 구현될 수 있다. 커뮤니케이션 프로세서는 멀티미디어 제어 기능의 적어도 일부를 수행할 수 있다.The communication processor may perform a function of managing a data link and converting a communication protocol in communication between the
또한, 커뮤니케이션 프로세서는 통신 모듈(130)의 데이터 송수신을 제어할 수 있다. 커뮤니케이션 프로세서는 어플리케이션 프로세서의 적어도 일부로 포함되도록 구현될 수도 있다.Also, the communication processor may control data transmission/reception of the
어플리케이션 프로세서 또는 커뮤니케이션 프로세서는 각각에 연결된 비휘발성 메모리(120) 또는 다른 구성요소 중 적어도 하나로부터 수신한 명령 또는 데이터를 휘발성 메모리(120)에 로드(load)하여 처리할 수 있다. 또한, 어플리케이션 프로세서 또는 커뮤니케이션 프로세서는 다른 구성요소 중 적어도 하나로부터 수신하거나 다른 구성요소 중 적어도 하나에 의해 생성된 데이터를 비휘발성 메모리(120)에 저장할 수 있다.The application processor or the communication processor may load and process a command or data received from at least one of the
한편, 프로세서(110)(특히, AI 프로세서)는 메모리(120)에 저장된 프로그램을 이용하여 신경망을 학습할 수 있다. 프로세서(110)는 텍스트 요약장치(100)의 동작과 관련된 데이터를 인식하기 위한 신경망을 학습할 수 있다. 여기서, 신경망은 인간의 뇌 구조(예를 들어, 인간의 신경망의 뉴런 구조)를 컴퓨터 상에서 모의하도록 설계될 수 있다. 신경망은 입력층(input layer), 출력층(output layer) 및 적어도 하나의 은닉층(hidden layer)를 포함할 수 있다. 각 층은 가중치를 갖는 적어도 하나의 뉴런을 포함하고, 신경망은 뉴런과 뉴런을 연결하는 시냅스(synapse)를 포함할 수 있다. 신경망에서 각 뉴런은 시냅스를 통해 입력되는 입력 신호를 가중치(weight) 및/또는 편향(bias)에 대한 활성함수(activation function)의 함수값으로 출력할 수 있다.Meanwhile, the processor 110 (in particular, the AI processor) may learn the neural network using a program stored in the
복수의 네트워크 모드들은 뉴런이 시냅스를 통해 신호를 주고받는 뉴런의 시냅틱 활동을 모의하도록 각각 연결 관계에 따라 데이터를 주고받을 수 있다. 딥러닝 모델에서 복수의 네트워크 노드들은 서로 다른 레이어에 위치하면서 콘볼루션(convolution) 연결 관계에 따라 데이터를 주고받을 수 있다. 신경망 모델의 예는 심층 신경망(deep neural network, DNN), 합성곱 신경망(convolutional neural network, CNN), 순환 신경망(recurrent neural network), 제한 볼츠만 머신(restricted Boltzmann machine), 심층 신뢰 신경망(deep belief network), 심층 Q-네트워크(deep Q-Network)와 같은 다양한 딥러닝 기법들을 포함하며, 비전인식, 음성인식, 자연어처리, 음성/신호처리 등의 분야에서 적용될 수 있다.The plurality of network modes may transmit and receive data according to a connection relationship, respectively, so as to simulate a synaptic activity of a neuron in which a neuron transmits and receives a signal through a synapse. In a deep learning model, a plurality of network nodes can exchange data according to a convolutional connection relationship while being located in different layers. Examples of neural network models include deep neural networks (DNNs), convolutional neural networks (CNNs), recurrent neural networks, restricted Boltzmann machines, and deep belief networks. ), including various deep learning techniques such as deep Q-network, and can be applied in fields such as vision recognition, voice recognition, natural language processing, and voice/signal processing.
한편, 전술한 바와 같은 기능을 수행하는 프로세서(110)는 범용 프로세서(예를 들어, CPU)일 수 있으나, 인공지능 학습을 위한 AI 전용 프로세서(예를 들어, GPU)일 수 있다.Meanwhile, the
구체적으로, 본 명세서의 일 실시예에 따른 텍스트 요약장치(100)는 프로세서(110)를 통해 메모리(120)에 저장된 코퍼스로부터 복수의 학습문장을 추출할 수 있다. 학습문장은 러닝모델의 학습데이터로 이용되는 문장 형태의 텍스트 데이터를 지칭한다.Specifically, the
프로세서(110)는 추출된 복수의 학습문장에 대하여 감정점수를 생성할 수 있다. 일 례로, 프로세서(110)는 NLTK(Natural Language ToolKit)에서 제공되는 VADER Sentiment Analysis로 학습문장의 감정을 분석할 수 있다. VADER Sentiment Analysis는 규칙 기반의 모델(Rule-Based Model)로서, 텍스트로부터 긍정, 부정, 중립, 또는 혼합점수를 생성하거나 산출할 수 있다.The
일 예로, 혼합점수는 -1점(부정점수의 최대값)과 +1(긍정점수의 최대값) 사이의 정규화된 모든 어휘에 대한 감정점수의 합계를 나타낸다. 프로세서(110)는 각 문장에서 추출된 혼합점수를 이용하여 복수의 문장에 대응하는 감정점수를 나타내는 그래프를 생성할 수 있다. 프로세서(110)는 상기 그래프를 분석하여 감정의 고조를 판단할 수 있다. 감정의 고조는 인접한 문장 사이의 감정점수의 차이(즉, 절대값)로 정의된다. As an example, the mixed score represents the sum of the emotional scores for all vocabulary normalized between -1 (the maximum value of negative scores) and +1 (the maximum value of positive scores). The
프로세서(110)는 복수의 학습문장에 대응하는 감정점수에 기반하여 상기 복수의 학습문장 중 적어도 일부를 추출할 수 있다. 프로세서(110)는 복수의 문장에 대하여 각각 감정점수를 산출하고, 복수의 문장에 대한 감정점수를 서로 비교분석할 수 있다. 복수의 문장에 대응하는 감정점수를 비교하여, 감정점수의 차이가 최대이거나 미리 설정된 임계값 이상인 적어도 둘의 문장을 추출할 수 있다. 이처럼 추출된 적어도 둘의 문장은 이후에 요약문을 구성하는 적어도 문장으로 활용될 수 있다. 일 예로, 프로세서(110)는 복수의 문장에 대하여 산출된 감정점수를 분석한 결과 감정점수의 차이가 최대인 두 개의 문장을 추출할 수 있고, 추출된 두 개의 문장을 이용하여 요약문을 생성할 수 있다. 다른 예로, 프로세서(110)는 복수의 문장에 대하여 산출된 감정점수를 분석하고, 감정점수의 차이가 미리 설정된 임계치 이상인 적어도 둘의 문장을 추출할 수 있다. 프로세서(110)는 추출된 적어도 둘의 문장을 이용하여 요약문을 생성할 수 있다.The
본 명세서의 일 실시예에 따른 텍스트 요약장치(100)는 프로세서(110)를 통해 코퍼스에 포함된 텍스트의 종류(또는 도메인)에 기반하여 적어도 일부의 제1 텍스트를 추출하고, 상기 적어도 일부의 제1 텍스트를 제외한 제2 텍스트를 이용하여 전술한 감정점수를 활용한 전처리 과정을 수행할 수 있다. 텍스트의 종류는 한글뉴스, 영어뉴스, 중문뉴스, 한글대본, 영문대본 등을 포함할 수 있으나 이에 한정되는 것은 아니다. 일 예로, 영어뉴스의 경우에는 문단의 핵심이 앞에서 나타나는 두괄식으로 구성된다. 두괄식 문단의 경우에 텍스트 요약장치(100)는 상기 두괄식 문단의 첫 번째 문장부터 미리 설정된 수의 문장을 제1 텍스트로 추출하고, 상기 미리 설정된 수(예를 들어, 2개)의 제2 텍스트를 제외한 제2 텍스트로부터 감정점수를 활용한 텍스트 추출을 수행할 수 있다. 프로세서(110)는 제1 텍스트 및 제2 텍스트를 결합(concatenation)하거나 조합(combination)하여 요약문을 생성할 수 있다.The
이처럼 감정분석 기반의 전처리 과정이 수행된 텍스트를 학습 데이터로 활용하면, 한정된 컴퓨팅 자원에서도 텍스트 요약의 성능이 향상될 수 있다. 감정분석 기반의 전처리 과정이 수행된 텍스트 데이터는 시퀀스-투-시퀀스 모델의 학습 데이터로 이용될 수 있다. 프로세서(110)는 학습 과정에서 학습 데이터에 대하여 워드 임베딩(word embedding) 과정을 수행할 수 있다. 워드 임베딩은 Glove에서 제공하는 사전 훈련된 워드 벡터(word vector)이 사용될 수 있으나 이에 한정되는 것은 아니다.If the text subjected to the emotion analysis-based pre-processing is used as learning data, the performance of text summary can be improved even with limited computing resources. Text data on which emotion analysis-based preprocessing has been performed may be used as training data for a sequence-to-sequence model. The
한편, 본 명세서의 일 실시예에 따른 텍스트 요약장치(100)는 문장의 개수가 미리 설정된 개수 미만인 문서는 학습 과정에서 제외할 수 있다. 이때, 미리 설정된 개수는 생성될 요약문을 구성하는 문장의 개수에 대응될 수 있다. 일 례로, 두괄식 문단의 경우에 전처리 과정에서 미리 추출되는 제1 텍스트는 2 개의 문장을 포함하고, 감정분석 기반의 전처리로 추출될 제2 텍스트는 2개의 문장을 포함한다. 즉, 제1 텍스트와 제2 텍스트의 개수의 합인 4 개 미만의 문단은 문장을 요약하는 본 명세서의 일 실시예에 따른 언어처리방법의 대상이 아니다. 따라서, 프로세서(110)는 문장의 개수를 판별하여, 상기 문장의 개수가 미리 설정된 개수 미만인 문서는 학습 과정에서 제외함으로써 학습의 효율을 향상시킬 수 있다.Meanwhile, the
프로세서(110)는 추출된 학습문장을 학습 데이터로 설정하여 요약문을 구성하는 문장을 추출하기 위한 언어모델(language model, LM)의 파라미터를 갱신할 수 있다. 언어모델은 재귀신경망(recurrent neural network, RNN), 또는 LSTM에 기반한 언어모델로 구현될 수 있으나, 이에 한정되는 것은 아니다. 한편, 언어모델에 관한 설명은 본 명세서의 기술분야에 관한 통상의 기술자에게 자명한 것이므로 구체적인 설명은 생략하도록 한다.The
프로세서(110)는 감정분석 기반의 전처리 과정이 수행된 학습 데이터로 학습된 언어모델을 이용하여 요약문을 생성할 수 있다. 구체적으로, 프로세서(110)는 전처리된 데이터를 언어모델에 입력으로 적용할 수 있다. 프로세서(110)는 상기 언어모델에 대한 입력에 응답하여 요약문을 생성하기 위한 출력(output)을 생성할 수 있다. 프로세서(110)는 상기 출력에 기반하여 요약문을 생성할 수 있다. The
이처럼, 감정점수를 활용하여 전처리된 데이터를 이용한 언어처리방법은 중요 문장을 선별하여 학습 및/또는 추론 과정을 수행하므로, 텍스트 요약의 성능이 향상된다. 또한, 중요 문장을 선별하여 언어처리가 수행되기 때문에 적은 컴퓨팅 자원에서도 높은 성능을 구현할 수 있다. As such, the language processing method using preprocessed data using emotion scores selects important sentences and performs learning and/or reasoning, so that the performance of text summary is improved. In addition, since language processing is performed by selecting important sentences, high performance can be implemented even with a small amount of computing resources.
메모리(120)는 내장 메모리 또는 외장 메모리를 포함할 수 있다. 내장 메모리는 휘발성 메모리(예를 들면, DRAM(dynamic RAM), SRAM(static RAM), SDRAM(synchronous dynamic RAM) 등) 또는 비휘발성 메모리 비휘발성 메모리(예를 들면, OTPROM(one time programmable ROM), PROM(programmable ROM), EPROM(erasable and programmable ROM), EEPROM(electrically erasable and programmable ROM), mask ROM, flash ROM, NAND flash memory, NOR flash memory 등) 중 적어도 하나를 포함할 수 있다. 일 실시예에 따르면, 상기 내장 메모리는 SSD(solid state drive)의 형태를 취할 수도 있다. 상기 외장 메모리는 플래시 드라이브(flash drive), 예를 들면, CF(compact flash), SD(secure digital), Micro-SD(micro secure digital), Mini-SD(mini secure digital), xD(extreme digital) 또는 메모리 스틱(memory stick) 등을 더 포함할 수 있다.The
본 명세서의 일 실시예에 따른 텍스트 요약장치(100)의 메모리(120)는 복수의 문장으로 구성된 학습용 코퍼스를 저장하고 있을 수 있다. 상기 학습용 코퍼스는 다양한 언어 및/또는 억양으로 구성된 텍스트 데이터를 포함할 수 있다. 학습용 코퍼스는 텍스트 요약장치(100)의 센서(미도시) 또는 카메라(미도시)를 통해 수집되거나 통신 모듈(130)을 이용하여 통신 가능한 외부 단말로부터 수신된 텍스트 데이터일 수 있다. 또한, 메모리(120)는 본 명세서의 일 시릿예에 따른 데이터의 분류/인식을 위한 학습 알고리즘을 통해 생성된 러닝모델(learning model)을 저장할 수 있다. 나아가, 메모리(120)는 러닝모델의 입력 데이터, 학습 데이터, 또는 학습 히스토리 등을 저장할 수도 있다.The
통신 모듈(130)은 무선 통신 모듈 또는 RF 모듈를 포함할 수 있다. 무선 통신 모듈은, 예를 들면, Wi-Fi, BT, GPS 또는 NFC를 포함할 수 있다. 예를 들면, 무선 통신 모듈은 무선 주파수를 이용하여 무선 통신 기능을 제공할 수 있다. 추가적으로 또는 대체적으로, 무선 통신 모듈은 텍스트 요약장치(100)를 네트워크(예: Internet, LAN, WAN, telecommunication network, cellular network, satellite network, POTS 또는 5G network 등)와 연결시키기 위한 네트워크 인터페이스 또는 모뎀 등을 포함할 수 있다.The
RF 모듈은 데이터의 송수신, 예를 들면, RF 신호 또는 호출된 전자 신호의 송수신을 담당할 수 있다. 일 례로, RF 모듈는 트랜시버(transceiver), PAM(power amp module), 주파수 필터(frequency filter) 또는 LNA(low noise amplifier) 등을 포함할 수 있다. 또한, RF 모듈은 무선통신에서 자유공간상의 전자파를 송수신하기 위한 부품, 예를 들면, 도체 또는 도선 등을 더 포함할 수 있다.The RF module may be responsible for transmitting/receiving data, for example, transmitting/receiving an RF signal or a called electronic signal. For example, the RF module may include a transceiver, a power amp module (PAM), a frequency filter, or a low noise amplifier (LNA). In addition, the RF module may further include a component for transmitting and receiving electromagnetic waves in free space in wireless communication, for example, a conductor or a conducting wire.
본 명세서의 다양한 실시예에 따른 텍스트 요약장치(100)는 서버, TV, 냉장고, 오븐, 의류 스타일러, 로봇 청소기, 드론, 에어컨, 공기 청정기, PC, 스피커, 홈 CCTV, 조명, 세탁기 및 스마트 플러그 중 적어도 하나로 구현될 수 있다. 도 1에서 설명한 텍스트 요약장치(100)의 구성요소는 일반적으로 전자 기기에 구비되는 구성요소를 예시한 것이므로, 본 명세서의 실시예에 따른 텍스트 요약장치(100)는 전술한 구성요소에 한정되지 않으며 필요에 따라 생략 및/또는 추가될 수 있다.The
< 언어처리방법 >< Language processing method >
도 2는 본 명세서의 일 실시예에 따른 언어처리방법의 순서도이다.2 is a flowchart of a language processing method according to an embodiment of the present specification.
도 2를 참조하면, 텍스트 요약장치(100)의 프로세서(110)는 복수의 문서로부터 복수의 문장을 추출할 수 있다(S110). 프로세서(110)는 훈련에 사용할 데이터를 학습에 적합한 형태로 변환하기 위하여 문서에 포함된 복수의 텍스트를 문장 단위로 분할할 수 있다. 예를 들어, "시간은 묘한 것이다. 우리 대부분은 바로 눈 앞에 닥친 시간을 살아갈 뿐이다. 한 사람의 인생에서 가장 고통스러운 순간 중 하나는 아마도 바라볼 시간보다 돌아볼 시간이 더 많다는 나이에 도달했다는 깨달음과 함께 찾아온다"는 문단은 "시간은 묘한 것이다", "우리 대부분은 바로 눈 앞에 닥친 시간을 살아갈 뿐이다", 및 "한 사람의 인생에서 가장 고통스러운 순간 중 하나는 아마도 바라볼 시간보다 돌아볼 시간이 더 많다는 나이에 도달했다는 깨달음과 함께 찾아온다"로 분할되어 메모리(120)에 저장될 수 있다. 이처럼 분할된 문장 단위의 텍스트 데이터는 이후의 감정점수를 이용한 전처리 과정에 이용될 수 있다.Referring to FIG. 2 , the
복수의 문서는 복수의 도메인(예를 들어, 뉴스, 신문, 도서, 대본 등)으로 설정된 문서를 포함할 수 있다. 한편, 본 명세서의 일 실시예에서 프로세서(110)는 복수의 문서 중 상기 문서를 구성하는 문장의 수가 미리 설정된 임계치 미만인 제1 문서를 제외하고, 상기 문장의 수가 미리 설정된 임계치 이상인 제2 문서로부터 상기 복수의 문장을 추출할 수 있다. 이때, 미리 설정된 임계치는 언어모델의 입력으로 적용되는 문장의 수에 상응하는 수로 설정될 수 있다. The plurality of documents may include documents set in a plurality of domains (eg, news, newspapers, books, scripts, etc.). On the other hand, in an embodiment of the present specification, the
프로세서(110)는 복수의 문장의 감정점수를 생성할 수 있다(S120). 감정점수는 긍정점수, 부정점수, 중립점수, 또는 혼합점수를 포함할 수 있다. 여기서 긍정점수는 +1, 부정점수는 -1, 중립점수는 0의 가중치를 가질 수 있다. 혼합점수는 긍정점수, 부정점수, 및 중립점수를 이용하여 산출한 값이다. 일 례로, 혼합점수는 -1 내지 +1 사이의 정규화된 모든 점수의 합계를 나타낼 수 있다. The
본 명세서의 일 실시예에 따른 언어처리방법에서 프로세서(110)는 미리 학습된 감정모델을 이용하여 감정점수를 생성할 수 있다. 구체적으로, 프로세서(110)는 복수의 문장으로부터 센텐스 벡터를 추출하고, 추출된 센텐스 벡터를 미리 학습된 감정모델에 적용하여 감정점수를 생성할 수 있다. 여기서, 센텐스 벡터는 추출 모델(extraction model)을 이용하여 추출되거나 상기 감정모델을 구성하는 적어도 하나의 알고리즘 상에서 추출될 수 있다. 이때, 상기 감정모델은 규칙 기반 모델로서, VADER Sentiment Analsys를 이용할 수 있으나 이에 한정되는 것은 아니다.In the language processing method according to an embodiment of the present specification, the
프로세서(110)는 감정점수에 기반하여 복수의 문장 중 적어도 일부를 추출할 수 있다(S130). 프로세서(110)는 복수의 문장 각각에서 산출한 혼합점수를 이용하여 그래프를 생성할 수 있으며, 생성된 그래프를 분석하여 감정점수 차이가 최대인 구간을 확인할 수 있다. 일 예로, 프로세서(110)는 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 최대인 구간을 확인하고, 확인된 구간에 포함된 적어도 둘의 문장을 추출할 수 있다. 다른 례로, 프로세서(110)는 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 미리 설정된 임계값 이상인 적어도 둘의 문장을 추출할 수 있다. The
한편, 본 명세서의 일 실시예에서 프로세서(110)는 복수의 문서의 도메인을 분류하고, 분류된 도메인에 기반하여 적어도 하나의 추가문장을 추출할 수 있다. 구체적으로, 프로세서(110)는 미리 학습된 분류모델을 이용하여 복수의 텍스트에 대한 후보 도메인을 생성할 수 있다. 이때, 프로세서(110)는 복수의 문서에 포함된 각각의 문장 또는 단어에 대하여 특징 벡터(예를 들어, 센텐스 벡터, 워드 벡터)를 추출하고, 추출된 특징 벡터를 미리 학습된 분류모델에 적용하여 복수의 텍스트에 대응하는 하나 이상의 후보 도메인을 생성할 수 있다. 후보 도메인이 생성되면, 프로세서(110)는 후보 도메인의 종류에 따라서 적어도 하나의 추가 텍스트를 추출하여 요약문을 생성하는 데 이용할 수 있다. 일 례로, 후보 도메인이 두괄식 문단으로 판단되면, 두괄식 문단의 첫 번째 문장으로부터 순서대로 N 번째(N은 자연수)문장 까지의 텍스트를 포함하는 추가 텍스트를 추출할 수 있다. 다른 례로, 후보 도메인이 미괄식 문단으로 판단되면, 미괄식 문단의 마지막 문단으로부터 역순으로 M 번째(M은 자연수)문장 까지의 텍스트를 포함하는 추가 텍스트를 추출할 수 있다.Meanwhile, in an embodiment of the present specification, the
프로세서(110)는 추출된 문장을 입력으로 미리 학습된 언어모델에 적용하여, 적어도 하나의 후보 텍스트를 생성할 수 있다(S140). 언어모델은 재귀신경망(recurrent neural network, RNN), 또는 LSTM에 기반한 언어모델로 구현될 수 있으나, 이에 한정되는 것은 아니다. The
한편, 본 명세서의 일 실시예에 따른 언어처리방법에서 프로세서(110)는 언어모델의 성능을 평가할 수 있다. 여기서, 성능 평가지표는 ROUGE-1, ROUGE-2, ROUGE-L의 F1 점수를 사용할 수 있다. 이는 언어모델이 생성한 답과 학습 데이터의 답을 비교하여 평가하는 방법이다. 프로세서(110)는 생성된 요약문과 정답 요약문 사이의 N-Gram을 이용해 산출되는 재현율(recall)과 정확성(accuracy)으로부터 최종적으로 F1 결과를 측정한다. ROUGE-1은 유니그램(Unigram)의 중첩, ROUGE-2는 바이그램(Bigram)의 중첩, 그리고 ROUGE-L(Longest Common Subsequence)는 가장 긴 열의 중첩이다.Meanwhile, in the language processing method according to an embodiment of the present specification, the
< 구현예 >< Implementation Example >
도 3 및 도 4는 본 명세서의 일 실시예에 따른 언어처리방법의 구현예를 설명하기 위한 도면이다.3 and 4 are diagrams for explaining an implementation example of a language processing method according to an embodiment of the present specification.
도 3를 참조하면, 텍스트 요약장치(100)는 언어모델(220)을 생성하거나 학습된 언어모델(220)을 이용하여 특정 문서의 요약문을 생성하기 위하여 적어도 일부의 문장을 추출하는 전처리를 수행할 수 있다. 전처리 과정의 구체적인 설명은 전술한 도 1 및 도 2에서 전술하였으므로 생략한다. 텍스트 요약장치(100)는 감정모델(예를 들어, VADER Sentiment Analisys)를 이용하여 복수의 문장 각각에 대한 감정점수를 획득할 수 있으며, 생성된 감정점수를 이용하여 전처리 데이터(210)를 생성할 수 있다.Referring to FIG. 3 , the
텍스트 요약장치(100)는 텍스트 요약을 위한 언어모델(220)에 전처리된 데이터를 포함하는 텍스트 데이터(210)를 입력 데이터로 사용하여, 요약된 텍스트(230)를 생성할 수 있다.The
도 4는 예시적으로 뉴스기사를 대상으로 감정분석의 전처리 과정을 설명하기 위한 도면이다. 도 4를 참조하면, 감정분석의 전처리 과정이 수행되지 않은 뉴스기사는 522 단어와 15 문장으로 구성된다. 이러한 문단 100,000개를 요약해야 한다면, 처리해야할 단어와 문장의 양은 한정된 컴퓨팅 연산의 자원 때문에 메모리 부족 에러가 발생할 수 있다. 에러를 극복하기 위하여 문단 전단에 위치한 4 문장(194 단어)을 학습에 이용하는 경우 메모리 오류는 해결할 수 있으나 적은 문장의 길이로 인하여 좋은 성능을 기대할 수 없다. 본 명세서의 일 실시예에 따른 감정분석의 전처리 과정을 수행하면, 2+N(or M) 문장을 수집할 수 있다. 여기서 N은 두괄식 문단의 경우에 기 설정된 문장의 개수이며, M은 미괄식 문단의 경우에 기 설정된 문장의 개수이다. 이처럼 감정분석의 전처리 과정으로 추출된 중요문장들을 언어모델(220)의 학습 데이터 또는 입력 데이터로 활용하면 한정된 컴퓨팅 자원에서도 텍스트 요약의 성능이 향상될 수 있다.4 is a diagram for explaining a pre-processing process of emotion analysis for news articles by way of example. Referring to FIG. 4 , a news article that has not been subjected to the preprocessing of emotion analysis consists of 522 words and 15 sentences. If you have to summarize 100,000 of these paragraphs, the amount of words and sentences to be processed may cause an out-of-memory error due to the limited resources of the computing operation. If the 4 sentences (194 words) located at the front of the paragraph are used for learning to overcome the error, the memory error can be solved, but good performance cannot be expected due to the small sentence length. If the pre-processing of emotion analysis according to an embodiment of the present specification is performed, 2+N(or M) sentences may be collected. Here, N is the preset number of sentences in the case of paragraphs in parentheses, and M is the number of sentences preset in the case of paragraphs in brackets. As such, if the important sentences extracted through the preprocessing of emotion analysis are used as learning data or input data of the
예를 들어, 텍스트 요약장치(100)는 "an Italian humanitarian activist and journalist. police investigating the case learned where Vittorio Arrigoni was being held. (중략) the grisly outcome came hours after a video was posted on youtube showing a man identified by his colleagues as Arrigoni a black blindfold covered his eyes his right cheek appeared red. Arabic writing scrolled over the video threatened that Arrigoni would be(text)"와 같은 문단을 대상으로 전처리 과정을 수행하고, 4 개의 중요문장을 추출할 수 있다.For example, the
프로세서(110)는 감정점수를 이용하여 "the grisly outcome came hours after a video was posted on youtube showing a man identified by his colleagues as Arrigoni a black blindfold covered his eyes(sub-text1)", "Arabic writing scrolled over the video threatened that Arrigoni would be(sub-text2)"를 중요문장으로 추출할 수 있다. 보다 구체적으로, 그래프를 살펴보면, 제1 지점(P1) 및 제2 지점(P2)의 사이에서 감정점수의 차이가 최대값을 가질 수 있다.The
또한, 프로세서(110)는 텍스트의 전처리 대상인 텍스트의 도메인이 두괄식 구성이므로, 처음의 두 문장인 "an Italian humanitarian activist and journalist(sub-text3)", "police investigating the case learned where Vittorio arrigoni was being held(sub-text4)"를 중요문장으로 추출할 수 있다.In addition, since the domain of the text, which is the pre-processing target of the text, is structured in brackets in the
텍스트 요약장치(100)는 이처럼 추출된 4 개의 중요문장를 학습 데이터로 활용하여 언어모델(220)을 생성하거나 또는 입력 데이터로 활용하여 텍스트 요약을 수행할 수 있다.The
< 실험예 ><Experimental example>
본 명세서의 일 실시예에 따른 실험에서 텍스트 요약 장치는 CNN / Daily mail 뉴스 데이터를 사용하여 실험을 수행하였다. 실험예를 살펴보면, 텍스트 요약장치는 데이터셋에서 문장이 3 개 이하인 항목들은 다중문장요약의 형태에 부합하지 않으므로 제거하였다.In an experiment according to an embodiment of the present specification, the text summary apparatus performed an experiment using CNN/Daily mail news data. Looking at the experimental example, the text summarization device removed items with three or fewer sentences in the dataset because they did not conform to the multi-sentence summary form.
실험예에서 텍스트 요약장치는 총 92,309 개의 문서를 수집하였고, 70,000 개의 문서를 학습 데이터로, 나머지 22,309 개의 문서를 평가 데이터로 사용하였다. 각 문서당 학습에 사용된 문서의 최대 길이는 문장의 시작부터 130 단어, 요약본 20 단어이며, 워드 임베딩은 300차원으로 설정하고, 에포크(epoch)는 150으로 설정하여 학습을 진행하였다.In the experimental example, the text summarizing device collected a total of 92,309 documents, and 70,000 documents were used as training data and the remaining 22,309 documents were used as evaluation data. The maximum length of the document used for learning for each document was 130 words from the beginning of the sentence and 20 words for the summary, the word embedding was set to 300 dimensions, and the epoch was set to 150 to proceed with the learning.
실험 결과는 아래의 표와 같다.The experimental results are shown in the table below.
< 표 >< Table >
상기 표를 살펴보면, 본 명세서의 일 실험예에 따른 언어처리는 모든 평가 점수에 대하여 성능이 향상된 것을 확인할 수 있다.Looking at the table, it can be seen that the performance of the language processing according to an experimental example of the present specification is improved for all evaluation scores.
전술한 본 명세서는, 프로그램이 기록된 매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 매체는, 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 매체의 예로는, HDD(Hard Disk Drive), SSD(Solid State Disk), SDD(Silicon Disk Drive), ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있으며, 또한 캐리어 웨이브(예를 들어, 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 따라서, 상기의 상세한 설명은 모든 면에서 제한적으로 해석되어서는 아니되고 예시적인 것으로 고려되어야 한다. 본 명세서의 범위는 첨부된 청구항의 합리적 해석에 의해 결정되어야 하고, 본 명세서의 등가적 범위 내에서의 모든 변경은 본 명세서의 범위에 포함된다.The above-described specification can be implemented as computer-readable code on a medium in which a program is recorded. The computer-readable medium includes all types of recording devices in which data readable by a computer system is stored. Examples of computer-readable media include Hard Disk Drive (HDD), Solid State Disk (SSD), Silicon Disk Drive (SDD), ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage device, etc. There is also a carrier wave (eg, transmission over the Internet) that is implemented in the form of. Accordingly, the above detailed description should not be construed as restrictive in all respects but as exemplary. The scope of this specification should be determined by a reasonable interpretation of the appended claims, and all modifications within the scope of equivalents of this specification are included in the scope of this specification.
Claims (15)
상기 복수의 문장의 감정점수를 생성하는 단계;
상기 감정점수에 기반하여 상기 복수의 문장 중 적어도 일부를 추출하는 단계; 및
상기 추출된 문장을 입력으로 미리 학습된 언어모델(language model)에 적용하여, 적어도 하나의 후보 텍스트(text prediction candidates)를 생성하는 단계;
를 포함하는 언어처리방법.
extracting a plurality of sentences from a plurality of documents;
generating emotional scores of the plurality of sentences;
extracting at least a portion of the plurality of sentences based on the emotional score; and
generating at least one text prediction candidates by applying the extracted sentences to a pre-trained language model as an input;
A language processing method comprising
상기 복수의 문서는 복수의 도메인으로 설정된 문서를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The language processing method, wherein the plurality of documents include documents set in a plurality of domains.
상기 감정점수는 긍정점수, 부정점수, 중립점수, 또는 혼합점수를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The emotional score is a language processing method, characterized in that it includes a positive score, a negative score, a neutral score, or a mixed score.
상기 긍정점수는 +1, 상기 부정점수는 -1, 상기 중립점수는 0의 가중치를 가질 수 있고,
상기 혼합점수는 -1 내지 +1 사이의 값을 나타내는 것을 특징으로 하는 언어처리방법.
4. The method of claim 3,
The positive score may have a weight of +1, the negative score may have a weight of -1, and the neutral score may have a weight of 0,
The language processing method, characterized in that the mixed score represents a value between -1 and +1.
상기 감정점수를 생성하는 단계는,
상기 복수의 문장의 센텐스 벡터를 추출하는 단계; 및
상기 센텐스 벡터를 미리 학습된 감정모델(emotion model)에 입력으로 적용하여, 상기 감정점수를 생성하는 단계;
를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The step of generating the emotional score comprises:
extracting a sense vector of the plurality of sentences; and
generating the emotion score by applying the sense vector as an input to a pre-trained emotion model;
A language processing method comprising a.
상기 복수의 문장 중 적어도 일부를 추출하는 단계는,
상기 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 최대인 구간을 확인하는 단계; 및
상기 확인된 구간에 포함된 적어도 둘의 문장을 추출하는 단계;
를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The step of extracting at least a part of the plurality of sentences,
comparing the emotional scores corresponding to each of the plurality of sentences to determine a section in which the difference in emotional scores between adjacent sentences is maximum; and
extracting at least two sentences included in the identified section;
A language processing method comprising a.
상기 복수의 문장 중 적어도 일부를 추출하는 단계는,
상기 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 최대인 구간을 확인하는 단계; 및
상기 확인된 구간에 포함된 적어도 둘의 문장을 추출하는 단계;
를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The step of extracting at least a part of the plurality of sentences,
comparing the emotional scores corresponding to each of the plurality of sentences to determine a section in which the difference in emotional scores between adjacent sentences is maximum; and
extracting at least two sentences included in the identified section;
A language processing method comprising a.
상기 복수의 문장 중 적어도 일부를 추출하는 단계는,
상기 복수의 문장 각각에 대응되는 감정점수를 비교하여, 인접한 문장 간의 감정점수의 차이가 미리 설정된 임계값 이상인 적어도 둘의 문장을 추출하는 단계;
를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The step of extracting at least a part of the plurality of sentences,
extracting at least two sentences in which a difference in emotional scores between adjacent sentences is equal to or greater than a preset threshold by comparing emotional scores corresponding to the plurality of sentences;
A language processing method comprising a.
상기 복수의 문장을 추출하는 단계는,
상기 복수의 문서 중 상기 문서를 구성하는 문장의 수가 미리 설정된 임계치 미만인 제1 문서를 제외하고, 상기 문장의 수가 미리 설정된 임계치 이상인 제2 문서로부터 상기 복수의 문장을 추출하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
The step of extracting the plurality of sentences,
A language processing method, characterized in that the plurality of sentences are extracted from a second document in which the number of sentences is equal to or greater than a preset threshold, except for a first document in which the number of sentences constituting the document is less than a preset threshold among the plurality of documents .
상기 미리 설정된 임계치는,
상기 언어모델의 입력으로 적용되는 문장의 수에 상응하는 것을 특징으로 하는 언어처리방법.
10. The method of claim 9,
The preset threshold is,
A language processing method, characterized in that it corresponds to the number of sentences applied to the input of the language model.
상기 복수의 문서의 도메인을 분류하는 단계;
상기 분류된 도메인에 기반하여 적어도 하나의 추가문장을 추출하는 단계;
를 포함하는 것을 특징으로 하는 언어처리방법.
According to claim 1,
classifying domains of the plurality of documents;
extracting at least one additional sentence based on the classified domain;
A language processing method comprising a.
상기 복수의 문서의 도메인을 분류하는 단계는,
상기 복수의 문서를 구성하는 상기 복수의 텍스트로부터 센텐스 벡터를 추출하는 단계;
상기 센텐스 벡터를 미리 학습된 분류모델에 적용하여, 상기 복수의 텍스트에 대응하는 하나 이상의 후보 도메인(domaion prediction candidates)를 생성하는 단계;
를 포함하는 것을 특징으로 하는 언어처리방법.
12. The method of claim 11,
Classifying the domains of the plurality of documents includes:
extracting a sense vector from the plurality of texts constituting the plurality of documents;
generating one or more candidate domains corresponding to the plurality of texts by applying the sense vector to a pre-trained classification model;
A language processing method comprising a.
상기 추가문장을 추출하는 단계는,
상기 후보 도메인이 두괄식 문단으로 판단되면, 상기 두괄식 문단의 첫 번째 문장으로부터 순서대로 N 번째(N은 자연수)문장까지의 텍스트를 포함하는 추가 텍스트(additional text)을 추출하는 것을 특징으로 하는 언어처리방법.
13. The method of claim 12,
The step of extracting the additional sentence is,
When it is determined that the candidate domain is a paragraph in brackets, additional text including text from the first sentence of the paragraph in brackets to the N-th (N is a natural number) sentence in order is extracted. .
상기 추가문장을 추출하는 단계는,
상기 후보 도메인이 미괄식 문단으로 판단되면, 상기 미괄식 문단의 마지막 문장으로부터 역순으로 M 번째(M은 자연수)문장까지의 텍스트를 포함하는 추가문장을 추출하는 것을 특징으로 하는 언어처리방법.
13. The method of claim 12,
The step of extracting the additional sentence is,
When it is determined that the candidate domain is a paragraph in parentheses, an additional sentence including text from the last sentence of the paragraph in brackets to an M-th (M is a natural number) sentence in reverse order is extracted.
A computer system readable recording medium in which a program for executing the method of any one of claims 1 to 14 in a computer system is recorded.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190179964A KR102348689B1 (en) | 2019-12-31 | 2019-12-31 | Text summarization using sentiment score with sequence-to-sequence |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020190179964A KR102348689B1 (en) | 2019-12-31 | 2019-12-31 | Text summarization using sentiment score with sequence-to-sequence |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20210086192A true KR20210086192A (en) | 2021-07-08 |
KR102348689B1 KR102348689B1 (en) | 2022-01-07 |
Family
ID=76894056
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020190179964A KR102348689B1 (en) | 2019-12-31 | 2019-12-31 | Text summarization using sentiment score with sequence-to-sequence |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR102348689B1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102497436B1 (en) * | 2022-09-16 | 2023-02-08 | 주식회사 액션파워 | Method for acquiring information related to a target word based on content including a voice signal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120001053A (en) * | 2010-06-29 | 2012-01-04 | (주)워드워즈 | System and method for anaylyzing document sentiment |
KR20160117516A (en) * | 2014-01-31 | 2016-10-10 | 구글 인코포레이티드 | Generating vector representations of documents |
KR101851795B1 (en) * | 2017-12-22 | 2018-04-24 | 주식회사 마인드셋 | Apparatus and method for update of emotion dictionary using domain-specific terminology |
KR20190083143A (en) * | 2018-01-03 | 2019-07-11 | 세종대학교산학협력단 | Sensory evaluation method and apparatus |
-
2019
- 2019-12-31 KR KR1020190179964A patent/KR102348689B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20120001053A (en) * | 2010-06-29 | 2012-01-04 | (주)워드워즈 | System and method for anaylyzing document sentiment |
KR20160117516A (en) * | 2014-01-31 | 2016-10-10 | 구글 인코포레이티드 | Generating vector representations of documents |
KR101851795B1 (en) * | 2017-12-22 | 2018-04-24 | 주식회사 마인드셋 | Apparatus and method for update of emotion dictionary using domain-specific terminology |
KR20190083143A (en) * | 2018-01-03 | 2019-07-11 | 세종대학교산학협력단 | Sensory evaluation method and apparatus |
Also Published As
Publication number | Publication date |
---|---|
KR102348689B1 (en) | 2022-01-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112487182B (en) | Training method of text processing model, text processing method and device | |
CN110718223B (en) | Method, apparatus, device and medium for voice interaction control | |
US11210470B2 (en) | Automatic text segmentation based on relevant context | |
CN111783462A (en) | Chinese named entity recognition model and method based on dual neural network fusion | |
CN111312245B (en) | Voice response method, device and storage medium | |
CN110276259A (en) | Lip reading recognition methods, device, computer equipment and storage medium | |
CN111046179B (en) | Text classification method for open network question in specific field | |
CN112711948A (en) | Named entity recognition method and device for Chinese sentences | |
CN111833845A (en) | Multi-language speech recognition model training method, device, equipment and storage medium | |
US20230089308A1 (en) | Speaker-Turn-Based Online Speaker Diarization with Constrained Spectral Clustering | |
RU2712101C2 (en) | Prediction of probability of occurrence of line using sequence of vectors | |
Elshaer et al. | Transfer learning from sound representations for anger detection in speech | |
US20230065965A1 (en) | Text processing method and apparatus | |
CN113836992A (en) | Method for identifying label, method, device and equipment for training label identification model | |
CN114429635A (en) | Book management method | |
CN115393933A (en) | Video face emotion recognition method based on frame attention mechanism | |
Luo et al. | EmotionX-DLC: self-attentive BiLSTM for detecting sequential emotions in dialogue | |
CN115312033A (en) | Speech emotion recognition method, device, equipment and medium based on artificial intelligence | |
KR102348689B1 (en) | Text summarization using sentiment score with sequence-to-sequence | |
CN117610567A (en) | Named entity recognition algorithm based on ERNIE3.0_Att_IDCNN_BiGRU_CRF | |
CN115691475A (en) | Method for training a speech recognition model and speech recognition method | |
Kebe et al. | Bridging the gap: Using deep acoustic representations to learn grounded language from percepts and raw speech | |
CN115114437A (en) | Gastroscope text classification system based on BERT and double-branch network | |
CN115116470A (en) | Audio processing method and device, computer equipment and storage medium | |
CN115048515A (en) | Document classification method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant |