[go: up one dir, main page]

KR102770519B1 - Method and Apparatus for Natural Language Processing using External Knowledge - Google Patents

Method and Apparatus for Natural Language Processing using External Knowledge Download PDF

Info

Publication number
KR102770519B1
KR102770519B1 KR1020230137598A KR20230137598A KR102770519B1 KR 102770519 B1 KR102770519 B1 KR 102770519B1 KR 1020230137598 A KR1020230137598 A KR 1020230137598A KR 20230137598 A KR20230137598 A KR 20230137598A KR 102770519 B1 KR102770519 B1 KR 102770519B1
Authority
KR
South Korea
Prior art keywords
expression
natural language
input text
external knowledge
language processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
KR1020230137598A
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 포티투닷 주식회사
Priority to KR1020230137598A priority Critical patent/KR102770519B1/en
Priority to KR1020250019246A priority patent/KR20250054754A/en
Application granted granted Critical
Publication of KR102770519B1 publication Critical patent/KR102770519B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3332Query translation
    • G06F16/3334Selection or weighting of terms from queries, including natural language queries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents
    • G06F40/117Tagging; Marking up; Designating a block; Setting of attributes
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • G06N3/0455Auto-encoder networks; Encoder-decoder networks
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Evolutionary Computation (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)

Abstract

본 개시는 외부지식을 이용한 자연어 처리 방법 및 장치에 관한 것이다. 본 개시의 일 실시예에 따르면, 자연어 표현을 포함하는 입력 텍스트를 획득하는 단계; 기생성된 외부지식(external knowledge) 데이터베이스를 참조하여 상기 입력 텍스트에 대한 외부지식 참조 정보를 생성하는 단계; 상기 입력 텍스트 및 상기 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력하는 단계; 및 상기 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 상기 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 상기 자연어 처리 모델의 출력을 획득하는 단계를 포함하는, 외부지식을 이용한 자연어 처리 방법을 제공할 수 있다.The present disclosure relates to a method and device for natural language processing using external knowledge. According to one embodiment of the present disclosure, a method for natural language processing using external knowledge can be provided, including: a step of obtaining an input text including a natural language expression; a step of generating external knowledge reference information for the input text by referring to a pre-generated external knowledge database; a step of inputting the input text and the external knowledge reference information into a pre-learned natural language processing model; and a step of obtaining an output of the natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text.

Description

외부지식을 이용한 자연어 처리 방법 및 장치{Method and Apparatus for Natural Language Processing using External Knowledge}{Method and Apparatus for Natural Language Processing using External Knowledge}

본 개시는 외부지식을 이용한 자연어 처리 방법 및 장치에 관한 것이다.The present disclosure relates to a method and device for natural language processing using external knowledge.

최근 자연어 처리(NLP) 기술의 발전으로, 인간인 사용자와 인공지능 에이전트간 자연스러운 대화를 제공하는 서비스가 가능하게 되었다. 이러한 대화형 인공지능 서비스는 챗봇(chat bot) 또는 음성 인식 비서 등으로 다양한 기술 분야와 다양한 서비스 분야에 활용되고 있다.Recent advances in natural language processing (NLP) technology have made it possible to provide services that provide natural conversations between human users and AI agents. These conversational AI services are being utilized in various technological fields and service fields, such as chatbots or voice recognition assistants.

특히, 인공지능 에이전트를 이용하여 사용자의 특수한 요구를 만족시키는 것을 목적으로 하는 목적지향 대화시스템(task-oriented dialogue system)의 중요성이 대두되고 있으며, 이러한 목적지향 대화시스템은 사용자의 입력 텍스트에 대한 의도 분류(intent classification)와 슬롯 태깅(slot tagging)을 주요한 과업으로 한다.In particular, the importance of task-oriented dialogue systems that aim to satisfy users' specific needs by using artificial intelligence agents is increasing, and the main tasks of such task-oriented dialogue systems are intent classification and slot tagging of users' input text.

종래 기술에 따른 조건부 무작위장(CRF, Conditional Random Field)에 기반한 시스템의 경우 슬롯 태깅 과업에서 각 토큰에 대한 결과값을 순차적으로 추론함으로써 각 토큰 주변의 언어적 맥락을 고려하여 상대적으로 높은 정확도의 결과값을 얻을 수 있으나 연산 속도가 느리다는 문제점이 존재하였다.In the case of a system based on a conditional random field (CRF) according to the prior art, a relatively high accuracy result value can be obtained by sequentially inferring the result value for each token in the slot tagging task and considering the linguistic context around each token, but there was a problem that the computation speed was slow.

또한, 종래 기술에 따른 비자기회귀(non-autoregressive) 기법에 기반한 시스템의 경우 상대적으로 빠른 연산 속도로 과업 수행이 가능하나 추론된 결과값의 정확도가 낮다는 문제점이 존재하였다.In addition, in the case of systems based on non-autoregressive techniques according to conventional technology, there was a problem that although tasks could be performed at a relatively fast computational speed, the accuracy of the inferred results was low.

즉, 의도 분류와 슬롯 태깅 과업을 수행하는 종래의 자연어 처리 모델은 정확도와 연산 속도가 반비례할 수밖에 없었으므로, 높은 정확도로 상기 과업들을 수행하면서도 상기 과업들의 수행을 위한 빠른 연산이 가능하도록 하는 새로운 기술이 필요한 실정이다.That is, since conventional natural language processing models that perform intent classification and slot tagging tasks inevitably have inversely proportional accuracy and computational speed, a new technology is needed that enables fast computation for performing the tasks while performing the tasks with high accuracy.

전술한 배경기술은 발명자가 본 발명의 도출을 위해 보유하고 있었거나, 본 발명의 도출 과정에서 습득한 기술 정보로서, 반드시 본 발명의 출원 전에 일반 공중에게 공개된 공지기술이라 할 수는 없다.The background technology described above is technical information that the inventor possessed for deriving the present invention or acquired in the process of deriving the present invention, and cannot necessarily be considered as publicly known technology disclosed to the general public prior to the application for the present invention.

본 개시는 외부지식을 이용한 자연어 처리 방법 및 장치를 제공한다. 본 개시가 해결하고자 하는 과제는 이상에서 언급한 과제에 한정되지 않으며, 언급되지 않은 본 개시의 다른 과제 및 장점들은 하기의 설명에 의해서 이해될 수 있고, 본 개시의 실시 예에 의해보다 분명하게 이해될 것이다. 또한, 본 개시가 해결하고자 하는 과제 및 장점들은 특허 청구 범위에 나타낸 수단 및 그 조합에 의해 실현될 수 있음을 알 수 있을 것이다.The present disclosure provides a natural language processing method and device using external knowledge. The problems to be solved by the present disclosure are not limited to the problems mentioned above, and other problems and advantages of the present disclosure that are not mentioned can be understood by the following description, and will be more clearly understood by the embodiments of the present disclosure. In addition, it will be understood that the problems and advantages to be solved by the present disclosure can be realized by the means and combinations thereof indicated in the patent claims.

상술한 기술적 과제를 달성하기 위한 기술적 수단으로서, 본 개시의 제1 측면은, 자연어 표현을 포함하는 입력 텍스트를 획득하는 단계; 기생성된 외부지식(external knowledge) 데이터베이스를 참조하여 상기 입력 텍스트에 대한 외부지식 참조 정보를 생성하는 단계; 상기 입력 텍스트 및 상기 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력하는 단계; 및 상기 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 상기 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 상기 자연어 처리 모델의 출력을 획득하는 단계를 포함하는, 외부지식을 이용한 자연어 처리 방법을 제공할 수 있다.As a technical means for achieving the above-described technical task, a first aspect of the present disclosure can provide a natural language processing method using external knowledge, including: a step of obtaining an input text including a natural language expression; a step of generating external knowledge reference information for the input text by referring to a pre-generated external knowledge database; a step of inputting the input text and the external knowledge reference information into a pre-learned natural language processing model; and a step of obtaining an output of the natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text.

본 개시의 제2 측면은, 외부 장치와 통신을 수행하는 통신 모듈; 적어도 하나의 프로그램이 저장된 메모리; 및 상기 적어도 하나의 프로그램을 실행함으로써 동작하는 프로세서를 포함하되, 상기 프로세서는, 자연어 표현을 포함하는 입력 텍스트를 획득하도록 상기 통신 모듈을 제어하고, 기생성된 외부지식(external knowledge) 데이터베이스를 참조하여 상기 입력 텍스트에 대한 외부지식 참조 정보를 생성하고, 상기 입력 텍스트 및 상기 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력하고, 상기 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 상기 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 상기 자연어 처리 모델의 출력을 획득하는, 외부지식을 이용한 자연어 처리 장치를 제공할 수 있다.A second aspect of the present disclosure may provide a natural language processing device using external knowledge, comprising: a communication module for performing communication with an external device; a memory having at least one program stored therein; and a processor operating by executing the at least one program, wherein the processor controls the communication module to obtain an input text including a natural language expression, generates external knowledge reference information for the input text by referencing a pre-generated external knowledge database, inputs the input text and the external knowledge reference information into a pre-learned natural language processing model, and obtains an output of the natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text.

본 개시의 제3 측면은, 본 개시의 제1 측면의 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공할 수 있다.A third aspect of the present disclosure can provide a computer-readable recording medium having recorded thereon a program for executing the method of the first aspect of the present disclosure on a computer.

전술한 것 외의 다른 측면, 특징, 이점이 이하의 도면, 특허청구범위 및 발명의 상세한 설명으로부터 명확해질 것이다.Other aspects, features and advantages other than those described above will become apparent from the following drawings, claims and detailed description of the invention.

전술한 본 개시의 과제 해결 수단에 의하면, 외부지식 데이터베이스를 참조함으로써 높은 정확도로 의도 분류 과업과 슬롯 태깅 과업을 수행할 수 있다.According to the problem solving means of the present disclosure described above, the intention classification task and the slot tagging task can be performed with high accuracy by referencing an external knowledge database.

또한, 본 개시의 과제 해결 수단에 의하면, 비자기회귀 기법에 기반하여 슬롯 태깅 정보를 생성하는 분류자를 이용함으로써 빠른 연산 속도로 슬롯 태깅 과업을 수행할 수 있다.In addition, according to the problem solving means of the present disclosure, the slot tagging task can be performed at a high computational speed by using a classifier that generates slot tagging information based on a non-self-regression technique.

또한, 본 개시의 과제 해결 수단에 의하면, 외부지식 데이터베이스를 참조하고, 비자기회귀 기법에 기반하여 슬롯 태깅 정보를 생성하는 분류자를 이용함으로써, 종래 기술에 따른 연산 속도와 정확도간 상충관계를 극복할 수 있다.In addition, according to the problem solving means of the present disclosure, the trade-off between computational speed and accuracy according to the prior art can be overcome by using a classifier that references an external knowledge database and generates slot tagging information based on a non-self-regression technique.

도 1은 일 실시예에 따른 사용자 단말, 자연어 처리 장치 및 외부지식 데이터베이스를 포함하는 시스템의 개략적인 구성도이다.
도 2는 일 실시예에 따라 외부지식 데이터베이스를 참조하여 외부지식 참조 정보를 생성하는 과정을 설명하기 위한 예시적인 도면이다.
도 3은 일 실시예에 따른 표현, 표현에 대한 유형 및 외부지식 데이터베이스에 포함된 표현-유형 쌍을 설명하기 위한 예시적인 도면이다.
도 4는 일 실시예에 따라 입력 텍스트를 복수개의 n-그램으로 분리하고, 외부지식 데이터베이스에서 복수개의 n-그램을 검색하는 과정을 설명하기 위한 예시적인 도면이다.
도 5는 일 실시예에 따라 소정의 기준에 기초하여 유형을 표현에 매칭하는 과정을 설명하기 위한 예시적인 도면이다.
도 6은 일 실시예에 따른 자연어 처리 모델을 설명하기 위한 예시적인 도면이다.
도 7은 일 실시예에 따른 자연어 처리 모델에 포함되는 모델 인코더를 설명하기 위한 예시적인 도면이다.
도 8은 일 실시예에 따른 자연어 처리 모델에 포함되는 모델 디코더 및 분류자를 설명하기 위한 예시적인 도면이다.
도 9는 일 실시예에 따라 비자기회귀 기법에 기반하여 슬롯 태깅 정보를 생성하는 제2 분류자를 설명하기 위한 예시적인 도면이다.
도 10은 외부지식을 이용하여 자연어를 처리하는 방법의 일 예시이다.
도 11은 일 실시예에 따른 자연어 처리 장치의 블록도이다.
FIG. 1 is a schematic configuration diagram of a system including a user terminal, a natural language processing device, and an external knowledge database according to one embodiment.
FIG. 2 is an exemplary diagram for explaining a process of generating external knowledge reference information by referencing an external knowledge database according to one embodiment.
FIG. 3 is an exemplary diagram illustrating an expression, a type for the expression, and an expression-type pair included in an external knowledge database according to one embodiment.
FIG. 4 is an exemplary diagram for explaining a process of dividing an input text into a plurality of n-grams and searching for the plurality of n-grams in an external knowledge database according to one embodiment.
FIG. 5 is an exemplary diagram for explaining a process of matching a type to an expression based on a predetermined criterion according to one embodiment.
FIG. 6 is an exemplary diagram for explaining a natural language processing model according to one embodiment.
FIG. 7 is an exemplary diagram for explaining a model encoder included in a natural language processing model according to one embodiment.
FIG. 8 is an exemplary diagram illustrating a model decoder and classifier included in a natural language processing model according to one embodiment.
FIG. 9 is an exemplary diagram illustrating a second classifier that generates slot tagging information based on a non-self-regression technique according to one embodiment.
Figure 10 is an example of a method for processing natural language using external knowledge.
Fig. 11 is a block diagram of a natural language processing device according to one embodiment.

본 발명의 이점 및 특징, 그리고 그것들을 달성하는 방법은 첨부되는 도면과 함께 상세하게 설명되는 실시예들을 참조하면 명확해질 것이다. 그러나 본 발명은 아래에서 제시되는 실시예들로 한정되는 것이 아니라, 서로 다른 다양한 형태로 구현될 수 있고, 본 발명의 사상 및 기술 범위에 포함되는 모든 변환, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 아래에 제시되는 실시예들은 본 발명의 개시가 완전하도록 하며, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 발명의 범주를 완전하게 알려주기 위해 제공되는 것이다. 본 발명을 설명함에 있어서 관련된 공지 기술에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우 그 상세한 설명을 생략한다.The advantages and features of the present invention, and the methods for achieving them, will become clear with reference to the embodiments described in detail together with the accompanying drawings. However, the present invention is not limited to the embodiments presented below, but can be implemented in various different forms, and it should be understood to include all transformations, equivalents, and substitutes included in the spirit and technical scope of the present invention. The embodiments presented below are provided to ensure that the disclosure of the present invention is complete, and to fully inform a person having ordinary skill in the art to which the present invention belongs of the scope of the invention. In describing the present invention, if it is determined that a specific description of a related known technology may obscure the gist of the present invention, the detailed description thereof will be omitted.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다. The terminology used in this application is only used to describe specific embodiments and is not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly indicates otherwise. In this application, the terms "comprises" or "has" and the like are intended to specify the presence of a feature, number, step, operation, component, part or combination thereof described in the specification, but should be understood to not exclude in advance the possibility of the presence or addition of one or more other features, numbers, steps, operations, components, parts or combinations thereof.

본 개시의 일부 실시예는 기능적인 블록 구성들 및 다양한 처리 단계들로 나타내어질 수 있다. 이러한 기능 블록들의 일부 또는 전부는, 특정 기능들을 실행하는 다양한 개수의 하드웨어 및/또는 소프트웨어 구성들로 구현될 수 있다. 예를 들어, 본 개시의 기능 블록들은 하나 이상의 마이크로프로세서들에 의해 구현되거나, 소정의 기능을 위한 회로 구성들에 의해 구현될 수 있다. 또한, 예를 들어, 본 개시의 기능 블록들은 다양한 프로그래밍 또는 스크립팅 언어로 구현될 수 있다. 기능 블록들은 하나 이상의 프로세서들에서 실행되는 알고리즘으로 구현될 수 있다. 또한, 본 개시는 전자적인 환경 설정, 신호 처리, 및/또는 데이터 처리 등을 위하여 종래 기술을 채용할 수 있다."매커니즘", "요소", "수단" 및 "구성"등과 같은 용어는 넓게 사용될 수 있으며, 기계적이고 물리적인 구성들로서 한정되는 것은 아니다.Some embodiments of the present disclosure may be represented by functional block configurations and various processing steps. Some or all of these functional blocks may be implemented by various numbers of hardware and/or software configurations that perform specific functions. For example, the functional blocks of the present disclosure may be implemented by one or more microprocessors, or by circuit configurations for a given function. Also, for example, the functional blocks of the present disclosure may be implemented by various programming or scripting languages. The functional blocks may be implemented by algorithms that are executed on one or more processors. In addition, the present disclosure may employ conventional techniques for electronic environment settings, signal processing, and/or data processing, etc. Terms such as "mechanism", "element", "means", and "configuration" may be used broadly and are not limited to mechanical and physical configurations.

또한, 도면에 도시된 구성 요소들 간의 연결 선 또는 연결 부재들은 기능적인 연결 및/또는 물리적 또는 회로적 연결들을 예시적으로 나타낸 것일 뿐이다. 실제 장치에서는 대체 가능하거나 추가된 다양한 기능적인 연결, 물리적인 연결, 또는 회로 연결들에 의해 구성 요소들 간의 연결이 나타내어질 수 있다.In addition, the connecting lines or connecting members between components depicted in the drawings are only illustrative of functional connections and/or physical or circuit connections. In an actual device, connections between components may be represented by various functional connections, physical connections, or circuit connections that may be replaced or added.

이하 첨부된 도면을 참고하여 본 개시를 상세히 설명하기로 한다.The present disclosure will be described in detail with reference to the attached drawings below.

도 1은 일 실시예에 따른 사용자 단말, 자연어 처리 장치 및 외부지식 데이터베이스를 포함하는 시스템의 개략적인 구성도이다.FIG. 1 is a schematic configuration diagram of a system including a user terminal, a natural language processing device, and an external knowledge database according to one embodiment.

도 1을 참조하면, 일 실시예에 따른 시스템(100)은 사용자 단말(110), 자연어 처리 장치(120) 및 외부지식(external knowledge) 데이터베이스(130)를 포함할 수 있다.Referring to FIG. 1, a system (100) according to one embodiment may include a user terminal (110), a natural language processing device (120), and an external knowledge database (130).

본 개시의 사용자 단말(110)은 인공지능 대화 서비스를 이용하는 사용자의 단말로서, 일 실시예에 따른 사용자 단말(110)은 사용자가 텍스트를 입력할 수 있도록 사용자에게 인터페이스를 제공하는 단말을 포함할 수 있다.The user terminal (110) of the present disclosure is a terminal of a user who uses an artificial intelligence conversation service, and the user terminal (110) according to one embodiment may include a terminal that provides an interface to a user so that the user can input text.

일 실시예에 따른 사용자 단말(110)은 스마트폰, 태블릿 PC, PC, 스마트 TV, 휴대폰, PDA(personal digital assistant), 랩톱, 미디어 플레이어, 마이크로 서버, GPS(global positioning system) 장치, 전자책 단말기, 디지털방송용 단말기, 네비게이션, 키오스크, MP3 플레이어, 디지털 카메라, 가전기기, 카메라가 탑재된 디바이스 및 기타 모바일 또는 비모바일 컴퓨팅 장치일 수 있다. 또한, 사용자 단말(210)은 통신 기능 및 데이터 프로세싱 기능을 구비한 시계, 안경, 헤어 밴드 및 반지 등의 웨어러블 디바이스일 수 있으나, 이에 한정되지 않는다.The user terminal (110) according to one embodiment may be a smart phone, a tablet PC, a PC, a smart TV, a mobile phone, a PDA (personal digital assistant), a laptop, a media player, a micro server, a GPS (global positioning system) device, an e-book reader, a digital broadcasting terminal, a navigation device, a kiosk, an MP3 player, a digital camera, a home appliance, a device equipped with a camera, and other mobile or non-mobile computing devices. In addition, the user terminal (210) may be a wearable device such as a watch, glasses, a hair band, and a ring equipped with a communication function and a data processing function, but is not limited thereto.

한편, 다른 일 실시예에 따르면, 도 1에 도시된 것과 달리 시스템(100)은 사용자 단말(110)을 포함하지 않을 수 있으며, 자연어 처리 장치(120)는 사용자로부터 텍스트 입력을 직접 수신할 수 있다.Meanwhile, according to another embodiment, unlike that illustrated in FIG. 1, the system (100) may not include a user terminal (110), and the natural language processing device (120) may directly receive text input from the user.

본 개시의 자연어 처리 장치(120)는, 자연어 처리를 활용하는 각종 서비스, 인공지능 대화 서비스 또는 목적지향 대화 서비스를 제공할 수 있는 웹 및/또는 앱을 관리하는 모든 종류의 서버를 의미할 수 있으며 각종 관리 플랫폼의 홈페이지 등을 관리하는 서버를 의미할 수 있다. 그러나, 이에 제한되지 않는다.The natural language processing device (120) of the present disclosure may mean any type of server that manages a web and/or app that can provide various services utilizing natural language processing, artificial intelligence conversation services, or destination-oriented conversation services, and may mean a server that manages homepages of various management platforms, etc. However, it is not limited thereto.

일 실시예에 따른 자연어 처리 장치(120)는 차량 등에 탑재된 컴퓨팅 장치 등 이동성을 가진 모바일 전자 장치를 포함할 수 있으며, 또는, 스마트폰, 태블릿 PC, PC, 스마트 TV, PDA(personal digital assistant), 랩톱, 미디어 플레이어, 내비게이션 및 기타 모바일 전자 장치 등으로 구현될 수 있다.A natural language processing device (120) according to one embodiment may include a mobile electronic device having mobility, such as a computing device mounted on a vehicle, or may be implemented as a smartphone, tablet PC, PC, smart TV, PDA (personal digital assistant), laptop, media player, navigation, and other mobile electronic devices.

본 개시의 외부지식 데이터베이스(130)는 자연어 처리 장치(120)가 입력 텍스트에 대한 자연어 처리를 수행하는 과정에서 참조 가능한 외부지식 정보를 저장하는 데이터베이스이다. 일 실시예에 따른 외부지식 정보는 자연어 처리 장치(120)의 관리 주체, 즉 인공지능 대화 서비스를 제공하는 서버 관리 주체 등에 의해 미리 생성될 수 있다. 외부지식 데이터베이스(130)에 저장되는 정보의 구조 및 종류 등은 도 3 등을 참조하여 후술하도록 한다.The external knowledge database (130) of the present disclosure is a database that stores external knowledge information that can be referenced in the process of the natural language processing device (120) performing natural language processing on input text. The external knowledge information according to one embodiment may be created in advance by the management entity of the natural language processing device (120), i.e., the management entity of a server providing an artificial intelligence conversation service. The structure and types of information stored in the external knowledge database (130) will be described later with reference to FIG. 3, etc.

외부지식 데이터베이스(130)는 DRAM(dynamic random access memory), SRAM(static random access memory) 등과 같은 RAM(random access memory), ROM(read-only memory), EEPROM(electrically erasable programmable read-only memory), CD-ROM, 블루레이 또는 다른 광학 디스크 스토리지, HDD(hard disk drive), SSD(solid state drive), 또는 플래시 메모리를 포함할 수 있다.The external knowledge database (130) may include random access memory (RAM) such as dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD-ROM, Blu-ray or other optical disk storage, hard disk drive (HDD), solid state drive (SSD), or flash memory.

일 실시예에 따르면, 외부지식 데이터베이스(130)는 도 1에 도시된 바와 같이 자연어 처리 장치(120)의 외부에서 자연어 처리 장치(120)와 네트워크를 이용하여 통신을 수행함으로써 외부지식 정보를 제공하는 저장 매체를 포함할 수 있다. 예를 들어, 외부지식 데이터베이스(130)는 자연어 처리 장치(120)가 네트워크를 이용하여 접근 가능한 클라우드 서버일 수 있다.According to one embodiment, the external knowledge database (130) may include a storage medium that provides external knowledge information by performing communication with the natural language processing device (120) using a network outside of the natural language processing device (120), as illustrated in FIG. 1. For example, the external knowledge database (130) may be a cloud server that the natural language processing device (120) can access using a network.

한편, 다른 일 실시예에 따르면, 외부지식 데이터베이스(130)는 도 1에 도시된 바와 달리 자연어 처리 장치(120)의 일부로서 포함되어 자연어 처리 장치(120)로부터 직접 접근이 가능한 저장 매체를 포함할 수 있다.Meanwhile, according to another embodiment, the external knowledge database (130) may include a storage medium that is included as a part of the natural language processing device (120) and can be directly accessed from the natural language processing device (120), unlike as shown in FIG. 1.

도 1에 도시된 각각의 장치들은 상호간 및/또는 다른 장치와 네트워크를 통하여 통신할 수 있다. 네트워크는 서로 다른 주체들이 서로 원활하게 통신을 할 수 있도록 하는 포괄적인 의미의 데이터 통신망이며, 유선 인터넷, 무선 인터넷 및 모바일 무선 통신망을 포함할 수 있다. 예를 들어, 네트워크는 근거리 통신망(Local Area Network; LAN), 광역 통신망(Wide Area Network; WAN), 부가가치 통신망(Value Added Network; VAN), 이동 통신망(mobile radio communication network), 위성 통신망 및 이들의 상호 조합을 포함할 수 있다. 또한, 무선 통신은 예를 들어, 무선 랜(Wi-Fi), 블루투스, 저전력 블루투스(Bluetooth low energy), 지그비(ZigBee), WFD(Wi-Fi Direct), UWB(ultra-wideband), 적외선 통신(IrDA, infrared Data Association), NFC(Near Field Communication) 등이 있을 수 있으나, 이에 한정되는 것은 아니다.Each of the devices illustrated in FIG. 1 can communicate with each other and/or with other devices via a network. A network is a comprehensive data communication network that allows different entities to communicate smoothly with each other, and may include wired Internet, wireless Internet, and mobile radio communication networks. For example, the network may include a Local Area Network (LAN), a Wide Area Network (WAN), a Value Added Network (VAN), a mobile radio communication network, a satellite communication network, and combinations thereof. In addition, wireless communication may include, but is not limited to, wireless LAN (Wi-Fi), Bluetooth, Bluetooth low energy, ZigBee, Wi-Fi Direct (WFD), ultra-wideband (UWB), infrared data association (IrDA), and near field communication (NFC).

일 실시예에 따르면, 사용자 단말(110)은 사용자로부터 입력된 입력 텍스트를 네트워크를 통한 통신을 수행함으로써 자연어 처리 장치(120)로 전송할 수 있고, 자연어 처리 장치(120)는 입력 텍스트를 획득할 수 있다. 한편, 다른 일 실시예에 따르면, 자연어 처리 장치(120)는 사용자에 대한 자체적인 입력 인터페이스를 포함할 수 있으며, 사용자로부터 직접 입력 텍스트를 입력 받을 수 있다.According to one embodiment, the user terminal (110) can transmit an input text input by the user to the natural language processing device (120) by performing communication through a network, and the natural language processing device (120) can obtain the input text. Meanwhile, according to another embodiment, the natural language processing device (120) can include its own input interface for the user and can directly receive an input text from the user.

또한, 일 실시예에 따르면, 자연어 처리 장치(120)는 네트워크를 통한 통신을 수행함으로써 외부지식 데이터베이스(130)를 참조할 수 있다. 자연어 처리 장치(120)는 기생성된 외부지식 데이터베이스(130)를 참조하여 입력 텍스트에 대한 외부지식 참조 정보를 생성할 수 있다. 이때, 자연어 처리 장치(120)는 네트워크를 통한 통신을 수행함으로써 외부지식 데이터베이스(130)에 저장된 데이터의 일종인 대상 쌍을 획득할 수 있다.In addition, according to one embodiment, the natural language processing device (120) can refer to an external knowledge database (130) by performing communication through a network. The natural language processing device (120) can generate external knowledge reference information for an input text by referring to the pre-generated external knowledge database (130). At this time, the natural language processing device (120) can obtain a target pair, which is a type of data stored in the external knowledge database (130), by performing communication through a network.

또한, 일 실시예에 따르면, 자연어 처리 장치(120)는 네트워크를 통한 통신을 수행함으로써 외부지식 데이터베이스(130)에서 입력 텍스트에 관련된 정보 검색을 수행할 수 있다. 예를 들어, 자연어 처리 장치(120)는 외부지식 데이터베이스(130)에서 입력 텍스트에 대한 복수개의 n-그램을 검색할 수 있다.Additionally, according to one embodiment, the natural language processing device (120) can perform a search for information related to the input text in an external knowledge database (130) by performing communication through a network. For example, the natural language processing device (120) can search for a plurality of n-grams for the input text in the external knowledge database (130).

또한, 일 실시예에 따르면, 자연어 처리 장치(120)는 의도 분류 정보 및 슬롯 태깅 정보에 기초하여 생성되는 입력 텍스트에 대한 응답을, 네트워크를 통한 통신을 수행함으로써 사용자 단말(110)로 전송할 수 있다. 이때, 사용자 단말(110)은 입력 텍스트에 대한 응답을 사용자에게 표시할 수 있다. 한편, 다른 일 실시예에 따르면, 자연어 처리 장치(120)는 자체적인 표시부를 포함할 수 있으며, 표시부를 통해 입력 텍스트에 대한 응답을 표시할 수 있다.In addition, according to one embodiment, the natural language processing device (120) may transmit a response to an input text generated based on intent classification information and slot tagging information to the user terminal (110) by performing communication through a network. At this time, the user terminal (110) may display the response to the input text to the user. Meanwhile, according to another embodiment, the natural language processing device (120) may include its own display unit and may display the response to the input text through the display unit.

도 2는 일 실시예에 따라 외부지식 데이터베이스를 참조하여 외부지식 참조 정보를 생성하는 과정을 설명하기 위한 예시적인 도면이다.FIG. 2 is an exemplary diagram for explaining a process of generating external knowledge reference information by referencing an external knowledge database according to one embodiment.

자연어 처리 장치(120)는 자연어 표현을 포함하는 입력 텍스트(201)를 획득할 수 있다. 본 개시에서 자연어 표현은 사람의 의사소통에서 사용되는 언어로 이루어지는 표현이며, 일 실시예에 따른 자연어 표현은 단어 및 구문 등의 표현을 포함할 수 있다.A natural language processing device (120) can obtain an input text (201) including a natural language expression. In the present disclosure, a natural language expression is an expression made up of a language used in human communication, and a natural language expression according to one embodiment can include expressions such as words and phrases.

도 1을 참조하여 상술한 바와 같이, 일 실시예에 따른 자연어 처리 장치(120)는 사용자 단말(110)과 네트워크를 통한 통신을 수행함으로써 입력 텍스트(201)를 획득하거나, 사용자로부터 직접 입력 텍스트(201)를 입력 받음으로써 입력 텍스트(201)를 획득할 수 있다.As described above with reference to FIG. 1, a natural language processing device (120) according to one embodiment may obtain an input text (201) by performing communication with a user terminal (110) through a network, or obtain an input text (201) by directly receiving the input text (201) from a user.

도 2를 참조하면, 자연어 처리 장치(120)는 기생성된 외부지식 데이터베이스(130)를 참조하여 입력 텍스트(201)에 대한 외부지식 참조 정보(202)를 생성할 수 있다.Referring to FIG. 2, the natural language processing device (120) can generate external knowledge reference information (202) for input text (201) by referencing a parasitic external knowledge database (130).

일 실시예에 따르면, 자연어 처리 장치(120)는 외부지식 데이터베이스(130)에서 입력 텍스트(201)에 관련된 외부지식 정보를 조회 또는 검색함으로써 외부지식 데이터베이스(130)를 참조할 수 있다.According to one embodiment, the natural language processing device (120) can refer to the external knowledge database (130) by searching or retrieving external knowledge information related to the input text (201) from the external knowledge database (130).

일 실시예에 따르면, 자연어 처리 장치(120)는 외부지식 데이터베이스(130)를 참조함으로써 외부지식 데이터베이스(130)에 저장된 외부지식 정보 중 입력 텍스트(201)에 대한 응답을 생성하는 과정에서 이용될 수 있는 외부지식 정보를 선택하여 획득할 수 있다.According to one embodiment, the natural language processing device (120) can select and acquire external knowledge information that can be used in the process of generating a response to an input text (201) from among external knowledge information stored in the external knowledge database (130) by referencing the external knowledge database (130).

본 개시의 외부지식 참조 정보(202)는 입력 텍스트(201)에 포함된 자연어 표현에 자연어 표현의 유형이 매칭된 정보를 의미한다. 일 실시예에 따르면, 외부지식 참조 정보(202)는 입력 텍스트(201)를 구성하는 각각의 문자에 있어서 자연어 표현에 대응되는 위치의 문자에 대하여 자연어 표현의 유형이 매칭된 정보를 포함할 수 있다.The external knowledge reference information (202) of the present disclosure means information that matches the type of natural language expression to the natural language expression included in the input text (201). According to one embodiment, the external knowledge reference information (202) may include information that matches the type of natural language expression to a character at a position corresponding to the natural language expression for each character constituting the input text (201).

도 3은 일 실시예에 따른 표현, 표현에 대한 유형 및 외부지식 데이터베이스에 포함된 표현-유형 쌍을 설명하기 위한 예시적인 도면이다.FIG. 3 is an exemplary diagram illustrating an expression, a type for the expression, and an expression-type pair included in an external knowledge database according to one embodiment.

도 3을 참조하면, 일 실시예에 따른 외부지식 데이터베이스(130)는 표현(320) 및 표현에 대한 유형(310)으로 구성되는 복수개의 표현-유형 쌍을 포함할 수 있다. 일 실시예에 따른 표현(320)은 자연어 표현을 포함할 수 있으며, 단어 및 구문을 포함할 수 있다. 예를 들어, 표현(320)은 서울, 홍길동, 서울은행 등의 자연어 표현을 포함할 수 있다.Referring to FIG. 3, an external knowledge database (130) according to one embodiment may include a plurality of expression-type pairs, each of which consists of an expression (320) and a type (310) for the expression. The expression (320) according to one embodiment may include a natural language expression, and may include words and phrases. For example, the expression (320) may include natural language expressions such as Seoul, Hong Gil-dong, and Seoul Bank.

일 실시예에 따른 표현에 대한 유형(310)은 표현(320)이 어떤 범주에 속하는지를 나타내는 분류를 포함할 수 있다. 예를 들어, 표현에 대한 유형(310)은 표현(320)이 어떤 종류의 객체나 개념을 지시하는지를 분류하는데 이용되는 레이블 또는 태그로서 설정될 수 있다.A type (310) for an expression according to one embodiment may include a classification indicating which category the expression (320) belongs to. For example, the type (310) for an expression may be set as a label or tag used to classify what kind of object or concept the expression (320) indicates.

한편, 특정한 분야 또는 전문 영역에 있어서 자연어 처리 과정에 필요한 정보와 정보의 특성이 상이할 수 있다. 일 실시예에 따른 외부지식 데이터베이스(130)는 자연어 처리 장치(120)가 이용되는 목적 또는 이용되는 분야에 따라 달리 생성될 수 있다. 즉, 외부지식 데이터베이스(130)는 자연어 처리 장치(120)가 해결하고자 하는 문제 영역인 도메인(domain)에 따라 달리 생성될 수 있다.Meanwhile, the information required for the natural language processing process and the characteristics of the information may be different in a specific field or specialized area. The external knowledge database (130) according to one embodiment may be created differently depending on the purpose or field in which the natural language processing device (120) is used. That is, the external knowledge database (130) may be created differently depending on the domain, which is the problem area that the natural language processing device (120) is trying to solve.

일 실시예에 따른 도메인은, 네비게이션, 지도 서비스, 예약 서비스, 의료기록 분석, 진료 대화 분석, 법률문서 분석, 주식시장 분석 및/또는 부동산 정보 분석 등 인공지능을 이용한 자연어 처리가 유용하게 이용될 수 있는 다양한 영역 중 적어도 하나를 포함할 수 있다.A domain according to one embodiment may include at least one of various areas in which natural language processing using artificial intelligence can be usefully utilized, such as navigation, map services, reservation services, medical record analysis, medical conversation analysis, legal document analysis, stock market analysis, and/or real estate information analysis.

한편, 일 실시예에 따르면 도메인은 입력 텍스트(201)가 획득되기 전 미리 선택될 수 있다. 일 실시예에 따르면, 선택된 도메인에 기초하여 복수의 데이터베이스 중 자연어 처리 장치(120)에 의해 이용되는 외부지식 데이터베이스(130)가 선택될 수 있다.Meanwhile, according to one embodiment, a domain may be pre-selected before the input text (201) is acquired. According to one embodiment, an external knowledge database (130) utilized by the natural language processing device (120) among a plurality of databases may be selected based on the selected domain.

다른 일 실시예에 따르면, 선택된 도메인에 기초하여 외부지식 데이터베이스(130) 내에서 참조의 대상이 되는 유형이 설정될 수 있다. 예를 들어, 제1 도메인이 선택되는 경우, 지역명 및 기관명을 유형으로 하는 외부지식 정보가 참조의 대상이 되고, 제2 도메인이 선택되는 경우, 지역명 및 인물명을 유형으로 하는 외부지식 정보가 참조의 대상이 될 수 있다.According to another embodiment, a type that is a target of reference in an external knowledge database (130) may be set based on a selected domain. For example, when a first domain is selected, external knowledge information with a region name and an organization name as types may be a target of reference, and when a second domain is selected, external knowledge information with a region name and a person name as types may be a target of reference.

일 실시예에 따르면, 도메인에 따라서 외부지식 데이터베이스(130)에 저장되는 표현(320) 및 표현에 대한 유형(310)의 종류가 상이할 수 있으며, 도메인에 따라서 동일한 표현이더라도 상이한 유형에 매핑될 수 있다.According to one embodiment, the types of expressions (320) and types (310) for expressions stored in an external knowledge database (130) may be different depending on the domain, and even the same expressions may be mapped to different types depending on the domain.

나아가, 자연어 처리 장치(120)가 동일한 도메인에서 이용되는 경우에도, 외부지식 데이터베이스(130)의 생성 주체에 따라 적절하게 이용될 수 있는 외부지식 정보가 상이하게 채택될 수 있으므로, 외부지식 데이터베이스(130)에 저장된 표현(320) 및 표현에 대한 유형(310)이 상이할 수 있으며, 동일한 표현이 상이한 유형에 매핑될 수 있다.Furthermore, even when the natural language processing device (120) is used in the same domain, external knowledge information that can be appropriately used may be adopted differently depending on the creator of the external knowledge database (130), so the expression (320) stored in the external knowledge database (130) and the type (310) for the expression may be different, and the same expression may be mapped to different types.

일 실시예에 따른 표현에 대한 유형(310)은, 도메인에 기초하여 설정되는 적어도 하나의 유형을 포함할 수 있다.A type (310) for an expression according to one embodiment may include at least one type set based on a domain.

예를 들어, 도메인이 네비게이션 또는 지도 서비스로 선택되는 경우, 표현에 대한 유형(310)은 지역명 및/또는 기관명 등으로 설정될 수 있다.For example, if the domain is selected as a navigation or map service, the type (310) for the expression may be set to a place name and/or an organization name, etc.

다른 예를 들어, 도메인이 예약 서비스로 선택되는 경우, 표현에 대한 유형(310)은 지역명, 기관명 및/또는 인물명 등으로 설정될 수 있다.For another example, if a domain is selected as a reservation service, the type (310) for the expression may be set to a region name, an organization name, and/or a person name.

또 다른 예를 들어, 도메인이 의료 기록 분석 또는 진료 대화 분석으로 선택되는 경우, 표현에 대한 유형(310)은 인물명, 신체부위 및/또는 병명 등으로 설정될 수 있다.As another example, if the domain is selected as medical record analysis or clinical conversation analysis, the type (310) for the expression may be set to a person's name, a body part, and/or a disease name.

외부지식 데이터베이스(130)를 구성하는 일 실시예에 따른 표현에 대한 유형(310)은, 지역명, 인물명 및 기관명 등 다양한 명사 유형 중 적어도 하나를 포함할 수 있다. 자연어 처리의 대상이 되는 입력 텍스트(201)에는, 지역명, 인물명 및 기관명 등의 명사 표현에 상대적으로 높은 중요도의 정보가 드러나는 경우가 다수 존재한다. 따라서, 표현에 대한 유형(310)이 지역명, 인물명 및 기관명 등 다양한 명사 유형 중 적어도 하나를 포함함으로써 자연어 처리 장치(120)는 빠른 연산과 높은 정확도로 의도 분류 및/또는 슬롯 태깅 과업을 수행할 수 있다.According to one embodiment of the external knowledge database (130), the type (310) for expressions may include at least one of various noun types such as a region name, a person name, and an institution name. In the input text (201) that is the target of natural language processing, there are many cases where information with relatively high importance is revealed in noun expressions such as a region name, a person name, and an institution name. Therefore, by including at least one of various noun types such as a region name, a person name, and an institution name in the type (310) for expressions, the natural language processing device (120) may perform intent classification and/or slot tagging tasks with fast calculation and high accuracy.

일 실시예에 따른 지역명은 특징 지역, 특정 장소 또는 특정 위치 표현에 대한 유형일 수 있다. 예를 들어, 지역명을 유형으로 하는 표현은, 서울 및 부산 등의 도시의 명칭, 한강 및 남산 등의 지리적 영역의 명칭 및/또는 A 건물, B 회사 및 C 식당 등 특정 주소지에 위치하는 대상을 지칭하는 명칭 등을 포함할 수 있다. 다만, 이에 제한되지 않는다.A region name according to one embodiment may be a type for a characteristic region, a specific place, or a specific location expression. For example, an expression with a region name as a type may include names of cities such as Seoul and Busan, names of geographical areas such as the Han River and Namsan, and/or names referring to objects located at a specific address such as Building A, Company B, and Restaurant C. However, this is not limited thereto.

일 실시예에 따른 인물명은 특정 개인이나 특정 그룹의 실명, 별명, 예명 등 다양한 형태의 이름 표현에 대한 유형일 수 있다. 예를 들어, 인물명을 유형으로 하는 표현은 홍길동 및 존스미스 등 개인의 이름, BTS 및 비틀즈와 같은 그룹의 이름 등을 포함할 수 있다. 다만, 이에 제한되지 않는다.A person's name according to one embodiment may be a type for various forms of name expressions, such as real names, nicknames, stage names, etc. of a specific individual or a specific group. For example, expressions using a person's name as a type may include individual names such as Hong Gil-dong and John Smith, and group names such as BTS and The Beatles. However, this is not limited thereto.

일 실시예에 따른 기관명은 특정 조직, 기업, 단체, 정부 기관 등 다양한 형태의 조직 기관의 명칭에 대한 유형일 수 있다. 예를 들어, 기관명을 유형으로 하는 표현은 OO 자동차 및 OO 전자 등의 기업이나 조직의 명칭, OO 부 및 OO 청과 같은 정부 기관의 명칭 등을 포함할 수 있다. 다만, 이에 제한되지 않는다.The organization name according to one embodiment may be a type for the names of various types of organizational institutions, such as specific organizations, enterprises, groups, and government agencies. For example, an expression using the organization name as a type may include names of enterprises or organizations, such as OO Automobile and OO Electronics, and names of government agencies, such as OO Department and OO Agency. However, this is not limited thereto.

본 개시의 표현-유형 쌍은 외부지식 데이터베이스(130)에 저장되는 외부지식 정보로서, 특정 표현이 어떠한 유형에 대응되는지 여부를 지시하는 정보이다. 표현-유형 쌍이 외부지식 데이터베이스(130)에 저장되는 구체적인 저장 구조는 종래의 기술 또는 향후 개발되는 기술에 따른 다양한 구조를 가질 수 있다.The expression-type pair of the present disclosure is external knowledge information stored in an external knowledge database (130), and is information indicating whether a specific expression corresponds to a certain type. The specific storage structure in which the expression-type pair is stored in the external knowledge database (130) may have various structures according to conventional technology or technology to be developed in the future.

예를 들어, 외부지식 데이터베이스(130)에는 관계형 데이터베이스 구조, NoSQL 문서 기반 구조 및 키-값 데이터베이스 구조 중 적어도 하나에 기반하여 표현-유형 쌍이 저장될 수 있다. 다만, 이에 한정되지 않는다.For example, the external knowledge database (130) may store expression-type pairs based on at least one of a relational database structure, a NoSQL document-based structure, and a key-value database structure, but is not limited thereto.

일 실시예에 따르면, 자연어 처리 장치(120)는 외부지식 데이터베이스(130)를 참조하여 외부지식 데이터베이스(130)에 저장된 표현-유형 쌍 중 적어도 하나를 입력 텍스트(201)에 매칭함으로써 외부지식 참조 정보(202)를 생성할 수 있다.According to one embodiment, the natural language processing device (120) can generate external knowledge reference information (202) by referencing an external knowledge database (130) and matching at least one of the expression-type pairs stored in the external knowledge database (130) to an input text (201).

예를 들어, 자연어 처리 장치(120)는 "서울은행으로안내"와 같은 입력 텍스트(201)를 획득하고, 외부지식 데이터베이스(130)를 참조하여 "서울은행-기관명"과 같은 표현-유형 쌍을 선택 및 획득할 수 있다. 자연어 처리 장치(120)는 "서울은행으로안내"에 "서울은행-기관명"을 매칭함으로써 외부지식 참조 정보(202)를 생성할 수 있다.For example, the natural language processing device (120) can obtain an input text (201) such as “Guide to Seoul Bank” and select and obtain an expression-type pair such as “Seoul Bank-organization name” by referencing an external knowledge database (130). The natural language processing device (120) can generate external knowledge reference information (202) by matching “Seoul Bank-organization name” to “Guide to Seoul Bank”.

일 예로서, 자연어 처리 장치(120)는 "서", "울", "은" 및 "행"에 기관명이라는 유형 정보가 부여되고, "으", "로", "안" 및 "내"에 유형 없음이라는 유형 정보가 부여된 외부지식 참조 정보(202)를 생성할 수 있다.As an example, the natural language processing device (120) can generate external knowledge reference information (202) in which type information of an institution name is assigned to “seo”, “ul”, “eun”, and “haeng”, and type information of no type is assigned to “eu”, “ro”, “an”, and “nae”.

도 4는 일 실시예에 따라 입력 텍스트를 복수개의 n-그램으로 분리하고, 외부지식 데이터베이스에서 복수개의 n-그램을 검색하는 과정을 설명하기 위한 예시적인 도면이다.FIG. 4 is an exemplary diagram for explaining a process of dividing an input text into a plurality of n-grams and searching for the plurality of n-grams in an external knowledge database according to one embodiment.

도 4를 참조하면, 일 실시예에 따르면, 자연어 처리 장치(120)는 입력 텍스트(201)를 복수개의 n-그램(n-gram)(410)으로 분리할 수 있다. n-그램은, 입력 텍스트(201) 등 문자 집합에서 연속된 n개 문자로 구성된 부분 집합으로 이해될 수 있다.Referring to FIG. 4, according to one embodiment, the natural language processing device (120) may divide the input text (201) into a plurality of n-grams (410). An n-gram may be understood as a subset composed of n consecutive characters in a character set such as the input text (201).

예를 들어, 입력 텍스트(201)가"서울은행"인 경우, 자연어 처리 장치(120)는 "서울은행"을 4-그램으로서 "서울은행", 3-그램으로서 "서울은" 및 "울은행", 그리고 2-그램으로서 "서울", "울은", "은행"으로 분리할 수 있다.For example, if the input text (201) is “Seoul Bank,” the natural language processing device (120) can separate “Seoul Bank” into “Seoul Bank” as 4-grams, “Seoul” and “Ulbank” as 3-grams, and “Seoul,” “Ulbank,” and “Bank” as 2-grams.

자연어 처리 장치(120)는 외부지식 데이터베이스(130)에서 복수개의 n-그램(410)을 검색하고, 검색의 결과에 기초하여 표현-유형 쌍 중에서 적어도 하나의 대상 쌍(420)을 선택할 수 있다.The natural language processing device (120) can search for multiple n-grams (410) in an external knowledge database (130) and select at least one target pair (420) from among expression-type pairs based on the search results.

예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행"인 경우, 자연어 처리 장치(120)는 외부지식 데이터베이스(130)에서 "서울은행", "서울은", "울은행", "서울", "울은" 및 "은행"을 검색할 수 있다.For example, if the external knowledge database (130) stores external knowledge information as illustrated in FIG. 3 and the input text (201) is “Seoul Bank,” the natural language processing device (120) can search for “Seoul Bank,” “Seoul,” “Ulbank,” “Seoul,” “Ulbank,” and “Bank” in the external knowledge database (130).

이때, 외부지식 데이터베이스(130)에서 검색되는 결과는 "서울은행" 및 "서울"일 수 있으며, 자연어 처리 장치(120)는 외부지식 데이터베이스(130)에 저장된 표현-유형 쌍 중에서 "서울은행-기관명"및 "서울-지역명"을 대상 쌍(420)으로서 선택할 수 있다.At this time, the results searched from the external knowledge database (130) may be “Seoul Bank” and “Seoul,” and the natural language processing device (120) may select “Seoul Bank-organization name” and “Seoul-region name” as target pairs (420) from among the expression-type pairs stored in the external knowledge database (130).

본 개시의 대상 쌍(420)은 대상 표현 및 대상 유형으로 구성될 수 있다. 일 실시예에 따른 대상 표현은 입력 텍스트(201)에 포함된 표현인 동시에, 외부지식 데이터베이스(130)에 저장된 표현을 포함할 수 있다. 일 실시예에 따른 대상 유형은 상기 대상 표현에 대한 유형을 포함할 수 있다.The target pair (420) of the present disclosure may be composed of a target expression and a target type. The target expression according to one embodiment may include an expression included in the input text (201) and an expression stored in an external knowledge database (130). The target type according to one embodiment may include a type for the target expression.

상술한 대상 쌍(420)의 예시에서, "서울은행" 및 "서울"은 대상 표현이며, 대상 표현 각각에 대한 유형인 "기관명" 및 "지역명"은 대상 표현 각각에 대한 대상 유형으로 이해될 수 있다.In the example of the target pair (420) described above, “Seoul Bank” and “Seoul” are target expressions, and “organization name” and “region name,” which are types for each of the target expressions, can be understood as target types for each of the target expressions.

일 실시예에 따르면, 자연어 처리 장치(120)는 대상 유형을 입력 텍스트(201)에 포함된 대상 표현에 매칭함으로써 외부지식 참조 정보(202)를 생성할 수 있다. 예를 들어, 자연어 처리 장치(120)는 입력 텍스트(201)를 구성하는 문자 중, 제1 대상 표현인 "서울은행"에 대응되는 위치의 문자, 즉 "서", "울", "은" 및 "행"에 제1 대상 유형인 "기관명"을 매칭하고, 제2 대상 표현인 "서울"에 대응되는 위치의 문자, 즉 "서" 및 "울"에 제2 대상 유형인 "지역명"을 매칭함으로써 외부지식 참조 정보(202)를 생성할 수 있다.According to one embodiment, the natural language processing device (120) can generate external knowledge reference information (202) by matching a target type to a target expression included in an input text (201). For example, the natural language processing device (120) can generate external knowledge reference information (202) by matching a first target type, "organization name," to characters at positions corresponding to a first target expression, "Seoul Bank," among the characters constituting the input text (201), namely, "Seo," "Ul," "Eun," and "Haeng," and by matching a second target type, "region name," to characters at positions corresponding to a second target expression, "Seoul," namely, "Seo" and "Ul."

도 5는 일 실시예에 따라 소정의 기준에 기초하여 유형을 표현에 매칭하는 과정을 설명하기 위한 예시적인 도면이다.FIG. 5 is an exemplary diagram for explaining a process of matching a type to an expression based on a predetermined criterion according to one embodiment.

일 실시예에 따르면, 대상 쌍(420)은 제1 쌍 및 제2 쌍을 포함할 수 있고, 제1 쌍은 제1 표현 및 제1 유형으로 구성될 수 있으며, 제2 쌍은 제2 표현 및 제2 유형으로 구성될 수 있다. 일 실시예에 따르면, 제2 유형은 제1 유형과 동일하거나, 상이할 수 있다. 이때, 제1 표현 및 제2 표현은 대상 표현으로 이해될 수 있으며, 제1 유형 및 제2 유형은 대상 유형으로 이해될 수 있다.According to one embodiment, the target pair (420) may include a first pair and a second pair, and the first pair may be composed of a first expression and a first type, and the second pair may be composed of a second expression and a second type. According to one embodiment, the second type may be the same as or different from the first type. In this case, the first expression and the second expression may be understood as target expressions, and the first type and the second type may be understood as target types.

일 실시예에 따르면, 제1 표현 및 제2 표현은 중복되는 문자를 포함할 수 있다. 일 실시예에 따른 제2 표현은 제1 표현과 상이할 수 있으며, 제1 표현을 구성하는 모든 문자를 포함할 수 있다. 예를 들어, 제1 쌍 및 제2 쌍은 각각 "서울-지역명" 및 "서울은행-기관명"일 수 있다. 다른 예를 들어, 제1 쌍 및 제2 쌍은 각각 "서울은행-기관명" 및 "서울은행서울영업부-지역명"일 수 있다.According to one embodiment, the first expression and the second expression may include overlapping characters. The second expression according to one embodiment may be different from the first expression and may include all characters that make up the first expression. For example, the first pair and the second pair may be "Seoul-region name" and "Seoul Bank-institution name", respectively. For another example, the first pair and the second pair may be "Seoul Bank-institution name" and "Seoul Bank Seoul Sales Department-region name", respectively.

자연어 처리 장치(120)가 제1 유형 및 제2 유형 등의 대상 유형을 입력 텍스트(201)에 포함된 제1 표현 및 제2 표현 등의 대상 표현에 매칭하는 과정에서, 제1 표현 및 제2 표현에 중복되어 포함된 문자에 대한 매칭 과정에서 소정의 기준이 이용될 수 있다.In the process of the natural language processing device (120) matching target types such as the first type and the second type to target expressions such as the first expression and the second expression included in the input text (201), a predetermined criterion may be used in the matching process for characters that are included in duplicate in the first expression and the second expression.

예를 들어, 제1 쌍 및 제2 쌍이 "서울-지역명", "서울은행-기관명"인 경우, 제1 표현 및 제2 표현에 중복되어 포함된 문자인 "서울"에 대상 유형을 매칭하는 과정에서, 소정의 기준이 이용될 수 있다.For example, if the first pair and the second pair are "Seoul-region name" and "Seoul Bank-institution name", a predetermined criterion may be used in the process of matching the target type to "Seoul", which is a character included in the first and second expressions.

다른 예를 들어, 제1 쌍 및 제2 쌍이 "서울은행-기관명", "서울은행서울영업부-지역명"인 경우, 제1 표현 및 제2 표현에 중복되어 포함된 문자인 "서울은행"에 대상 유형을 매칭하는 과정에서 소정의 기준이 이용될 수 있다.For another example, if the first pair and the second pair are "Seoul Bank-organization name" and "Seoul Bank Seoul Sales Department-region name", a predetermined criterion may be used in the process of matching the target type to "Seoul Bank", which is a character included in the first and second expressions.

도 5를 참조하면, 자연어 처리 장치(120)는 소정의 기준에 기초하여 제1 유형 및 제2 유형 중 적어도 하나를 제1 표현에 매칭함으로써 외부지식 참조 정보(202)를 생성할 수 있다. 한편, 도 5에 도시된 소정의 기준에 따른 외부정보 참조 정보(510, 520, 530, 540)는 도 2에 도시된 외부정보 참조 정보(202)의 일 예시로 이해될 수 있다. 다만, 소정의 기준은 도 5를 참조하여 후술되는 예시에 한정되지 않는다.Referring to FIG. 5, the natural language processing device (120) can generate external knowledge reference information (202) by matching at least one of the first type and the second type to the first expression based on a predetermined criterion. Meanwhile, the external information reference information (510, 520, 530, 540) according to the predetermined criterion illustrated in FIG. 5 can be understood as an example of the external information reference information (202) illustrated in FIG. 2. However, the predetermined criterion is not limited to the example described below with reference to FIG. 5.

도 5에 도시된 제1 기준에 따른 외부정보 참조 정보(510) 및 제2 기준에 따른 외부정보 참조 정보(520)는 하나의 문자에 하나의 유형만이 매칭되는 예시이며, 제3 기준에 따른 외부정보 참조 정보(530) 및 제4 기준에 따른 외부정보 참조 정보(540)는 하나의 문자에 하나의 유형뿐만 아니라 여러 유형이 매칭되는 예시이다.External information reference information (510) according to the first criterion and external information reference information (520) according to the second criterion, as shown in FIG. 5, are examples in which only one type is matched to one character, and external information reference information (530) according to the third criterion and external information reference information (540) according to the fourth criterion are examples in which not only one type but also multiple types are matched to one character.

아래의 예시들은, 제2 표현은 제1 표현과 상이하고 제1 표현을 구성하는 모든 문자를 포함한다는 가정 아래에서 설명되며, 아래의 예시들에서 제1 쌍, 제2 쌍, 제1 표현, 제2 표현, 제1 유형 및 제2 유형은 상대적인 표현으로 이해될 수 있다.The examples below are explained under the assumption that the second expression is different from the first expression and includes all characters that make up the first expression, and in the examples below, the first pair, the second pair, the first expression, the second expression, the first type, and the second type can be understood as relative expressions.

예를 들어, "서울은행서울영업부"와 "서울" 또는 서울은행서울영업부"와 "서울은행"의 관계에서, "서울은행서울영업부"는 제2 표현으로 이해되고 "서울" 및 "서울은행"은 제1 표현으로 이해될 수 있으며, "서울은행"과 "서울"의 관계에서 "서울은행"은 제2 표현으로 이해되고 "서울"은 제1 표현으로 이해될 수 있다.For example, in the relationship between “Seoul Bank Seoul Sales Department” and “Seoul” or “Seoul Bank Seoul Sales Department” and “Seoul Bank”, “Seoul Bank Seoul Sales Department” can be understood as the second expression and “Seoul” and “Seoul Bank” can be understood as the first expression, and in the relationship between “Seoul Bank” and “Seoul”, “Seoul Bank” can be understood as the second expression and “Seoul” can be understood as the first expression.

이하에서는, 자연어 처리 장치(120)가 제1 기준에 따른 외부정보 참조 정보(510)를 생성하는 과정에 관하여 설명하도록 한다.Below, the process by which the natural language processing device (120) generates external information reference information (510) according to the first criterion will be described.

제1 기준은, 문자열의 길이가 긴 대상 표현부터, 짧은 대상 표현에 대한 매칭을 순차적으로 수행하며, 앞서 매칭된 유형이 이후 매칭되는 유형과 상이한 경우, 이후 매칭되는 유형으로 앞서 매칭된 유형을 덮어씌우는 것일 수 있다.The first criterion may be to sequentially perform matching from the target expression with the longest string length to the shortest target expression, and if the previously matched type is different from the subsequently matched type, the previously matched type may be overwritten by the subsequently matched type.

예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행서울영업부"인 경우, 대상 쌍은 "서울-지역명", "서울은행-기관명", "서울은행서울영업부-지역명"으로 선택될 수 있다.For example, if the external knowledge database (130) stores external knowledge information as illustrated in FIG. 3 and the input text (201) is “Seoul Bank Seoul Sales Department,” the target pairs may be selected as “Seoul-region name,” “Seoul Bank-institution name,” and “Seoul Bank Seoul Sales Department-region name.”

자연어 처리 장치(120)는 대상 표현 "서울은행서울영업부"에 1차 매칭을 수행하여 각 문자에 대상 유형 "지역명"을 매칭할 수 있다. 이후, 자연어 처리 장치(120)는 대상 표현 "서울은행"에 2차 매칭을 수행하여 "서울은행"을 구성하는 각 문자에 대상 유형 "기관명"을 덮어씌울 수 있다. 이후, 자연어 처리 장치(120)는 대상 표현 "서울"에 최종 매칭을 수행하여, "서울"을 구성하는 각 문자에 대상 유형 "지역명"을 덮어씌울 수 있다.The natural language processing device (120) can perform a first matching on the target expression "Seoul Bank Seoul Sales Department" to match the target type "regional name" to each character. Thereafter, the natural language processing device (120) can perform a second matching on the target expression "Seoul Bank" to overwrite the target type "organization name" to each character that constitutes "Seoul Bank". Thereafter, the natural language processing device (120) can perform a final matching on the target expression "Seoul" to overwrite the target type "regional name" to each character that constitutes "Seoul".

자연어 처리 장치(120)는 1차 매칭, 2차 매칭 및 최종 매칭을 순차적으로 수행함으로써, 입력 텍스트(201)인 "서울은행서울영업부"를 구성하는 9개 문자 중, 3번 및 4번 위치에 대상 유형 "기관명"이 매칭되고, 나머지 위치에 대상 유형 "지역명"이 매칭된 제1 기준에 따른 외부정보 참조 정보(510)를 생성할 수 있다.The natural language processing device (120) can sequentially perform the first matching, the second matching, and the final matching to generate external information reference information (510) according to the first criterion in which the target type “organization name” is matched to positions 3 and 4 among the nine characters that make up the input text (201) “Seoul Bank Seoul Sales Department” and the target type “region name” is matched to the remaining positions.

이하에서는, 자연어 처리 장치(120)가 제2 기준에 따른 외부정보 참조 정보(520)를 생성하는 과정에 관하여 설명하도록 한다.Below, the process by which the natural language processing device (120) generates external information reference information (520) according to the second criterion will be described.

제2 기준은, 제1 유형 및 제2 유형 중, 문자열의 길이가 더 긴 대상 표현에 대한 대상 유형을 매칭하는 것일 수 있다.A second criterion may be to match the target type to the target expression whose string length is longer among the first type and the second type.

예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행서울영업부"인 경우, 자연어 처리 장치(120)는 대상 표현인 "서울", "서울은행" 및 "서울은행서울영업부"중 문자열의 길이가 가장 긴 대상 표현인 "서울은행서울영업부"에 대한 대상 유형 "지역명"을 "서울은행서울영업부"를 구성하는 모든 문자에 매칭할 수 있다. For example, if the external knowledge database (130) stores external knowledge information as illustrated in FIG. 3, and the input text (201) is “Seoul Bank Seoul Sales Department,” the natural language processing device (120) can match the target type “regional name” for “Seoul Bank Seoul Sales Department,” which is the target expression with the longest string length among the target expressions “Seoul,” “Seoul Bank,” and “Seoul Bank Seoul Sales Department,” to all characters that make up “Seoul Bank Seoul Sales Department.”

즉, 자연어 처리 장치(120)는 입력 텍스트(201)에 포함된 대상 표현"서울은행"에 대상 쌍 "서울은행-기관명"에 따른 대상 유형 "기관명"을 매칭하는 것이 아닌, 대상 쌍 "서울은행서울영업부-지역명"에 따른 대상 유형 "지역명"을 매칭함으로써 입력 텍스트(201)인"서울은행서울영업부"를 구성하는 모든 문자에 "지역명"이 매칭된 제2 기준에 따른 외부정보 참조 정보(520)를 생성할 수 있다.That is, the natural language processing device (120) matches the target type "organization name" according to the target pair "Seoul Bank-organization name" to the target expression "Seoul Bank" included in the input text (201), rather than matching the target type "region name" according to the target pair "Seoul Bank Seoul Sales Department-region name", thereby generating external information reference information (520) according to the second criterion in which "region name" is matched to all characters constituting the input text (201), "Seoul Bank Seoul Sales Department."

한편, 다른 예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행"인 경우, 자연어 처리 장치(120)는 대상 표현인 "서울" 및 "서울은행" 중 문자열의 길이가 더 긴 대상 표현인 "서울은행"에 대한 대상 유형 "기관명"을 "서울은행"을 구성하는 모든 문자에 매칭할 수 있다. Meanwhile, for another example, if the external knowledge database (130) stores external knowledge information as illustrated in FIG. 3, and the input text (201) is “Seoul Bank,” the natural language processing device (120) can match the target type “organization name” for the target expression “Seoul Bank”, which has a longer string length among the target expressions “Seoul” and “Seoul Bank,” to all characters that constitute “Seoul Bank.”

즉, 자연어 처리 장치(120)는 입력 텍스트(201)에 포함된 대상 표현 "서울"에 대상 쌍 "서울-지역명"에 따른 대상 유형 "지역명"을 매칭하는 것이 아닌, "서울은행-기관명"에 따른 대상 유형 "기관명"을 매칭함으로써 입력 텍스트(201)인 "서울은행"을 구성하는 모든 문자에 "기관명"이 매칭된 제2 기준에 따른 외부정보 참조 정보(520)를 생성할 수 있다.That is, the natural language processing device (120) can generate external information reference information (520) according to the second criterion in which “organization name” is matched to all characters constituting “Seoul Bank,” which is the input text (201), by matching the target type “region name” according to the target pair “Seoul-region name” to the target expression “Seoul” included in the input text (201), rather than matching the target type “organization name” according to the target pair “Seoul-region name.”

이하에서는, 자연어 처리 장치(120)가 제3 기준에 따른 외부정보 참조 정보(530)를 생성하는 과정에 관하여 설명하도록 한다.Below, the process by which the natural language processing device (120) generates external information reference information (530) according to the third criterion will be described.

제3 기준은, 제1 표현에 제1 유형 및 제2 유형을 모두 매칭하는 것일 수 있다.A third criterion could be that the first expression matches both the first type and the second type.

예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행서울영업부"인 경우, 대상 쌍은 "서울-지역명", "서울은행-기관명", "서울은행서울영업부-지역명"으로 선택될 수 있다.For example, if the external knowledge database (130) stores external knowledge information as illustrated in FIG. 3 and the input text (201) is “Seoul Bank Seoul Sales Department,” the target pairs may be selected as “Seoul-region name,” “Seoul Bank-institution name,” and “Seoul Bank Seoul Sales Department-region name.”

자연어 처리 장치(120)는 대상 쌍 "서울은행-기관명"에 따라 대상 표현 "서울은행"에 대상 유형 "기관명"을 매칭하고, 대상 쌍 "서울-지역명" 및 "서울은행서울영업부"에 따라 대상 표현 "서울은행서울영업부"에 대상 유형 "지역명"을 매칭할 수 있다.The natural language processing device (120) can match the target type “organization name” to the target expression “Seoul Bank” according to the target pair “Seoul Bank-organization name”, and can match the target type “region name” to the target expression “Seoul Bank Seoul Sales Department” according to the target pair “Seoul-region name” and “Seoul Bank Seoul Sales Department”.

최종적으로, 자연어 처리 장치(120)는 입력 텍스트(201)인 "서울은행서울영업부"를 구성하는 9개 문자 중, 1번 내지 4번 위치에 대상 유형 "지역명" 및 "기관명"이 매칭되고, 나머지 위치에 대상 유형 "지역명"이 매칭된 제3 기준에 따른 외부정보 참조 정보(530)를 생성할 수 있다.Finally, the natural language processing device (120) can generate external information reference information (530) according to the third criterion in which, among the nine characters composing the input text (201), “Seoul Bank Seoul Sales Department,” the target types “regional name” and “organization name” are matched at positions 1 to 4, and the target type “regional name” is matched at the remaining positions.

한편, 다른 예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행"인 경우, 대상 쌍은 "서울-지역명" 및 "서울은행-기관명"으로 선택될 수 있다.Meanwhile, as another example, if the external knowledge database (130) stores external knowledge information as shown in FIG. 3 and the input text (201) is “Seoul Bank,” the target pairs may be selected as “Seoul-region name” and “Seoul Bank-institution name.”

자연어 처리 장치(120)는 대상 쌍 "서울은행-기관명"에 따라 대상 표현 "서울은행"에 대상 유형 "기관명"을 매칭하고, 대상 쌍 "서울-지역명"에 따라 대상 표현 "서울"에 "지역명"을 매칭할 수 있다.The natural language processing device (120) can match the target type “organization name” to the target expression “Seoul Bank” according to the target pair “Seoul Bank-organization name” and can match the target expression “Seoul” to the “region name” according to the target pair “Seoul-region name”.

최종적으로, 자연어 처리 장치(120)는 입력 텍스트(201)인 "서울은행"을 구성하는 4개 문자 중, 1번 내지 2번 위치에 대상 유형 "지역명" 및 "기관명"이 매칭되고, 나머지 위치에 대상 유형 "기관명"이 매칭된 제3 기준에 따른 외부정보 참조 정보(530)를 생성할 수 있다.Finally, the natural language processing device (120) can generate external information reference information (530) according to the third criterion in which the target types “region name” and “organization name” are matched at positions 1 and 2 among the four characters composing the input text (201) “Seoul Bank” and the target type “organization name” is matched at the remaining positions.

이하에서는, 자연어 처리 장치(120)가 제4 기준에 따른 외부정보 참조 정보(540)를 생성하는 과정에 관하여 설명하도록 한다.Below, the process by which the natural language processing device (120) generates external information reference information (540) according to the fourth criterion will be described.

제4 기준은, 제1 표현에 제1 유형 및 제2 유형을 모두 매칭하되, 매칭의 횟수를 반영하여 매칭하는 것일 수 있다. 즉, 제4 기준은 매칭의 빈도에 기반하여 문자별로 대상 유형 가중치를 부여하는 것으로 이해될 수 있다.The fourth criterion may be to match both the first type and the second type to the first expression, while reflecting the number of matches. That is, the fourth criterion may be understood as assigning target type weights to each character based on the frequency of matching.

예를 들어, 외부지식 데이터베이스(130)가 도 3에 도시된 바와 같이 외부지식 정보를 저장하고 있고, 입력 텍스트(201)가 "서울은행서울영업부"인 경우, 대상 쌍은 "서울-지역명", "서울은행-기관명", "서울은행서울영업부-지역명"으로 선택될 수 있다.For example, if the external knowledge database (130) stores external knowledge information as illustrated in FIG. 3 and the input text (201) is “Seoul Bank Seoul Sales Department,” the target pairs may be selected as “Seoul-region name,” “Seoul Bank-institution name,” and “Seoul Bank Seoul Sales Department-region name.”

자연어 처리 장치(120)는 대상 쌍 "서울-지역명"에 따라 대상 표현 "서울" 위치에 대상 유형 "지역명" 매칭을 1회 카운트하고, 대상 쌍 "서울은행-기관명"에 따라 대상 표현 "서울은행" 위치에 대상 유형 "기관명" 매칭을 1회 카운트하고, 대상 쌍 "서울은행서울영업부-지역명"에 따라 대상 표현 "서울은행서울영엉부"에 대상 유형 "지역명" 매칭을 1회 카운트할 수 있다.The natural language processing device (120) can count the matching of the target type "region name" once in the target expression "Seoul" location according to the target pair "Seoul-region name", count the matching of the target type "organization name" once in the target expression "Seoul Bank" location according to the target pair "Seoul Bank-organization name", and count the matching of the target type "region name" once in the target expression "Seoul Bank Seoul Business Department" according to the target pair "Seoul Bank Seoul Business Department-region name".

최종적으로, 자연어 처리 장치(120)는 입력 텍스트(201)인 "서울은행서울영업부"를 구성하는 9개 문자 중, 1번 내지 2번 위치에 대상 유형 "지역명" 2회 및 "기관명" 1회가 매칭되고, 3번 내지 4번 위치에 대상 유형 "지역명" 1회 및 "기관명" 1회가 매칭되고, 5번 내지 6번 위치에 대상 유형 "지역명" 2회 및 "기관명" 0회가 매칭되고, 나머지 위치에 대상 유형 "지역명" 1회 및 "기관명" 0회가 매칭된 제4 기준에 따른 외부정보 참조 정보(540)를 생성할 수 있다.Finally, the natural language processing device (120) can generate external information reference information (540) according to the fourth criterion in which, among the nine characters constituting the input text (201), “Seoul Bank Seoul Sales Department,” the target type “region name” is matched twice and “organization name” once at positions 1 and 2, the target type “region name” is matched once and “organization name” once at positions 3 and 4, the target type “region name” is matched twice and “organization name” zero times at positions 5 and 6, and the target type “region name” is matched once and “organization name” zero times at the remaining positions.

도 6은 일 실시예에 따른 자연어 처리 모델을 설명하기 위한 예시적인 도면이다. 도 6에 도시된 입력 텍스트(601) 및 외부지식 참조 정보(602)는 도 2에 도시된 입력 텍스트(201) 및 외부지식 참조 정보(202)에 대응될 수 있다.Fig. 6 is an exemplary diagram for explaining a natural language processing model according to one embodiment. The input text (601) and external knowledge reference information (602) illustrated in Fig. 6 may correspond to the input text (201) and external knowledge reference information (202) illustrated in Fig. 2.

도 6을 참조하면, 자연어 처리 장치(120)는 입력 텍스트(601) 및 외부지식 참조 정보(602)를 기학습된 자연어 처리 모델(600)에 입력하고, 자연어 처리 모델(600)의 출력을 획득할 수 있다.Referring to FIG. 6, a natural language processing device (120) can input input text (601) and external knowledge reference information (602) into a pre-learned natural language processing model (600) and obtain an output of the natural language processing model (600).

일 실시예에 따르면, 자연어 처리 장치(120)는 입력 텍스트(601)에 대응되는 의도 분류(intent classification) 정보(631) 및 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보(632)를 포함하는 자연어 처리 모델(600)의 출력을 획득할 수 있다.According to one embodiment, the natural language processing device (120) can obtain an output of a natural language processing model (600) including intent classification information (631) corresponding to input text (601) and slot tagging information (632) corresponding to the input text.

예를 들어, 자연어 처리 장치(120)는 자연어 처리 모델(600)에 입력 텍스트(601)로 "서울은행으로안내"를 입력하고, "서울은행으로안내"에 대한 외부지식 참조 정보(602)를 입력할 수 있다. 이때, 자연어 처리 장치(120)가 자연어 처리 모델(600)로부터 획득한 의도 분류 정보(631)는, 입력 텍스트(601)가 "길 찾기"의 의도를 가지는 문장이라는 것을 나타낼 수 있다.For example, the natural language processing device (120) may input “Guide to Seoul Bank” as input text (601) into the natural language processing model (600) and input external knowledge reference information (602) about “Guide to Seoul Bank.” At this time, the intent classification information (631) acquired by the natural language processing device (120) from the natural language processing model (600) may indicate that the input text (601) is a sentence with the intent of “finding directions.”

또한, 자연어 처리 장치(120)가 자연어 처리 모델(600)로부터 획득한 슬롯 태깅 정보(632)는, 입력 텍스트(601)인 "서울은행으로안내"에서 "서울은행"을 구성하는 문자 또는 그 문자에 대응되는 토큰이 bank라는 클래스에 레이블링되는 것을 나타낼 수 있다.In addition, the slot tagging information (632) obtained by the natural language processing device (120) from the natural language processing model (600) may indicate that the characters constituting “Seoul Bank” in the input text (601), “Guide to Seoul Bank,” or tokens corresponding to the characters, are labeled to a class called bank.

한편, 일 실시예에 따른 슬롯 태깅 정보(632)는 슬롯 시작 위치를 "B-"로, 슬롯 내부 위치를 "I-"로, 슬롯 외부 위치를 "O"로 표현하는 BIO 표현으로 구현될 수 있으나, 이에 한정되는 것은 아니다.Meanwhile, slot tagging information (632) according to one embodiment may be implemented as a BIO expression that expresses a slot start position as “B-”, a slot inside position as “I-”, and a slot outside position as “O”, but is not limited thereto.

일 실시예에 따른 자연어 처리 모델(600)은 모델 인코더(610), 모델 디코더(620) 및 분류자(classifier)(630)를 포함할 수 있다.A natural language processing model (600) according to one embodiment may include a model encoder (610), a model decoder (620), and a classifier (630).

일 실시예에 따르면, 모델 인코더(610), 모델 디코더(620) 및 분류자(630) 중 적어도 하나의 적어도 일부는, pre-net, CBHG 모듈, 오토인코더(Autoencoder), DNN(Deep Neural Network), CNN(convolutional neural network), RNN(Recurrent Neural Network), LSTM(Long Short-Term Memory Network), BRDNN(Bidirectional Recurrent Deep Neural Network) 등 다양한 인공 신경망 모델 중 적어도 하나 또는 둘 이상의 조합에 기초하여 구현될 수 있다.According to one embodiment, at least a part of at least one of the model encoder (610), the model decoder (620), and the classifier (630) may be implemented based on at least one or a combination of two or more of various artificial neural network models, such as a pre-net, a CBHG module, an autoencoder, a DNN (Deep Neural Network), a CNN (convolutional neural network), an RNN (Recurrent Neural Network), an LSTM (Long Short-Term Memory Network), and a BRDNN (Bidirectional Recurrent Deep Neural Network).

일 실시예에 따르면, 자연어 처리 장치(120)는 입력 텍스트(601) 및 외부지식 참조 정보(602)를 모델 인코더(610)에 입력하여, 모델 인코더(610)의 출력으로서 언어모델 은닉상태(language model hidden state)(611) 및 외부지식 임베딩(external knowledge embedding)(612)을 획득할 수 있다.According to one embodiment, the natural language processing device (120) may input input text (601) and external knowledge reference information (602) into a model encoder (610) to obtain a language model hidden state (611) and external knowledge embedding (612) as outputs of the model encoder (610).

일 실시예에 따른 모델 인코더(610)는 모델 인코더(610)에 입력되는 고차원의 데이터를 저차원의 데이터로 변환하여 출력할 수 있다. 이때, 모델 인코더(610)의 출력은, 입력된 데이터의 특징을 나타낼 수 있으며, 모델 인코더(610)의 출력은 모델 디코더(620)로 전달될 수 있다.A model encoder (610) according to one embodiment can convert high-dimensional data input to the model encoder (610) into low-dimensional data and output it. At this time, the output of the model encoder (610) can represent the characteristics of the input data, and the output of the model encoder (610) can be transmitted to the model decoder (620).

본 개시에서 은닉상태는 자연어 처리 모델의 특정 레이어 또는 특정 모듈의 출력으로서, 자연어 처리 모델의 최종 출력이 아닌 출력을 의미한다. 일 실시예에 따른 은닉상태는 다음 레이어 또는 다음 모듈의 입력으로 이용되며, 본 개시의 은닉상태는 언어모델 은닉상태(611) 및 디코더 은닉상태(621)를 포함한다.In the present disclosure, the hidden state means an output of a specific layer or a specific module of a natural language processing model, and an output that is not a final output of the natural language processing model. The hidden state according to one embodiment is used as an input of the next layer or the next module, and the hidden state of the present disclosure includes a language model hidden state (611) and a decoder hidden state (621).

또한, 본 개시에서 외부지식 임베딩(612)은 외부지식 참조 정보(602)로부터 추출된 임베딩이며, 일 실시예에 따른 외부지식 임베딩(612)은 외부지식 참조 정보(602)의 유의미한 특징들이 저차원의 연속 벡터 공간에 표현될 수 있도록 변환된 임베딩을 포함할 수 있다.In addition, in the present disclosure, the external knowledge embedding (612) is an embedding extracted from external knowledge reference information (602), and the external knowledge embedding (612) according to one embodiment may include an embedding transformed so that meaningful features of the external knowledge reference information (602) can be expressed in a low-dimensional continuous vector space.

일 실시예에 따르면, 자연어 처리 장치(120)는 언어모델 은닉상태(611) 및 외부지식 임베딩(612)을 모델 디코더(620)에 입력하여, 모델 디코더(620)의 출력으로서 디코더 은닉상태(621)를 획득할 수 있다.According to one embodiment, the natural language processing device (120) can input a language model hidden state (611) and external knowledge embedding (612) to a model decoder (620) to obtain a decoder hidden state (621) as an output of the model decoder (620).

일 실시예에 따른 모델 디코더(620)는 모델 인코더(610)의 출력을 입력으로 획득하여 추가적으로 정보를 추출 또는 변환할 수 있다. 일 실시예에 따르면, 모델 디코더(620)의 출력인 디코더 은닉상태(621)는, 의도 분류 및 슬롯 태깅을 위한 입력 텍스트(601)의 유의미한 특징을 나타내는 데이터를 포함할 수 있다.A model decoder (620) according to one embodiment may obtain the output of the model encoder (610) as input and additionally extract or transform information. According to one embodiment, a decoder hidden state (621), which is an output of the model decoder (620), may include data representing meaningful features of the input text (601) for intent classification and slot tagging.

자연어 처리 장치(120)는 디코더 은닉상태(621)를 분류자(630)에 입력하여, 분류자(630)의 출력으로서 자연어 처리 모델(600)의 출력을 획득할 수 있다. 일 실시예에 따른 분류자는, 디코더 은닉상태(621)로부터 입력 텍스트(601)의 의도 또는 목적을 분류함으로써 의도 분류 정보(631)를 생성할 수 있으며, 디코더 은닉상태(621)로부터 입력 텍스트(601)에 대하여 적어도 하나의 슬롯을 알맞은 클래스에 레이블링함으로써 슬롯 태깅 정보(632)를 생성할 수 있다.The natural language processing device (120) can input the decoder hidden state (621) to the classifier (630) and obtain the output of the natural language processing model (600) as the output of the classifier (630). The classifier according to one embodiment can generate intent classification information (631) by classifying the intent or purpose of the input text (601) from the decoder hidden state (621), and can generate slot tagging information (632) by labeling at least one slot with an appropriate class for the input text (601) from the decoder hidden state (621).

도 7은 일 실시예에 따른 자연어 처리 모델에 포함되는 모델 인코더를 설명하기 위한 예시적인 도면이다.FIG. 7 is an exemplary diagram for explaining a model encoder included in a natural language processing model according to one embodiment.

도 7을 참조하면, 일 실시예에 따른 모델 인코더(610)는 제1 처리부(710) 및 제2 처리부(720)를 포함할 수 있다. 일 실시예에 따른 제1 처리부(710)는 입력 텍스트(601)를 토큰화(tokenize)하는 토큰화 레이어(711)를 포함할 수 있다.Referring to FIG. 7, a model encoder (610) according to one embodiment may include a first processing unit (710) and a second processing unit (720). The first processing unit (710) according to one embodiment may include a tokenization layer (711) that tokenizes input text (601).

일 실시예에 따른 토큰화 레이어(711)는 입력 텍스트(601)를 입력으로 하여, 입력 텍스트(601)를 소정의 단위를 갖는 토큰으로 변환할 수 있다. 예를 들어, 토큰화 레이어(711)는 입력 텍스트(601)인 "서울은행으로안내"를 "서", "울", "은", "행", "으", "로", "안" 및 "내"에 대응되는 개별적인 토큰으로 변환할 수 있다. 한편, 소정의 단위는 하나의 글자에 한정되는 것은 아니다.A tokenization layer (711) according to one embodiment may convert an input text (601) into a token having a predetermined unit by taking the input text (601) as input. For example, the tokenization layer (711) may convert the input text (601) "Seoul Bank Guide" into individual tokens corresponding to "Seo", "Ul", "Eun", "Haeng", "Eu", "Ro", "An", and "Nae". Meanwhile, a predetermined unit is not limited to a single letter.

일 실시예에 따른 제1 처리부(710)는 언어모델 은닉상태(611)를 출력하는 언어모델 레이어(712)를 포함할 수 있다. 일 실시예에 따른 언어모델 레이어(712)는 입력된 토큰 시퀀스에 대한 문맥적 정보를 포착 및 추출하도록 학습된 언어모델을 포함할 수 있다. 일 실시예에 따른 언어모델 레이어(712)는 토큰화된 입력 텍스트(601)의 문맥적 정보의 포착 및 추출을 통해 언어모델 은닉상태(611)를 출력할 수 있다.A first processing unit (710) according to one embodiment may include a language model layer (712) that outputs a language model hidden state (611). The language model layer (712) according to one embodiment may include a language model trained to capture and extract contextual information for an input token sequence. The language model layer (712) according to one embodiment may output a language model hidden state (611) by capturing and extracting contextual information of a tokenized input text (601).

한편, 일 실시예에 따른 제2 처리부(720)는 외부지식 참조 정보(602)를 입력으로 하고 외부지식 임베딩(612)을 출력으로 하는 임베딩 레이어(721)를 포함할 수 있다.Meanwhile, the second processing unit (720) according to one embodiment may include an embedding layer (721) that inputs external knowledge reference information (602) and outputs external knowledge embedding (612).

일 실시예에 따른 임베딩 레이어(721)는 언어모델 은닉상태(611)와 동일한 크기를 가지는 외부지식 임베딩(612)을 출력할 수 있다. 예를 들어, 언어모델 은닉상태(611)와 외부지식 임베딩(612)은 동일한 크기를 가지는 행렬(matrix)로 표현될 수 있다.An embedding layer (721) according to one embodiment can output an external knowledge embedding (612) having the same size as the language model hidden state (611). For example, the language model hidden state (611) and the external knowledge embedding (612) can be expressed as matrices having the same size.

구체적 일 예로서, 언어모델 은닉상태(611) 및 외부지식 임베딩(612)은 행 또는 열 중 어느 하나가 토큰화된 입력 텍스트(601)의 총 토큰 수이고, 행 또는 열 중 나머지 하나가 기설정된 토큰별 벡터 사이즈인 행렬로 표현될 수 있다.As a specific example, the language model hidden state (611) and external knowledge embedding (612) can be expressed as a matrix in which one of the rows or columns is the total number of tokens of the tokenized input text (601) and the other of the rows or columns is a preset token-by-token vector size.

도 8은 일 실시예에 따른 자연어 처리 모델에 포함되는 모델 디코더 및 분류자를 설명하기 위한 예시적인 도면이다.FIG. 8 is an exemplary diagram illustrating a model decoder and classifier included in a natural language processing model according to one embodiment.

도 8을 참조하면, 일 실시예에 따른 자연어 처리 장치(120)는 언어모델 은닉상태(611) 및 외부지식 임베딩(612)을 모델 디코더(620)에 입력하여, 모델 디코더(620)의 출력으로서 디코더 은닉상태(621)를 획득할 수 있다. 일 실시예에 따른 모델 디코더(620)는 트랜스포머 디코더(Transformer decoder)를 포함할 수 있다.Referring to FIG. 8, a natural language processing device (120) according to one embodiment may input a language model hidden state (611) and external knowledge embedding (612) into a model decoder (620) to obtain a decoder hidden state (621) as an output of the model decoder (620). The model decoder (620) according to one embodiment may include a transformer decoder.

일 실시예에 따르면, 자연어 처리 장치(120)는 언어모델 은닉상태(611) 및 외부지식 임베딩(612)를 결합(concatenate)하여 모델 디코더(620)에 입력할 수 있다. 일 실시예에 따르면, 자연어 처리 장치(120)는 동일한 크기의 행렬인 언어모델 은닉상태(611) 및 외부지식 임베딩(612)을 행렬 결합하고, 행렬 결합의 결과를 모델 디코더(620)에 입력할 수 있다. 예를 들어, 자연어 처리 장치(120)는 동일한 크기의 행렬인 언어모델 은닉상태(611) 및 외부지식 임베딩(612)을 행 또는 열 기준으로 이어 붙임으로써 행렬 결합을 수행할 수 있다.According to one embodiment, the natural language processing device (120) can concatenate the language model hidden state (611) and the external knowledge embedding (612) and input them to the model decoder (620). According to one embodiment, the natural language processing device (120) can concatenate the language model hidden state (611) and the external knowledge embedding (612), which are matrices of the same size, and input the result of the matrix concatenation to the model decoder (620). For example, the natural language processing device (120) can perform matrix concatenation by concatenating the language model hidden state (611) and the external knowledge embedding (612), which are matrices of the same size, based on rows or columns.

한편, 일 실시예에 따른 분류자(630)는 디코더 은닉상태(621)에 기초하여 의도 분류 정보(631)를 생성하는 제1 분류자(810) 및 디코더 은닉상태(621)에 기초하여 슬롯 태깅 정보(632)를 생성하는 제2 분류자(820)를 포함할 수 있다.Meanwhile, a classifier (630) according to one embodiment may include a first classifier (810) that generates intent classification information (631) based on a decoder hidden state (621) and a second classifier (820) that generates slot tagging information (632) based on the decoder hidden state (621).

일 실시예에 따른 디코더 은닉상태(621)는, 도 6을 참조하여 상술한 바와 같이, 언어모델 은닉상태(611) 및 외부지식 임베딩(612)으로부터 의도 분류 및 슬롯 태깅을 위한 유의미한 특징이 추출 또는 변환된 데이터를 포함할 수 있다.The decoder hidden state (621) according to one embodiment may include data in which meaningful features for intent classification and slot tagging are extracted or transformed from the language model hidden state (611) and external knowledge embedding (612), as described above with reference to FIG. 6.

일 실시예에 따른 제1 분류자(810)는 문장 분류 과업의 적어도 일부를 수행할 수 있다. 일 실시예에 따른 제1 분류자(810)는 디코더 은닉상태(621)를 이용하여 입력 텍스트(601)에 대응되는 목적 또는 의도를 분류함으로써 의도 분류 정보(631)를 생성할 수 있다.The first classifier (810) according to one embodiment can perform at least a part of the sentence classification task. The first classifier (810) according to one embodiment can generate intent classification information (631) by classifying a purpose or intent corresponding to an input text (601) using a decoder hidden state (621).

예를 들어, 입력 텍스트(601)가 "서울은행으로안내"인 경우, 제1 분류자(810)는 디코더 은닉상태(621)가 나타내는 입력 텍스트(601)의 특징을 이용함으로써, 입력 텍스트(601)의 목적 또는 의도를 "길 찾기"로 분류할 수 있다.For example, if the input text (601) is “Directions to Seoul Bank,” the first classifier (810) can classify the purpose or intention of the input text (601) as “directions” by utilizing the features of the input text (601) indicated by the decoder hidden state (621).

또한, 일 실시예에 따른 제2 분류자(820)는 시퀀스 레이블링 과업의 적어도 일부를 수행할 수 있다. 일 실시예에 따른 제2 분류자(820)는 디코더 은닉상태(621)를 이용하여 입력 텍스트(601)에 대한 적어도 하나의 슬롯을 알맞은 클래스에 레이블링함으로써 슬롯 태깅 정보(632)를 생성할 수 있다.Additionally, the second classifier (820) according to one embodiment can perform at least a part of the sequence labeling task. The second classifier (820) according to one embodiment can generate slot tagging information (632) by labeling at least one slot for the input text (601) to an appropriate class using the decoder hidden state (621).

예를 들어, 입력 텍스트(601)가 "서울은행으로안내"인 경우, 제2 분류자(820)는 디코더 은닉상태(621)가 나타내는 입력 텍스트(601)의 특징을 이용함으로써, "서울은행으로안내"에서 "서울은행"을 구성하는 문자 또는 그 문자에 대응되는 토큰에 bank라는 클래스를 레이블링할 수 있다.For example, if the input text (601) is “Guide to Seoul Bank,” the second classifier (820) can label the class “bank” to the characters that make up “Seoul Bank” in “Guide to Seoul Bank” or the tokens corresponding to those characters by using the features of the input text (601) indicated by the decoder hidden state (621).

도 9는 일 실시예에 따라 비자기회귀 기법에 기반하여 슬롯 태깅 정보를 생성하는 제2 분류자를 설명하기 위한 예시적인 도면이다.FIG. 9 is an exemplary diagram illustrating a second classifier that generates slot tagging information based on a non-self-regression technique according to one embodiment.

제2 분류자(820)는 입력 텍스트(601)를 구성하는 각각의 문자 또는 그 문자에 대응되는 토큰에 알맞은 클래스를 레이블링할 수 있다. 일 실시예에 따르면, 제2 분류자(820)는 특정 토큰에 대한 결과값을 추론할 때, 적어도 하나의 주변 토큰에 대한 결과값을 참고할 수 있다. 예를 들어, 제2 분류자(820)는 조건부 무작위장(CRF, Conditional Random Field)에 기반하는 분류자를 포함할 수 있다.The second classifier (820) can label each character that constitutes the input text (601) or a token corresponding to the character with an appropriate class. According to one embodiment, the second classifier (820) can refer to the result value for at least one surrounding token when inferring the result value for a specific token. For example, the second classifier (820) can include a classifier based on a conditional random field (CRF).

조건부 무작위장에 기반하여 슬롯 태깅 정보를 생성하는 경우, 제2 분류자(820)는 각 토큰에 대한 결과값을 순차적으로 추론함으로써 다른 토큰의 결과값을 참고할 수 있고, 각 토큰 주변의 언어적 맥락을 상대적으로 크게 고려할 수 있는 바, 상대적으로 높은 정확도의 결과값을 얻을 수 있다.When generating slot tagging information based on a conditional random field, the second classifier (820) can sequentially infer the result value for each token, thereby referencing the result value of another token, and can relatively largely consider the linguistic context around each token, thereby obtaining a result value with relatively high accuracy.

한편, 도 9를 참조하면, 일 실시예에 따른 제2 분류자(820)는 비자기회귀(non-autoregressive) 기법에 기반하여 슬롯 태깅 정보를 생성할 수 있다. 일 실시예에 따른 비자기회귀 기법은 비자기회귀 디코딩을 포함할 수 있다.Meanwhile, referring to FIG. 9, the second classifier (820) according to one embodiment may generate slot tagging information based on a non-autoregressive technique. The non-autoregressive technique according to one embodiment may include non-autoregressive decoding.

일 실시예에 따르면, 제2 분류자(820)는 각각의 토큰에 대한 결과값을 추론할 때, 다른 토큰에 대한 결과값을 참고하지 않고, 독립적인 추론을 수행할 수 있다. 예를 들어, 제2 분류자(820)는 비자기회귀(non-autoregressive)에 기반하는 분류자를 포함할 수 있다. 비자기회귀에 기반하여 슬롯 태깅 정보를 생성하는 경우, 제2 분류자(820)는 각 토큰에 대한 결과값을 다른 토큰에 대한 결과값과 독립적으로 추론할 수 있다.According to one embodiment, the second classifier (820) can perform independent inference when inferring the result value for each token without referring to the result value for other tokens. For example, the second classifier (820) can include a classifier based on non-autoregressive. When generating slot tagging information based on non-autoregressive, the second classifier (820) can infer the result value for each token independently from the result value for other tokens.

일 실시예에 따른 제2 분류자(820)는 디코더 은닉상태(901) 이용하여 입력 텍스트(601)에 대한 적어도 하나의 슬롯을 알맞은 클래스에 레이블링함으로써 슬롯 태깅 정보(902)를 생성할 수 있다. 도 9에 도시된 디코더 은닉상태(901) 및 슬롯 태깅 정보(902)는 도 6에 도시된 디코더 은닉상태(621) 및 슬롯 태깅 정보(632) 각각에 대한 예시로 이해될 수 있다.A second classifier (820) according to one embodiment can generate slot tagging information (902) by labeling at least one slot for an input text (601) with an appropriate class using a decoder hidden state (901). The decoder hidden state (901) and slot tagging information (902) illustrated in FIG. 9 can be understood as examples for the decoder hidden state (621) and slot tagging information (632) illustrated in FIG. 6, respectively.

일 실시예에 따라 비자기회귀에 기반하는 제2 분류자(820)는, 디코더 은닉상태(901)를 입력으로 획득하고, 입력 텍스트(601)의 문자 또는 토큰 각각에 대응되는 디코더 은닉상태(901)의 적어도 일부 각각을 병렬적으로 처리함으로써 높은 연산 속도로 슬롯 태깅 정보(902)를 생성할 수 있다.According to one embodiment, a second classifier (820) based on non-self-regression can obtain a decoder hidden state (901) as input and generate slot tagging information (902) at a high computational speed by processing in parallel at least a portion of each of the decoder hidden states (901) corresponding to each character or token of the input text (601).

한편, 디코더 은닉상태(901)에는 외부지식 임베딩(612)에 대한 모델 디코더(620)의 처리 결과가 포함되는 바, 외부지식을 참조하지 않는 종래의 비자기회귀 기법과 비교하여 높은 정확도를 가지는 슬롯 태깅 정보(902)를 생성할 수 있다. 이를 통해, 자연어 처리 모델(600)은 높은 정확도와 높은 연산 속도를 동시에 실현할 수 있다.Meanwhile, the decoder hidden state (901) includes the processing result of the model decoder (620) for the external knowledge embedding (612), so that slot tagging information (902) with high accuracy can be generated compared to the conventional non-self-regression technique that does not refer to external knowledge. Through this, the natural language processing model (600) can realize high accuracy and high operation speed at the same time.

도 10은 외부지식을 이용하여 자연어를 처리하는 방법의 일 예시이다.Figure 10 is an example of a method for processing natural language using external knowledge.

도 10을 참조하면, 단계 1010에서, 자연어 처리 장치(120)는 자연어 표현을 포함하는 입력 텍스트를 획득할 수 있다.Referring to FIG. 10, in step 1010, a natural language processing device (120) can obtain an input text including a natural language expression.

단계 1020에서, 자연어 처리 장치(120)는 기생성된 외부지식(external knowledge) 데이터베이스를 참조하여 입력 텍스트에 대한 외부지식 참조 정보를 생성할 수 있다.In step 1020, the natural language processing device (120) can generate external knowledge reference information for the input text by referencing a parasitic external knowledge database.

일 실시예에 따른 외부지식 데이터베이스는 표현 및 표현에 대한 유형으로 구성되는 복수개의 표현-유형 쌍을 포함할 수 있다. 이때, 자연어 처리 장치(120)는 외부지식 데이터베이스를 참조하여 표현-유형 쌍 중 적어도 하나를 입력 텍스트에 매칭함으로써 외부지식 참조 정보를 생성할 수 있다.An external knowledge database according to one embodiment may include a plurality of expression-type pairs, each of which is composed of an expression and a type for the expression. At this time, the natural language processing device (120) may generate external knowledge reference information by matching at least one of the expression-type pairs to an input text by referencing the external knowledge database.

일 실시예에 따른 표현에 대한 유형은, 선택된 도메인(domain)에 기초하여 설정되는 적어도 하나의 유형을 포함할 수 있다.A type for an expression according to one embodiment may include at least one type set based on a selected domain.

일 실시예에 따르면, 자연어 처리 장치(120)는 입력 텍스트를 복수개의 n-그램(n-gram)으로 분리할 수 있다. 자연어 처리 장치(120)는 외부지식 데이터베이스에서 복수개의 n-그램을 검색하고, 검색의 결과에 기초하여 표현-유형 쌍 중에서 적어도 하나의 대상 쌍을 선택할 수 있다. 이때, 대상 쌍은 대상 표현 및 대상 유형으로 구성될 수 있다. 자연어 처리 장치(120)는 대상 유형을 입력 텍스트에 포함된 대상 표현에 매칭함으로써 외부지식 참조 정보를 생성할 수 있다.According to one embodiment, the natural language processing device (120) can divide the input text into a plurality of n-grams. The natural language processing device (120) can search for the plurality of n-grams in an external knowledge database, and select at least one target pair from among the expression-type pairs based on the search result. At this time, the target pair can be composed of a target expression and a target type. The natural language processing device (120) can generate external knowledge reference information by matching the target type to the target expression included in the input text.

일 실시예에 따르면, 대상 쌍은 제1 쌍 및 제2 쌍을 포함할 수 있고, 제1 쌍은 제1 표현 및 제1 유형으로 구성될 수 있으며, 제2 쌍은 제2 표현 및 제2 유형으로 구성될 수 있다. 이때, 제2 표현은 제1 표현과 상이할 수 있으며, 제1 표현을 구성하는 모든 문자를 포함할 수 있다. 일 실시예에 따르면, 자연어 처리 장치(120)는 소정의 기준에 기초하여 제1 유형 및 제2 유형 중 적어도 하나를 제1 표현에 매칭함으로써 외부지식 참조 정보를 생성할 수 있다.According to one embodiment, the target pair may include a first pair and a second pair, and the first pair may be composed of a first expression and a first type, and the second pair may be composed of a second expression and a second type. In this case, the second expression may be different from the first expression and may include all characters constituting the first expression. According to one embodiment, the natural language processing device (120) may generate external knowledge reference information by matching at least one of the first type and the second type to the first expression based on a predetermined criterion.

단계 1030에서, 자연어 처리 장치(120)는 입력 텍스트 및 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력할 수 있다.In step 1030, the natural language processing device (120) can input input text and external knowledge reference information into a pre-learned natural language processing model.

단계 1040에서, 자연어 처리 장치(120)는 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 자연어 처리 모델의 출력을 획득할 수 있다.In step 1040, the natural language processing device (120) can obtain an output of a natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text.

일 실시예에 따른 자연어 처리 모델은 모델 인코더, 모델 디코더 및 분류자(classifier)를 포함할 수 있다.A natural language processing model according to one embodiment may include a model encoder, a model decoder, and a classifier.

일 실시예에 따르면, 자연어 처리 장치(120)는 입력 텍스트 및 외부지식 참조 정보를 모델 인코더에 입력하여, 모델 인코더의 출력으로서 언어모델 은닉상태(language model hidden state) 및 외부지식 임베딩(external knowledge embedding)을 획득할 수 있다. 자연어 처리 장치(120)는 언어모델 은닉상태 및 외부지식 임베딩을 모델 디코더에 입력하여, 모델 디코더의 출력으로서 디코더 은닉상태를 획득할 수 있다. 자연어 처리 장치(120)는 디코더 은닉상태를 분류자에 입력하여, 분류자의 출력으로서 자연어 처리 모델의 출력을 획득할 수 있다.According to one embodiment, the natural language processing device (120) can input input text and external knowledge reference information into a model encoder to obtain a language model hidden state and external knowledge embedding as outputs of the model encoder. The natural language processing device (120) can input the language model hidden state and external knowledge embedding into a model decoder to obtain a decoder hidden state as outputs of the model decoder. The natural language processing device (120) can input the decoder hidden state into a classifier to obtain an output of a natural language processing model as outputs of the classifier.

일 실시예에 따른 모델 인코더는 제1 처리부 및 제2 처리부를 포함할 수 있다. 일 실시예에 따른 제1 처리부는 입력 텍스트를 토큰화(tokenize)하는 토큰화 레이어 및 언어모델 은닉상태를 출력하는 언어모델 레이어를 포함할 수 있으며, 일 실시예에 따른 제2 처리부는 외부지식 참조 정보를 입력으로 하고 외부지식 임베딩을 출력으로 하는 임베딩 레이어를 포함할 수 있다.A model encoder according to one embodiment may include a first processing unit and a second processing unit. The first processing unit according to one embodiment may include a tokenization layer that tokenizes an input text and a language model layer that outputs a language model hidden state, and the second processing unit according to one embodiment may include an embedding layer that inputs external knowledge reference information and outputs external knowledge embedding.

일 실시예에 따른 분류자는 디코더 은닉상태에 기초하여 의도 분류 정보를 생성하는 제1 분류자 및 디코더 은닉상태에 기초하여 슬롯 태깅 정보를 생성하는 제2 분류자를 포함할 수 있다.A classifier according to one embodiment may include a first classifier that generates intent classification information based on a decoder hidden state and a second classifier that generates slot tagging information based on the decoder hidden state.

일 실시예에 따른 제2 분류자는 비자기회귀(non-autoregressive) 기법에 기반하여 슬롯 태깅 정보를 생성할 수 있다.A second classifier according to one embodiment may generate slot tagging information based on a non-autoregressive technique.

도 11은 일 실시예에 따른 자연어 처리 장치의 블록도이다. 한편, 도 11에 도시된 장치(1100)는 도 1에 도시된 자연어 처리 장치(120)에 대응될 수 있다.Fig. 11 is a block diagram of a natural language processing device according to one embodiment. Meanwhile, the device (1100) illustrated in Fig. 11 may correspond to the natural language processing device (120) illustrated in Fig. 1.

도 11을 참조하면, 장치(1100)는 통신 모듈(1110), 프로세서(1120) 및 메모리(1130)를 포함할 수 있다. 도 11의 장치(1100)에는 실시예와 관련된 구성요소들만이 도시되어 있다. 따라서, 도 11에 도시된 구성요소들 외에 다른 범용적인 구성요소들이 더 포함될 수 있음을 당해 기술분야의 통상의 기술자라면 이해할 수 있다.Referring to FIG. 11, the device (1100) may include a communication module (1110), a processor (1120), and a memory (1130). Only components related to the embodiment are illustrated in the device (1100) of FIG. 11. Accordingly, a person skilled in the art will understand that other general components may be further included in addition to the components illustrated in FIG. 11.

통신 모듈(1110)은 장치(1100)가 사용자 단말(110), 외부지식 데이터베이스(130) 및/또는 다른 외부 장치와 유선/무선 통신을 하게 하는 적어도 하나의 구성 요소를 포함할 수 있다. 예를 들어, 통신 모듈(1110)은, 근거리 통신부(미도시), 이동 통신부(미도시) 및 방송 수신부(미도시) 중 적어도 하나를 포함할 수 있다.The communication module (1110) may include at least one component that allows the device (1100) to communicate with the user terminal (110), the external knowledge database (130), and/or other external devices via wired/wireless communication. For example, the communication module (1110) may include at least one of a short-range communication unit (not shown), a mobile communication unit (not shown), and a broadcast receiving unit (not shown).

메모리(1130)는 장치(1100) 내에서 처리되는 각종 데이터들을 저장하는 하드웨어로서, 프로세서(1120)의 처리 및 제어를 위한 프로그램을 저장할 수 있다.Memory (1130) is a hardware that stores various data processed within the device (1100) and can store a program for processing and controlling the processor (1120).

메모리(1130)는 DRAM(dynamic random access memory), SRAM(static random access memory) 등과 같은 RAM(random access memory), ROM(read-only memory), EEPROM(electrically erasable programmable read-only memory), CD-ROM, 블루레이 또는 다른 광학 디스크 스토리지, HDD(hard disk drive), SSD(solid state drive), 또는 플래시 메모리를 포함할 수 있다.Memory (1130) may include random access memory (RAM) such as dynamic random access memory (DRAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), CD-ROM, Blu-ray or other optical disk storage, hard disk drive (HDD), solid state drive (SSD), or flash memory.

프로세서(1120)는 장치(1100)의 전반적인 동작을 제어한다. 예를 들어, 프로세서(1120)는 메모리(1130)에 저장된 프로그램들을 실행함으로써, 통신 모듈(1110), 메모리(1130) 등을 전반적으로 제어할 수 있다. 프로세서(1120)는, 메모리(1130)에 저장된 프로그램들을 실행함으로써, 장치(1100)의 동작을 제어할 수 있다.The processor (1120) controls the overall operation of the device (1100). For example, the processor (1120) can control the overall operation of the communication module (1110), the memory (1130), etc. by executing programs stored in the memory (1130). The processor (1120) can control the operation of the device (1100) by executing programs stored in the memory (1130).

프로세서(1120)는 도 1 내지 도 10을 참조하여 상술한 장치(1100)의 동작 중 적어도 일부를 제어할 수 있다.The processor (1120) can control at least some of the operations of the device (1100) described above with reference to FIGS. 1 to 10.

예를 들어, 프로세서(1120)는 자연어 표현을 포함하는 입력 텍스트를 획득하도록 상기 통신 모듈을 제어하고, 기생성된 외부지식(external knowledge) 데이터베이스를 참조하여 상기 입력 텍스트에 대한 외부지식 참조 정보를 생성하고, 상기 입력 텍스트 및 상기 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력하고, 상기 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 상기 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 상기 자연어 처리 모델의 출력을 획득할 수 있다.For example, the processor (1120) may control the communication module to obtain an input text including a natural language expression, generate external knowledge reference information for the input text by referencing a pre-generated external knowledge database, input the input text and the external knowledge reference information into a pre-learned natural language processing model, and obtain an output of the natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text.

한편, 프로세서(1120)가 동작하는 구체적인 예는 도 1 내지 도 10을 참조하여 상술한 바와 동일하다. 따라서, 이하에서는 프로세서(1120)의 동작에 대한 구체적인 설명은 생략한다.Meanwhile, a specific example of the operation of the processor (1120) is the same as that described above with reference to FIGS. 1 to 10. Therefore, a specific description of the operation of the processor (1120) is omitted below.

프로세서(1120)는 ASICs (application specific integrated circuits), DSPs(digital signal processors), DSPDs(digital signal processing devices), PLDs(programmable logic devices), FPGAs(field programmable gate arrays), 제어기(controllers), 마이크로 컨트롤러(micro-controllers), 마이크로 프로세서(microprocessors), 기타 기능 수행을 위한 전기적 유닛 중 적어도 하나를 이용하여 구현될 수 있다.The processor (1120) may be implemented using at least one of application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, and other electrical units for performing functions.

일 실시예로, 장치(1100)는 이동성을 가지는 전자 장치일 수 있다. 예를 들어, 장치(1100)는 차량에 탑재된 컴퓨팅 장치를 포함할 수 있다. 이때, '차량'은 자동차, 버스, 오토바이, 킥보드 또는 트럭과 같이 기관을 가지고 사람이나 물건을 이동시키기 위해 이용되는 모든 종류의 운송 수단을 의미할 수 있다. 다른 예를 들어, 장치(1100)는 스마트폰, 태블릿 PC, PC, 스마트 TV, PDA(personal digital assistant), 랩톱, 미디어 플레이어, 내비게이션, 가 탑재된 디바이스 및 기타 모바일 전자 장치로 구현될 수 있다.In one embodiment, the device (1100) may be an electronic device having mobility. For example, the device (1100) may include a computing device mounted on a vehicle. In this case, the 'vehicle' may mean any type of transportation means that has an engine and is used to move people or objects, such as an automobile, a bus, a motorcycle, a kickboard, or a truck. For another example, the device (1100) may be implemented as a smartphone, a tablet PC, a PC, a smart TV, a personal digital assistant (PDA), a laptop, a media player, a navigation, a device equipped with a navigation, and other mobile electronic devices.

다른 실시예로, 장치(1100)는 차량 외부에 위치하는 서버일 수 있다. 서버는 네트워크를 통해 통신하여 명령, 코드, 파일, 컨텐츠, 서비스 등을 제공하는 컴퓨터 장치 또는 복수의 컴퓨터 장치들로 구현될 수 있다.In another embodiment, the device (1100) may be a server located outside the vehicle. The server may be implemented as a computer device or multiple computer devices that communicate over a network to provide commands, codes, files, content, services, etc.

또 다른 실시예로, 장치(1100)에서 수행되는 적어도 하나의 동작은 이동성을 가지는 전자 장치, 차량 내에 임베디드 되는 전자 장치 및 차량 외부에 위치하는 서버 중 적어도 일부에 의해 수행될 수 있다.In another embodiment, at least one operation performed in the device (1100) may be performed by at least some of a mobile electronic device, an electronic device embedded in a vehicle, and a server located outside the vehicle.

본 개시에 따른 실시예는 컴퓨터 상에서 다양한 구성요소를 통하여 실행될 수 있는 컴퓨터 프로그램의 형태로 구현될 수 있으며, 이와 같은 컴퓨터 프로그램은 컴퓨터로 판독 가능한 매체에 기록될 수 있다. 이때, 매체는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체, CD-ROM 및 DVD와 같은 광기록 매체, 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical medium), 및 ROM, RAM, 플래시 메모리 등과 같은, 프로그램 명령어를 저장하고 실행하도록 특별히 구성된 하드웨어 장치를 포함할 수 있다.Embodiments according to the present disclosure may be implemented in the form of a computer program that can be executed through various components on a computer, and such a computer program may be recorded on a computer-readable medium. At this time, the medium may include a magnetic medium such as a hard disk, a floppy disk, and a magnetic tape, an optical recording medium such as a CD-ROM and a DVD, a magneto-optical medium such as a floptical disk, and a hardware device specifically configured to store and execute program instructions, such as a ROM, a RAM, a flash memory, and the like.

한편, 상기 컴퓨터 프로그램은 본 개시를 위하여 특별히 설계되고 구성된 것이거나 컴퓨터 소프트웨어 분야의 당업자에게 공지되어 사용 가능한 것일 수 있다. 컴퓨터 프로그램의 예에는, 컴파일러에 의하여 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용하여 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드도 포함될 수 있다.Meanwhile, the computer program may be one that is specifically designed and configured for the present disclosure or one that is known and available to those skilled in the art of computer software. Examples of computer programs may include not only machine language codes such as those produced by a compiler, but also high-level language codes that can be executed by a computer using an interpreter, etc.

일 실시예에 따르면, 본 개시의 다양한 실시예들에 따른 방법은 컴퓨터 프로그램 제품(computer program product)에 포함되어 제공될 수 있다. 컴퓨터 프로그램 제품은 상품으로서 판매자 및 구매자 간에 거래될 수 있다. 컴퓨터 프로그램 제품은 기기로 읽을 수 있는 저장 매체(예: compact disc read only memory (CD-ROM))의 형태로 배포되거나, 또는 어플리케이션 스토어(예: 플레이 스토어TM)를 통해 또는 두 개의 사용자 장치들 간에 직접, 온라인으로 배포(예: 다운로드 또는 업로드)될 수 있다. 온라인 배포의 경우에, 컴퓨터 프로그램 제품의 적어도 일부는 제조사의 서버, 어플리케이션 스토어의 서버, 또는 중계 서버의 메모리와 같은 기기로 읽을 수 있는 저장 매체에 적어도 일시 저장되거나, 임시적으로 생성될 수 있다.According to one embodiment, the method according to various embodiments of the present disclosure may be provided as included in a computer program product. The computer program product may be traded between a seller and a buyer as a commodity. The computer program product may be distributed in the form of a machine-readable storage medium (e.g., a compact disc read only memory (CD-ROM)), or may be distributed online (e.g., downloaded or uploaded) via an application store (e.g., Play StoreTM) or directly between two user devices. In the case of online distribution, at least a part of the computer program product may be at least temporarily stored or temporarily generated in a machine-readable storage medium, such as a memory of a manufacturer's server, a server of an application store, or an intermediary server.

본 개시에 따른 방법을 구성하는 단계들에 대하여 명백하게 순서를 기재하거나 반하는 기재가 없다면, 상기 단계들은 적당한 순서로 행해질 수 있다. 반드시 상기 단계들의 기재 순서에 따라 본 개시가 한정되는 것은 아니다. 본 개시에서 모든 예들 또는 예시적인 용어(예를 들어, 등등)의 사용은 단순히 본 개시를 상세히 설명하기 위한 것으로서 특허청구범위에 의해 한정되지 않는 이상 상기 예들 또는 예시적인 용어로 인해 본 개시의 범위가 한정되는 것은 아니다. 또한, 당업자는 다양한 수정, 조합 및 변경이 부가된 특허청구범위 또는 그 균등물의 범주 내에서 설계 조건 및 팩터에 따라 구성될 수 있음을 알 수 있다.Unless there is an explicit description of the order or the contrary description for the steps constituting the method according to the present disclosure, the steps can be performed in any suitable order. The present disclosure is not necessarily limited by the description order of the steps. The use of all examples or exemplary terms (e.g., etc.) in this disclosure is merely for the purpose of describing the present disclosure in more detail and is not intended to limit the scope of the present disclosure due to the examples or exemplary terms, unless limited by the claims. In addition, those skilled in the art will appreciate that various modifications, combinations, and changes can be configured according to design conditions and factors within the scope of the appended claims or their equivalents.

따라서, 본 개시의 사상은 상기 설명된 실시 예에 국한되어 정해져서는 아니 되며, 후술하는 특허청구범위뿐만 아니라 이 특허청구범위와 균등한 또는 이로부터 등가적으로 변경된 모든 범위는 본 개시의 사상의 범주에 속한다고 할 것이다.Therefore, the spirit of the present disclosure should not be limited to the embodiments described above, and not only the scope of the patent claims described below but also all scopes equivalent to or equivalently modified from the scope of the patent claims are included in the scope of the spirit of the present disclosure.

Claims (11)

자연어 표현을 포함하는 입력 텍스트를 획득하는 단계;
기생성된 외부지식(external knowledge) 데이터베이스를 참조하여, 상기 입력 텍스트에 포함된 적어도 하나의 대상 표현 각각에 상기 대상 표현에 대응되는 대상 유형을 매칭함으로써 상기 입력 텍스트에 대한 외부지식 참조 정보를 생성하는 단계;
상기 입력 텍스트 및 상기 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력하는 단계; 및
상기 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 상기 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 상기 자연어 처리 모델의 출력을 획득하는 단계;
를 포함하고,
상기 생성하는 단계는,
상기 입력 텍스트에 포함된 제1 표현 및 제2 표현이 중복된 문자를 포함하는 것을 기초로, 기설정된 소정의 기준에 따라 제1 유형 및 제2 유형 중 적어도 하나를 상기 중복된 문자에 매칭하는 단계;
를 포함하고,
상기 제2 표현은 상기 제1 표현과 상이한, 외부지식을 이용한 자연어 처리 방법.
A step of obtaining an input text containing a natural language expression;
A step of generating external knowledge reference information for the input text by matching each of at least one target expression included in the input text with a target type corresponding to the target expression by referencing a parasitic external knowledge database;
A step of inputting the above input text and the above external knowledge reference information into a pre-learned natural language processing model; and
A step of obtaining an output of the natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text;
Including,
The above generating steps are:
A step of matching at least one of the first type and the second type to the duplicated character according to a preset criterion, based on the first expression and the second expression included in the input text including duplicated characters;
Including,
The above second expression is a natural language processing method using external knowledge, which is different from the above first expression.
제 1 항에 있어서,
상기 외부지식 데이터베이스는 표현 및 상기 표현에 대한 유형으로 구성되는 복수개의 표현-유형 쌍을 저장하는 데이터베이스를 포함하고,
상기 생성하는 단계는,
상기 표현-유형 쌍 중 적어도 하나의 대상 쌍을 선택하는 단계; 및
상기 선택된 대상 쌍을 기초로 상기 적어도 하나의 대상 표현 각각에 상기 대상 유형을 매칭하는 단계;
를 포함하는, 방법.
In paragraph 1,
The above external knowledge database includes a database storing a plurality of expression-type pairs, each of which consists of an expression and a type for the expression,
The above generating steps are:
a step of selecting at least one target pair among the above expression-type pairs; and
A step of matching the target type to each of the at least one target expression based on the selected target pair;
A method comprising:
제 2 항에 있어서,
상기 외부지식 데이터베이스 내에서 참조의 대상이 되는 유형은, 미리 선택된 도메인(domain)에 기초하여 설정되는, 방법.
In the second paragraph,
A method in which the type to be referenced within the above external knowledge database is set based on a pre-selected domain.
제 2 항에 있어서,
상기 선택하는 단계는,
상기 입력 텍스트를 복수개의 n-그램(n-gram)으로 분리하는 단계; 및
상기 외부지식 데이터베이스에서 상기 복수개의 n-그램을 검색하고, 상기 검색의 결과에 기초하여 상기 표현-유형 쌍 중에서 상기 적어도 하나의 대상 쌍을 선택하는 단계;
를 포함하는, 방법.
In the second paragraph,
The above selection steps are:
A step of dividing the above input text into multiple n-grams; and
A step of searching the plurality of n-grams in the external knowledge database and selecting at least one target pair from among the expression-type pairs based on the result of the search;
A method comprising:
삭제delete 제 1 항에 있어서,
상기 자연어 처리 모델은 모델 인코더, 모델 디코더 및 분류자(classifier)를 포함하고,
상기 자연어 처리 모델의 출력을 획득하는 단계는,
상기 입력 텍스트 및 상기 외부지식 참조 정보를 상기 모델 인코더에 입력하여, 상기 모델 인코더의 출력으로서 언어모델 은닉상태(language model hidden state) 및 외부지식 임베딩(external knowledge embedding)을 획득하는 단계;
상기 언어모델 은닉상태 및 상기 외부지식 임베딩을 상기 모델 디코더에 입력하여, 상기 모델 디코더의 출력으로서 디코더 은닉상태를 획득하는 단계; 및
상기 디코더 은닉상태를 상기 분류자에 입력하여, 상기 분류자의 출력으로서 상기 자연어 처리 모델의 출력을 획득하는 단계;
를 포함하는, 방법.
In paragraph 1,
The above natural language processing model includes a model encoder, a model decoder, and a classifier.
The step of obtaining the output of the above natural language processing model is:
A step of inputting the input text and the external knowledge reference information into the model encoder to obtain a language model hidden state and an external knowledge embedding as outputs of the model encoder;
A step of inputting the above language model hidden state and the external knowledge embedding into the model decoder to obtain a decoder hidden state as an output of the model decoder; and
A step of inputting the above decoder hidden state into the above classifier and obtaining the output of the natural language processing model as the output of the above classifier;
A method comprising:
제 6 항에 있어서,
상기 모델 인코더는 제1 처리부 및 제2 처리부를 포함하고,
상기 제1 처리부는 상기 입력 텍스트를 토큰화(tokenize)하는 토큰화 레이어 및 상기 언어모델 은닉상태를 출력하는 언어모델 레이어를 포함하고,
상기 제2 처리부는 상기 외부지식 참조 정보를 입력으로 하고 상기 외부지식 임베딩을 출력으로 하는 임베딩 레이어를 포함하는, 방법.
In paragraph 6,
The above model encoder includes a first processing unit and a second processing unit,
The first processing unit includes a tokenization layer that tokenizes the input text and a language model layer that outputs the language model hidden state.
A method wherein the second processing unit includes an embedding layer that takes the external knowledge reference information as input and the external knowledge embedding as output.
제 6 항에 있어서,
상기 분류자는 상기 디코더 은닉상태에 기초하여 상기 의도 분류 정보를 생성하는 제1 분류자 및 상기 디코더 은닉상태에 기초하여 상기 슬롯 태깅 정보를 생성하는 제2 분류자를 포함하는, 방법.
In paragraph 6,
A method, wherein the classifier comprises a first classifier that generates the intent classification information based on the decoder hidden state and a second classifier that generates the slot tagging information based on the decoder hidden state.
제 8 항에 있어서,
상기 제2 분류자는 비자기회귀(non-autoregressive) 기법에 기반하여 상기 슬롯 태깅 정보를 생성하는, 방법.
In Article 8,
A method wherein the second classifier generates the slot tagging information based on a non-autoregressive technique.
외부 장치와 통신을 수행하는 통신 모듈;
적어도 하나의 프로그램이 저장된 메모리; 및
상기 적어도 하나의 프로그램을 실행함으로써 동작하는 프로세서;
를 포함하되,
상기 프로세서는,
자연어 표현을 포함하는 입력 텍스트를 획득하도록 상기 통신 모듈을 제어하고,
기생성된 외부지식(external knowledge) 데이터베이스를 참조하여, 상기 입력 텍스트에 포함된 적어도 하나의 대상 표현 각각에 상기 대상 표현에 대응되는 대상 유형을 매칭함으로써 상기 입력 텍스트에 대한 외부지식 참조 정보를 생성하고,
상기 입력 텍스트 및 상기 외부지식 참조 정보를 기학습된 자연어 처리 모델에 입력하고,
상기 입력 텍스트에 대응되는 의도 분류(intent classification) 정보 및 상기 입력 텍스트에 대응되는 슬롯 태깅(slot tagging) 정보를 포함하는 상기 자연어 처리 모델의 출력을 획득하고,
상기 생성하는 것은,
상기 입력 텍스트에 포함된 제1 표현 및 제2 표현이 중복된 문자를 포함하는 것을 기초로, 기설정된 소정의 기준에 따라 제1 유형 및 제2 유형 중 적어도 하나를 상기 중복된 문자에 매칭하는 것을 포함하고,
상기 제2 표현은 상기 제1 표현과 상이한, 외부지식을 이용한 자연어 처리 장치.
A communication module that performs communication with external devices;
memory in which at least one program is stored; and
A processor operating by executing at least one program;
Including, but not limited to,
The above processor,
Controlling the communication module to obtain an input text containing a natural language expression,
By referencing a parasitic external knowledge database, external knowledge reference information for the input text is generated by matching each of at least one target expression included in the input text with a target type corresponding to the target expression, and
The above input text and the above external knowledge reference information are input into a pre-trained natural language processing model,
Obtaining an output of the natural language processing model including intent classification information corresponding to the input text and slot tagging information corresponding to the input text,
The above creation is,
Based on the first expression and the second expression included in the input text including duplicate characters, matching at least one of the first type and the second type to the duplicate characters according to a preset criterion,
The above second expression is a natural language processing device using external knowledge, which is different from the above first expression.
제 1 항에 따른 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록 매체.A computer-readable recording medium having recorded thereon a program for executing the method according to claim 1 on a computer.
KR1020230137598A 2023-10-16 2023-10-16 Method and Apparatus for Natural Language Processing using External Knowledge Active KR102770519B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020230137598A KR102770519B1 (en) 2023-10-16 2023-10-16 Method and Apparatus for Natural Language Processing using External Knowledge
KR1020250019246A KR20250054754A (en) 2023-10-16 2025-02-14 Method and Apparatus for Natural Language Processing using External Knowledge

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020230137598A KR102770519B1 (en) 2023-10-16 2023-10-16 Method and Apparatus for Natural Language Processing using External Knowledge

Related Child Applications (1)

Application Number Title Priority Date Filing Date
KR1020250019246A Division KR20250054754A (en) 2023-10-16 2025-02-14 Method and Apparatus for Natural Language Processing using External Knowledge

Publications (1)

Publication Number Publication Date
KR102770519B1 true KR102770519B1 (en) 2025-02-21

Family

ID=94823788

Family Applications (2)

Application Number Title Priority Date Filing Date
KR1020230137598A Active KR102770519B1 (en) 2023-10-16 2023-10-16 Method and Apparatus for Natural Language Processing using External Knowledge
KR1020250019246A Pending KR20250054754A (en) 2023-10-16 2025-02-14 Method and Apparatus for Natural Language Processing using External Knowledge

Family Applications After (1)

Application Number Title Priority Date Filing Date
KR1020250019246A Pending KR20250054754A (en) 2023-10-16 2025-02-14 Method and Apparatus for Natural Language Processing using External Knowledge

Country Status (1)

Country Link
KR (2) KR102770519B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170106346A (en) * 2015-01-23 2017-09-20 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 How to Understand Incomplete Natural Language Queries
KR20220111570A (en) * 2021-02-02 2022-08-09 삼성전자주식회사 The electronic device for processing the user's inquiry and the method for operating the same
KR20230077532A (en) * 2021-11-25 2023-06-01 주식회사 카카오엔터프라이즈 Method and apparatus for determining answers in dialogue system
KR20230132278A (en) * 2022-03-08 2023-09-15 현대자동차주식회사 Method for training slot tagging model, computer readable medium, speech recognition apparatus and electronic device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170106346A (en) * 2015-01-23 2017-09-20 마이크로소프트 테크놀로지 라이센싱, 엘엘씨 How to Understand Incomplete Natural Language Queries
KR20220111570A (en) * 2021-02-02 2022-08-09 삼성전자주식회사 The electronic device for processing the user's inquiry and the method for operating the same
KR20230077532A (en) * 2021-11-25 2023-06-01 주식회사 카카오엔터프라이즈 Method and apparatus for determining answers in dialogue system
KR20230132278A (en) * 2022-03-08 2023-09-15 현대자동차주식회사 Method for training slot tagging model, computer readable medium, speech recognition apparatus and electronic device

Also Published As

Publication number Publication date
KR20250054754A (en) 2025-04-23

Similar Documents

Publication Publication Date Title
US11423233B2 (en) On-device projection neural networks for natural language understanding
US20240362286A1 (en) Semantic search and summarization for electronic documents
US20240370479A1 (en) Semantic search and summarization for electronic documents
CN119631069A (en) Systems and methods for real-time search-based generative artificial intelligence
EP3598436A1 (en) Structuring and grouping of voice queries
US20240394477A1 (en) Constructing Prompt Information for Submission to a Language Model by Dynamically Selecting from Context Information
CN110033382B (en) Insurance service processing method, device and equipment
KR102188564B1 (en) Method and system for machine translation capable of style transfer
Liu et al. A hybrid neural network RBERT-C based on pre-trained RoBERTa and CNN for user intent classification
US20240184982A1 (en) Hierarchical text generation using language model neural networks
EP4466630A1 (en) Generating output sequences with inline evidence using language model neural networks
Zhao et al. Augment BERT with average pooling layer for Chinese summary generation
CN114116971A (en) Model training method, device and computer equipment for generating similar text
Liu et al. Sentence part-enhanced BERT with respect to downstream tasks
WO2024226360A1 (en) Semantic search and summarization for electronic documents
Dandwate et al. Comparative study of Transformer and LSTM Network with attention mechanism on Image Captioning
Wang et al. Improving clinical named entity recognition in Chinese using the graphical and phonetic feature
Mosa et al. A real-time Arabic avatar for deaf–mute community using attention mechanism
CN114880516A (en) Training method of lyric generation model, lyric generation method and computer equipment
KR102770519B1 (en) Method and Apparatus for Natural Language Processing using External Knowledge
US20240362418A1 (en) Interacting with a Language Model using External Knowledge and Feedback
Long et al. A method of Chinese named entity recognition based on CNN-BiLSTM-CRF model
Ni et al. Recurrent neural network based language model adaptation for accent mandarin speech
CN117131155A (en) Multi-category identification method, device, electronic equipment and storage medium
Sri NLP in virtual Assistants

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20231016

PA0201 Request for examination

Patent event code: PA02012R01D

Patent event date: 20240318

Comment text: Request for Examination of Application

PA0302 Request for accelerated examination

Patent event date: 20240318

Patent event code: PA03022R01D

Comment text: Request for Accelerated Examination

PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20240522

Patent event code: PE09021S01D

PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20240619

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20241223

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20250214

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20250217

End annual number: 3

Start annual number: 1

PG1601 Publication of registration