KR101987915B1 - System for generating template used to generate query to knowledge base from natural language question and question answering system including the same - Google Patents
System for generating template used to generate query to knowledge base from natural language question and question answering system including the same Download PDFInfo
- Publication number
- KR101987915B1 KR101987915B1 KR1020170178745A KR20170178745A KR101987915B1 KR 101987915 B1 KR101987915 B1 KR 101987915B1 KR 1020170178745 A KR1020170178745 A KR 1020170178745A KR 20170178745 A KR20170178745 A KR 20170178745A KR 101987915 B1 KR101987915 B1 KR 101987915B1
- Authority
- KR
- South Korea
- Prior art keywords
- query
- natural language
- template
- unit
- resources
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
- G06F16/3329—Natural language query formulation or dialogue systems
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Artificial Intelligence (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
본 발명의 기술적 사상은 지식 베이스에 관한 것으로서, 자세하게는 자연어 질의로부터 지식 베이스에 대한 쿼리의 생성에 사용되는 템플릿을 생성하는 시스템 및 이를 포함하는 질의 응답 시스템에 관한 것이다.TECHNICAL FIELD The present invention relates to a knowledge base, and more particularly, to a system for generating a template used for generating a query from a natural language query to a knowledge base, and a query response system including the same.
본 발명은 과학기술정보통신부 SW컴퓨팅산업원천기술개발사업(SW)의 일환으로 (주)솔트룩스에서 주관하고 연구하여 수행된 연구로부터 도출된 것이다. [연구기간: 2017.03.01~2017.12.31, 연구관리 전문기관: 정보통신기술진흥센터, 연구과제명: WiseKB: 빅데이터 이해 기반 자가학습형 지식베이스 및 추론 기술 개발, 과제 고유번호: 2013-0-00109] The present invention is derived from research conducted and conducted by Saltlux Co., Ltd. as part of SW Technology Computing Industry Source Technology Development (SW) of Ministry of Science, Technology and Information. [Research period: 2017.03.01 ~ 2017.12.31] Research institute: Information and Communication Technology Promotion Center, Research title: WiseKB: Big data understanding based self-learning knowledge base and inference technology development, task number: 2013-0 -00109]
지식 데이터를 저장하고 저장된 지식 데이터를 제공하는 지식 베이스(knowledge base)가 구축될 수 있다. 지식 베이스에 포함된 지식들(또는 지식 데이터) 중 사용자가 원하는 지식을 제공하기 위하여, 지식 베이스는 쿼리(query)를 지원할 수 있다. 지식 베이스로부터 원하는 지식의 획득을 위하여, 전문가는 지식 베이스에 대한 적절한 쿼리를 직접 작성할 수 있는 반면, 비전문가로서 일반 사용자에게는 쿼리의 작성이 용이하지 아니할 수 있다. A knowledge base may be constructed that stores knowledge data and provides stored knowledge data. In order to provide the knowledge desired by the user among the knowledge (or knowledge data) included in the knowledge base, the knowledge base can support a query. In order to acquire the desired knowledge from the knowledge base, the expert can directly write an appropriate query to the knowledge base, while the non-expert can not easily write the query to the general user.
질의 응답 시스템은 지식 베이스에 기초하여 사용자의 질의에 대한 응답을 생성할 수 있다. 예를 들면, 질의 응답 시스템은 사용자로부터 수신된 자연어 질의에 따라 지식 베이스에 관련 지식을 검색함으로써 응답을 생성할 수 있다. 이와 같은 질의 응답 시스템에서, 자연어 질의로부터 생성되는 지식 베이스에 대한 쿼리가 질의 응답 시스템이 제공하는 응답의 품질을 좌우할 수 있다.The query response system can generate a response to the user's query based on the knowledge base. For example, the query response system can generate a response by searching the knowledge base for relevant knowledge according to the natural language query received from the user. In such a QA system, a query to a knowledge base generated from a natural language query can influence the quality of the response provided by the QA system.
본 발명의 기술적 사상은, 지식 베이스에 대한 쿼리를 자연어 질의로부터 생성하는데 사용되는 템플릿을 생성하는 시스템 및 방법을 제공한다.The technical idea of the present invention provides a system and method for generating a template used to generate a query for a knowledge base from a natural language query.
상기와 같은 목적을 달성하기 위하여, 본 발명의 기술적 사상에 따라 자연어 질의로부터 지식 베이스에 대한 쿼리의 생성을 위한 템플릿을 생성하는 시스템은, 자연어 인식 시스템에 자연어 질의를 전달함으로써 자연어 질의로부터 추출된 토큰들에 대응하는 온톨로지(ontology) 구성요소들을 각각 포함하는 리소스들을 획득하도록 구성된 자연어 질의 전처리부, 지식 데이터 단위들로 구성된 지식 베이스의 온톨로지 스키마(schema)에 기초하여 리소스들을 포함하는 그래프 데이터를 생성하고, 그래프 데이터로부터 적어도 하나의 지식 데이터 단위를 생성하도록 구성된 그래프 분석부, 및 적어도 하나의 지식 데이터 단위로부터 샘플 쿼리를 생성하고, 샘플 쿼리로부터 리소스들의 패턴에 대응하는 템플릿을 생성하도록 구성된 템플릿 생성부를 포함할 수 있다.According to an aspect of the present invention, there is provided a system for generating a template for generating a query from a natural language query to a knowledge base, the system comprising: A natural language query preprocessing unit configured to acquire resources each including resources corresponding to the ontology components of the knowledge base unit, graph data including resources based on the ontology schema of the knowledge base composed of knowledge data units A graphical analysis unit configured to generate at least one knowledge data unit from the graph data, and a template generation unit configured to generate a sample query from at least one knowledge data unit and generate a template corresponding to the pattern of resources from the sample query Could have.
본 발명의 예시적 실시예에 따라, 자연어 질의 전처리부는, 네트워크를 통해서 복수의 자연어 질의들을 수집하거나 질의 응답 시스템에 제공된 사용자의 자연어 질의들을 획득하도록 구성될 수 있다.According to an exemplary embodiment of the present invention, the natural language query preprocessor may be configured to collect a plurality of natural language queries through a network or to obtain user natural language queries provided to the query response system.
본 발명의 예시적 실시예에 따라, 자연어 질의 전처리부는, 질의 응답 시스템에 제공된 자연어 질의들 중 질의 응답 시스템에 의한 처리과정에서 템플릿에 매칭되지 아니한 자연어 질의를 획득하도록 구성될 수 있다.According to an exemplary embodiment of the present invention, the natural language query preprocessing unit can be configured to obtain a natural language query that is not matched to the template in the processing by the query response system among the natural language queries provided to the query response system.
본 발명의 예시적 실시예에 따라, 그래프 분석부는, 온톨로지 구성요소들 중 엔티티 또는 클래스를 포함하는 리소스로부터 노드를 생성하고 온톨로지 구성요소들 중 속성 및 관계를 포함하는 리소스로부터 에지를 생성함으로써 그래프 데이터를 생성하도록 구성된 그래프 생성부, 그래프 데이터에 포함된 노드들 및 에지들 각각을 선택적으로 제거함으로써 리소스들을 필터링하도록 구성된 리소스 필터링부, 및 필터링된 리소스들을 포함하는 그래프 데이터로부터 적어도 하나의 지식 데이터 단위를 생성하도록 구성된 지식 데이터 단위 생성부를 포함할 수 있다.According to an exemplary embodiment of the present invention, the graph analyzing unit generates a node from a resource including an entity or a class among ontology components and generates an edge from a resource including an attribute and a relation among the ontology components, A resource filtering unit configured to filter resources by selectively removing each of the nodes and edges included in the graph data, and at least one knowledge data unit from the graph data including the filtered resources, And a knowledge data unit generation unit configured to generate the knowledge data unit.
본 발명의 예시적 실시예에 따라, 리소스 필터링부는, 에지를 가지지 아니하는 노드 및 노드에 연결되지 아니한 일단을 가지는 에지 중 적어도 하나를 제거함으로써 리소스들을 필터링하도록 구성될 수 있다.According to an exemplary embodiment of the present invention, the resource filtering unit may be configured to filter resources by removing at least one of edges having no edge and nodes not connected to a node.
본 발명의 예시적 실시예에 따라, 리소스들 각각은 토큰 및 온톨로지 구성요소의 매칭 정도에 대응하는 가중치를 더 포함할 수 있고, 리소스 필터링부는, 노드들 및 에지들의 가중치들에 기초하여, 미리 정의된 기준치 이하의 합산된 가중치를 가지는 상호 연결된 노드 및 에지를 제거함으로써 리소스들을 필터링하도록 구성될 수 있다.According to an exemplary embodiment of the present invention, each of the resources may further include a weight corresponding to the degree of matching of the token and the ontology component, and the resource filtering unit may include a predefined And filtering the resources by removing interconnected nodes and edges having aggregated weights below the threshold.
본 발명의 예시적 실시예에 따라, 템플릿 생성부는, 지식 베이스의 지식 데이터에 기초하여 샘플 쿼리를 검증하도록 구성된 쿼리 검증부를 포함할 수 있다.According to an exemplary embodiment of the present invention, the template generation unit may include a query verification unit configured to verify a sample query based on knowledge base knowledge data.
본 발명의 예시적 실시예에 따라, 관리자 인터페이스를 더 포함할 수 있고, 쿼리 검증부는, 관리자 인터페이스를 통해서 자연어 질의 및 샘플 쿼리를 관리자에 제공하고, 관리자 인터페이스를 통해서 관리자로부터 샘플 쿼리의 적부(適否) 및 변경에 대한 정보를 수신하도록 구성될 수 있다.According to an exemplary embodiment of the present invention, the query verification unit may further include an administrator interface. The query verification unit may provide a natural language query and a sample query to an administrator through an administrator interface, ) And information about the change.
본 발명의 예시적 실시예에 따라, 템플릿 생성부는, 의해서 생성된 템플릿을, 질의 응답 시스템에 의해서 액세스되는 템플릿 저장소에 저장하도록 구성될 수 있다.According to an exemplary embodiment of the present invention, the template generator may be configured to store the template generated by the template store in a template repository accessed by the query response system.
본 발명의 예시적 실시예에 따라, 지식 데이터 단위는 트리플(triple)일 수 있고, 쿼리는 SPARQL(SPARQL Protocol and RDF Query Language)일 수 있다.According to an exemplary embodiment of the present invention, the knowledge data unit may be triple and the query may be SPARQL (SPARQL Protocol and RDF Query Language).
본 발명의 기술적 사상에 따른 시스템 및 방법에 의하면, 자연어 질의로부터 쿼리를 생성하기 위하여 사용되는 검증된 템플릿이 자동으로 생성될 수 있다.According to the system and method according to the technical idea of the present invention, a verified template used for generating a query from a natural language query can be automatically generated.
또한, 본 발명의 기술적 사상에 따른 시스템 및 방법에 의하면, 자동으로 생성되는 템플릿들에 기인하여, 용이하게 질의 응답 시스템이 구현될 수 있다.In addition, according to the system and method according to the technical idea of the present invention, a query response system can be easily implemented due to automatically generated templates.
또한, 본 발명의 기술적 사상에 따른 시스템 및 방법에 의하면, 자연어 질의들로부터 미리 생성된 템플릿들에 기인하여 다양한 자연어 질의에 신속하게 대응할 수 있는 질의 응답 시스템이 구현될 수 있다.In addition, according to the system and method according to the technical idea of the present invention, a query response system capable of quickly responding to various natural language queries due to templates generated beforehand from natural language queries can be implemented.
본 발명의 예시적 실시예들에서 얻을 수 있는 효과는 이상에서 언급한 효과들로 제한되지 아니하며, 언급되지 아니한 다른 효과들은 이하의 기재로부터 본 발명의 예시적 실시예들이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 도출되고 이해될 수 있다. 즉, 본 발명의 예시적 실시예들을 실시함에 따른 의도하지 아니한 효과들 역시 본 발명의 예시적 실시예들로부터 당해 기술분야의 통상의 지식을 가진 자에 의해 도출될 수 있다.The effects obtainable in the exemplary embodiments of the present invention are not limited to the above-mentioned effects, and other effects not mentioned can be obtained from the following description based on conventional knowledge in the art to which the exemplary embodiments of the present invention belong Can be clearly understood and understood. That is, unintended effects of implementing the exemplary embodiments of the present invention may also be derived from those of ordinary skill in the art from the exemplary embodiments of the present invention.
도 1은 본 발명의 예시적 실시예에 따른 템플릿 생성 시스템 및 그 입출력 관계를 나타내는 블록도이다.
도 2는 본 발명의 예시적 실시예에 따라 도 1의 템플릿 생성 시스템의 예시 및 그 입출력 관계를 나타내는 블록도이다.
도 3은 본 발명의 예시적 실시예에 따라 도 2의 그래프 분석부의 예시를 나타내는 블록도이다.
도 4a 및 도 4b는 본 발명의 예시적 실시예에 따른 온톨로지 스키마의 예시들을 나타내는 도면들이다.
도 5는 본 발명의 예시적 실시예에 따른 그래프데이터의 예시를 나타내는 도면이다.
도 6은 본 발명의 예시적 실시예에 따른 템플릿의 예시를 나타내는 도면이다.
도 7은 본 발명의 예시적 실시예에 따라 도 2의 템플릿 생성부의 예시를 나타내는 블록도이다.
도 8은 본 발명의 예시적 실시예에 따라 자연어 질의로부터 지식 베이스에 대한 쿼리의 생성에 사용되는 템플릿을 생성하는 방법을 나타내는 순서도이다.1 is a block diagram illustrating a template generation system and its input / output relationship according to an exemplary embodiment of the present invention.
Figure 2 is a block diagram illustrating an example of a template generation system of Figure 1 and its input / output relationship in accordance with an exemplary embodiment of the present invention.
Figure 3 is a block diagram illustrating an example of the graph analyzer of Figure 2 in accordance with an exemplary embodiment of the present invention.
Figures 4A and 4B are illustrations of examples of an ontology schema in accordance with an exemplary embodiment of the present invention.
5 is a diagram showing an example of graph data according to an exemplary embodiment of the present invention.
6 is a diagram illustrating an example of a template according to an exemplary embodiment of the present invention.
Figure 7 is a block diagram illustrating an example of the template generator of Figure 2 in accordance with an exemplary embodiment of the present invention.
8 is a flow diagram illustrating a method for generating a template for use in generating a query for a knowledge base from a natural language query in accordance with an exemplary embodiment of the present invention.
이하, 첨부한 도면을 참조하여 본 발명의 실시 예에 대해 상세히 설명한다. 본 발명의 실시 예는 당 업계에서 평균적인 지식을 가진 자에게 본 발명을 보다 완전하게 설명하기 위하여 제공되는 것이다. 본 발명은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 상세하게 설명하고자 한다. 그러나, 이는 본 발명을 특정한 개시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용한다. 첨부된 도면에 있어서, 구조물들의 치수는 본 발명의 명확성을 기하기 위하여 실제보다 확대하거나 축소하여 도시한 것이다.Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings. Embodiments of the present invention are provided to more fully describe the present invention to those skilled in the art. The present invention is capable of various modifications and various forms, and specific embodiments are illustrated and described in detail in the drawings. It should be understood, however, that the invention is not intended to be limited to the particular forms disclosed, but includes all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Like reference numerals are used for similar elements in describing each drawing. In the accompanying drawings, the dimensions of the structures are enlarged or reduced from the actual dimensions for the sake of clarity of the present invention.
본 출원에서 사용한 용어는 단지 특정한 실시 예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수개의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서 상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성 요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terminology used in this application is used only to describe a specific embodiment and is not intended to limit the invention. The singular expressions include plural expressions unless the context clearly indicates otherwise. In this application, the terms "comprises", "having", and the like are used to specify that a feature, a number, a step, an operation, an element, a part or a combination thereof is described in the specification, But do not preclude the presence or addition of one or more other features, integers, steps, operations, components, parts, or combinations thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 갖는다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가지는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 아니하는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in commonly used dictionaries should be construed to have meanings consistent with the meaning in the context of the relevant art and, unless expressly defined in this application, are to be interpreted in an ideal or overly formal sense It does not.
이하 도면 및 설명에서, 하나의 블록으로 표시 또는 설명되는 구성요소는 하드웨어 블록 또는 소프트웨어 블록일 수 있다. 예를 들면, 구성요소들 각각은 서로 신호를 주고 받는 독립적인 하드웨어 블록일 수도 있고, 또는 하나의 프로세서에서 실행되는 소프트웨어 블록일 수도 있다. 또한, 본 명세서에서 "시스템" 또는 "데이터베이스"는 적어도 하나의 프로세서 및 프로세서에 의해서 액세스되는 메모리를 포함하는 컴퓨팅 시스템을 지칭할 수 있다.In the drawings and the description below, the components indicated or described as one block may be a hardware block or a software block. For example, each of the components may be an independent hardware block that sends and receives signals to each other, or may be a software block that executes on one processor. Also, a "system" or "database" herein may refer to a computing system that includes at least one processor and memory accessed by the processor.
도 1은 본 발명의 예시적 실시예에 따른 템플릿 생성 시스템(100) 및 그 입출력 관계를 나타내는 블록도이다. 도 1에 도시된 바와 같이, 템플릿 생성 시스템(100)은 자연어 인식 시스템(500), 지식 베이스(700) 및 템플릿 데이터베이스(900)와 통신가능하게 연결될 수 있다. 또한, 질의 응답 시스템(300)은 사용자(20)로부터 질의, 예컨대 자연어 질의를 수신할 수 있고, 자연어 인식 시스템(500), 지식 베이스(700) 및 템플릿 데이터베이스(900)와 통신함으로써 사용자(20)의 질의에 대한 응답을 생성할 수 있다. 후술되는 바와 같이, 질의 응답 시스템(300)은 템플릿 데이터베이스(900)에 저장된 템플릿들을 참조하여 자연어 질의로부터 지식 베이스(700)에 대한 쿼리를 생성할 수 있고, 템플릿 생성 시스템(100)은 질의 응답 시스템(300)을 위한 템플릿들을 생성하여 템플릿 데이터베이스(900)에 공급할 수 있다.1 is a block diagram illustrating a
도 1에 도시된 블록들(100, 300, 500, 700, 900)은 네트워크를 통해서 상호 통신할 수도 있고, 일대일 통신을 위한 전용 채널을 통해서 상호 통신할 수도 있다. 또한, 도 1에 도시된 블록들(100, 300, 500, 700, 900) 중 2개 이상이 하나의 시스템(예컨대, 컴퓨팅 시스템)에 포함될 수도 있고, 일부 실시예들에서 템플릿 생성 시스템(100)은 질의 응답 시스템(300)에 포함될 수도 있다. The
질의 응답 시스템(300)은 사용자(20)로부터 자연어 질의를 수신할 수 있다. 예를 들면, 사용자(20)는 네트워크에 접속된 단말기를 사용할 수 있고, 단말기에 음성이나 텍스트를 통해서 자연어 질의를 입력할 수 있으며, 질의 응답 시스템(300)은 네트워크를 통해서 자연어 질의를 수신할 수 있다. 질의 응답 시스템(300)은 자연어 인식 시스템(500)으로 자연어 질의를 전달할 수 있고, 자연어 인식 시스템(500)으로부터 자연어 질의에 대한 정형 데이터를 수신할 수 있다. 후술되는 바와 같이, 자연어 질의에 대하여 자연어 인식 시스템(500)이 생성하는 정형 데이터는 질의 응답 시스템(300)뿐만 아니라 템플릿 생성 시스템(100)에 의해서도 사용될 수 있다.The
자연어 인식 시스템(500)은 NLU(Natural Language Understanding) 시스템으로 지칭될 수도 있고, 자연어 질의에 포함된 토큰들에 대응하는 온톨로지(ontology) 구성요소들을 각각 포함하는 리소스들로 구성된 정형 데이터를 생성할 수 있다. 온톨로지는 실존하거나 사람이 인식 가능한 것들을 컴퓨터에서 다룰 수 있는 형태로 표현한 것으로서, 온톨로지 구성요소들은 엔티티(entity; E)(또는 인스턴스(instance)), 클래스(class; C), 속성(property; P), 값(value; V)(또는 literal; L)을 포함할 수 있다. 추가적으로, 온톨로지 구성요소들은, 관계(relation)(엔티티간 속성 또는 클래스간 속성), 함수 텀(function term), 제한(restriction), 규칙(rule), 사건(event) 등을 더 포함할 수 있다. The natural
자연어 인식 시스템(500)은 자연어 질의로부터 추출된 토큰들을 포함하는 토큰 리스트를 생성할 수 있고, 토큰 리스트에 포함된 토큰들에 대응하는 리소스들을 생성할 수 있다. 예를 들면, "버락오바마의 아내의 나이는?"이라는 자연어 질의에 대하여, 자연어 인식 시스템(500)은 자연어 질의로부터 토큰들 "버락오바마", "의", "아내", "의", "나이", "는", "?"을 포함하는 토큰 리스트를 생성할 수 있다. 자연어 인식 시스템(500)은 지식 베이스(700)에 저장된 지식 데이터를 참조하여 토큰 "버락오바마"를 엔티티 "E{adr:0000148525, 4.18105395E9}"에 맵핑함으로써 토큰 "버락오바마"에 대한 리소스를 생성할 수 있다. 유사하게, 자연어 인식 시스템(500)은 "나이"를 속성 "P{adp:age, 3418252.2}"에 맵핑함으로써 토큰 "나이"에 대한 리소스를 생성할 수 있다. 자연어 인식 시스템(500)은, 예컨대 도 4b의 온톨로지 스키마에 따라, 토큰 "아내"에 대하여 "배우자"에 대응하는 속성 "P{adp:spouse, 5699.2476}"에 맵핑할 수 있다.The natural
전술된 엔티티 및 속성의 예시들에서 중괄호 안의 첫 번째 항목은 엔티티 및 속성의 URI(Uniform Resource Identifier)를 나타낼 수 있고, 두 번째 항목은, 후술되는 바와 같이, 엔티티 및 속성(또는 리소스)의 가중치를 나타낼 수 있다. 또한, 일부 실시예들에서, 자연어 인식 시스템(500)은, "의" 및 "는"과 같은 조사는 리소스 생성시 제외할 수 있다. 본 명세서에서, 리소스는 위와 같이 온톨로지의 단일 구성요소를 포함하는 단위로서 지칭할 수도 있고, 자연어 질의로부터 생성된 토큰 리스트와 같이 복수의 토큰들에 대응하는 리소스들의 집합을 지칭할 수도 있다.In the examples of the entities and attributes described above, the first item in the braces may represent a Uniform Resource Identifier (URI) of the entity and attribute, and the second item may be a weight of the entity and attribute (or resource) . In addition, in some embodiments, the natural
동일한 토큰 리스트에 대하여 상이한 리소스들이 생성될 수도 있고, 상이한 토큰들을 포함하는 토큰 리스트들 각각에 대하여 리소스들이 생성될 수도 있다. 자연어 인식 시스템(500)은 자연어 질의에 포함된 토큰을 온톨로지 구성요소에 맵핑하는 과정에서 지식 베이스(700)에 저장된 지식 데이터를 참조할 수 있고, 토큰을 지식 데이터에 정의된 온톨로지 구성요소에 맵핑함으로써 리소스를 생성할 수 있다.Different resources may be created for the same token list, and resources may be created for each of the token lists containing different tokens. The natural
일부 실시예들에서, 자연어 인식 시스템(500)은 리소스들에 대하여 가중치를 부여할 수 있다. 예를 들면, 하나의 토큰에 대하여 복수의 온톨로지 구성요소들이 대응할 수 있고, 자연어 인식 시스템(500)은 복수의 온톨로지 구성요소들 각각에 대하여 온톨로지 구성요소의 중요도(예컨대, 엔티티의 링크 카운트 등) 및/또는 다른 온톨로지 구성요소와의 관계에 기초하여 가중치를 가질 수 있다. 이에 따라, 가중치는 자연어 질의에서, 토큰과 온톨로지 구성요소 사이 매칭 정도를 나타내는 값을 가질 수 있다. 리소스들의 가중치들은 질의 응답 시스템(300)에 의해서 리소스들의 랭킹을 결정하는데 사용될 수도 있고, 후술되는 바와 같이, 템플릿 생성 시스템(100)에서 리소스들을 필터링하는데 사용될 수도 있다.In some embodiments, the natural
질의 응답 시스템(300)은 정형 데이터에 기초하여 템플릿 데이터베이스(900)에 저장된 템플릿을 검색할 수 있고, 정형 데이터에 대응하는 템플릿에 따라 쿼리를 생성할 수 있다. 일부 실시예들에서, 지식 베이스(700)는 RDF(Resource Description Framework)를 사용하여 표현된 지식 데이터를 포함할 수 있고, 지식 데이터 단위로서 트리플(triple)이 사용될 수 있다. 이에 따라, 질의 응답 시스템(300)은 지식 베이스(700)에 대한 쿼리로서 SPARQL(SPARQL Protocol and RDF Query Language) 쿼리를 생성할 수 있다. 이하에서, 본 발명의 예시적 실시예들은 SPARQL을 주로 참조하여 설명될 것이나, 본 발명의 예시적 실시예들이 이에 제한되지 아니하는 점은 이해될 것이다. 질의 응답 시스템(300)은 생성된 쿼리를 지식 베이스(700)에 제공함으로써, 지식 베이스(700)에 포함된(또는 저장된) 지식(또는 지식 데이터)을 획득할 수 있고, 획득된 지식에 기초하여 자연어 질의에 대한 응답을 생성할 수 있다. 최종적으로, 질의 응답 시스템(300)은 응답을 사용자(20)의 단말기에 제공할 수 있다.The
질의 응답 시스템(300)이 쿼리 생성시 참조하는 템플릿은, 도 6에 예시되는 바와 같이, 자연어 인식 시스템(500)이 제공하는 정형 데이터의 리소스들의 패턴 및 이에 대응하는 SPARQL 템플릿으로 구성될 수 있고, 템플릿 데이터베이스(900)는 복수의 템플릿들을 저장할 수 있다. 이에 따라, 템플릿 데이터베이스(900)에 저장된 템플릿의 양이 증가할수록 질의 응답 시스템(300)에 의해서 처리 가능한 자연어 질의가 증가할 수 있는 한편, 템플릿의 정확도에 따라 자연어 질의에 대한 응답의 정확도가 좌우될 수 있다.The template that the Q &
템플릿 생성 시스템(100)은 자연어 질의를 획득할 수 있고, 자연어 질의로부터 템플릿을 생성할 수 있으며, 생성된 템플릿을 템플릿 데이터베이스(900)에 저장할 수 있다. 템플릿 생성 시스템(100)은 질의 응답 시스템(300)으로 사용자(20)에 의해서 제공될 수 있는 것과 동종으로서 자연어 질의를 템플릿 생성을 위한 입력으로 사용함으로써 유효한 템플릿을 생성할 수 있다. 템플릿 생성 시스템(100)은 자연어 질의로부터 템플릿을 생성하는 과정에서, 자연어 인식 시스템(500)에 제공하는 리소스들, 지식 베이스(700)의 구축에 사용되는 온톨로지 스키마, 지식 베이스(700)에 저장된 지식 데이터 등을 사용할 수 있다. The
도면들을 참조하여 후술되는 바와 같이, 템플릿 생성 시스템(100)은 질의 응답 시스템(300)이 자연어 질의로부터 쿼리를 생성하는데 사용되는 템플릿을 검증함으로써 검증된 템플릿을 자동으로 생성할 수 있다. 또한, 템플릿 생성 시스템(100)은 템플릿들을 템플릿 데이터베이스(900)에 공급함으로써 질의 응답 시스템(300)의 구현을 용이하게 할 수 있다. 또한, 템플릿 생성 시스템(100)에 의해서 미리 생성된 템플릿들에 기인하여 다양한 자연어 질의에 신속하게 대응 가능한 질의 응답 시스템(300)이 구현될 수 있다. 이하에서 도면들을 참조하여 템플릿 생성 시스템(100)의 예시들이 설명될 것이다.As described below with reference to the drawings, the
도 2는 본 발명의 예시적 실시예에 따라 도 1의 템플릿 생성 시스템(100)의 예시 및 그 입출력 관계를 나타내는 블록도이다. 도 1을 참조하여 전술된 바와 같이, 도 2의 템플릿 생성 시스템(100')은 자연어 질의로부터 템플릿을 생성할 수 있다. 도 2에 도시된 바와 같이, 템플릿 생성 시스템(100')은 질의 전처리부(120), 그래프 분석부(140) 및 템플릿 생성부(160)를 포함할 수 있고, 이하에서 도 2는 도 1을 참조하여 설명될 것이다.2 is a block diagram illustrating an example of the
질의 전처리부(120)는 자연어 질의를 획득할 수 있고, 자연어 질의를 자연어 인식 시스템(500')에 제공함으로써 자연어 인식 시스템(500')으로부터 자연어 질의에 대한 정형 데이터, 즉 리소스들을 획득할 수 있다. 질의 전처리부(120)는 다양한 방식으로 자연어 질의를 획득할 수 있다. 일부 실시예들에서, 질의 전처리부(120)는 인터넷과 같은 네트워크를 통해서 자연어 질의를 수집할 수 있다. 일부 실시예들에서, 질의 전처리부(120)는, 도 7을 참조하여 후술되는 바와 같이, 관리자로부터 템플릿 생성을 위한 샘플로서 자연어 질의를 수신할 수 있다. 일부 실시예들에서, 질의 전처리부(120)는, 질의 응답 시스템(300)과의 연결을 위하여 템플릿 생성 시스템(100')에 포함된 인터페이스(미도시)를 통해서 사용자(20)가 질의 응답 시스템(300)에 제공한 자연어 질의를 획득할 수 있다. 일부 실시예들에서, 질의 전처리부(120)는 질의 응답 시스템(300)과 통신을 통해서 사용자(20)가 제공한 자연어 질의들 중 매칭되는 템플릿을 가지지 아니하는 자연어 질의를 획득할 수 있다. 질의 전처리부(120)는 자연어 인식 시스템(500)으로 자연어 질의를 제공할 수 있고, 자연어 인식 시스템(500)으로부터 자연어 질의에 대한 정형 데이터를 수신할 수 있다. 질의 전처리부(120)는 자연어 질의에 대한 정형 데이터를 그래프 분석부(140)에 제공할 수 있다.The
그래프 분석부(140)는 질의 전처리부(120)로부터 수신된 정형 데이터로부터 그래프 데이터를 생성할 수 있고, 그래프 데이터로부터 적어도 하나의 지식 데이터 단위를 생성할 수 있다. 그래프 분석부(140)는 지식 베이스(700)의 온톨로지 스키마(schema)(D20)에 기초하여 그래프 데이터를 생성할 수 있다. 온톨로지 스키마(D20)는 지식 베이스(700)의 구축에 사용된 데이터로서, 도 4a 및 도 4b를 참조하여 후술되는 바와 같이, 온톨로지 구성요소들 및 그것들의 관계를 정의한다. 그래프 데이터는 정형 데이터에 포함된 리소스들을 노드 및/또는 에지로서 포함하는 그래프를 정의할 수 있다. The
그래프 분석부(140)는 그래프 데이터에 포함된 리소스들을 필터링할 수 있고, 필터링된 그래프에서 적어도 하나의 지식 데이터 단위를 생성할 수 있다. 지식 데이터 단위는 지식 베이스(700)의 데이터 단위로서, 트리플(triple)일 수 있다. 트리플은 주체(subject), 술어(predicate) 및 대상(object)을 포함할 수 있고, 트리플의 주체, 술어 및 대상은 온톨로지 구성요소들, 예컨대 엔티티, 속성, 클래스에 대응할 수 있다. 지식 베이스(700)는 지식 데이터에 대응하는 복수의 트리플들을 저장할 수 있고, SPARQL 쿼리에 응답하여 트리플을 검색함으로써 트리플에 포함된 온톨로지 구성요소를 결과로서 제공할 수 있다. 그래프 분석부(140)는 적어도 하나의 트리플을 템플릿 생성부(160)에 제공할 수 있다. 그래프 분석부(140)의 동작의 예시는 도 3 내지 도 5를 참조하여 후술될 것이다.The
템플릿 생성부(160)는 그래프 분석부(140)로부터 적어도 하나의 트리플을 수신할 수 있고, 적어도 하나의 트리플로부터 샘플 쿼리를 생성할 수 있다. 예를 들면, 템플릿 생성부(160)는 SPARQL 문법에 기초하여 샘플 쿼리를 생성할 수 있다. 샘플 쿼리는 그래프 분석부(140)로부터 수신된 트리플에 포함된 온톨로지 구성요소를 포함할 수 있다. 또한, 일부 실시예들에서 템플릿 생성부(160)는, 도 6을 참조하여 후술되는 바와 같이, 샘플 쿼리를 검증할 수 있다.The
템플릿 생성부(160)는 샘플 쿼리로부터 템플릿을 생성할 수 있다. 예를 들면, 템플릿 생성부(160)는 질의 전처리부(120)로부터 제공된 리소스들의 패턴에 대응하는 템플릿을 생성할 수 있다. 도 6을 참조하여 후술되는 바와 같이, 템플릿 생성부(160)는 샘플 쿼리에서 리소스에 대응하는 값을 가지는 온톨로지 구성요소를, 온톨로지 구성요소의 유형을 가지는 변수로 대체함으로써 템플릿을 생성할 수 있다. 템플릿 생성부(160)는 템플릿을 템플릿 데이터베이스(900')에 저장할 수 있다.The
도 3은 본 발명의 예시적 실시예에 따라 도 2의 그래프 분석부(140)의 예시를 나타내는 블록도이고, 도 4a 및 도 4b는 본 발명의 예시적 실시예에 따른 온톨로지 스키마의 예시들을 나타내는 도면들이고, 도 5는 본 발명의 예시적 실시예에 따른 그래프 데이터의 예시를 나타내는 도면이다.FIG. 3 is a block diagram illustrating an example of the
도 3을 참조하면, 도 3의 그래프 분석부(140')는, 도 2를 참조하여 전술된 바와 같이, 도 2의 질의 전처리부(120)로부터 정형 데이터로서 리소스들을 수신할 수 있고, 적어도 하나의 지식 데이터 단위, 즉 적어도 하나의 트리플을 생성하여 도 2의 템플릿 생성부(160)에 제공할 수 있다. 그래프 분석부(140')는 그래프 생성부(142), 리소스 필터링부(144) 및 지식 데이터 단위 생성부(146)를 포함할 수 있고, 온톨로지 스키마(D20)를 참조할 수 있다.Referring to FIG. 3, the graph analyzing unit 140 'of FIG. 3 may receive resources as formatted data from the
그래프 생성부(142)는 온톨로지 스키마(D20)를 참조하여 리소스들을 노드 및/또는 에지로서 포함하는 그래프 데이터를 생성할 수 있다. 전술된 바와 같이, 온톨로지 스키마(D20)는 도 1의 지식 베이스(700)를 구축하는데 사용된 데이터로서, 온톨로지 구성요소들 및 그것들의 관계를 정의할 수 있다. 예를 들면, 도 4a는 온톨로지 구성요소들 사이 관계를 정의하는 온톨로지 스키마(D20)의 예시를 나타내고, 도 4b는 동종의 온톨로지 구성요소들 사이 계층 정보를 정의하는 온톨로지 스키마(D20)의 예시를 나타낸다.The
도 4a를 참조하면, 온톨로지 스키마(D20)는 온톨로지 구성요소들 사이 관계를 정의할 수 있다. 즉, 클래스 "사람"은, "이름", "생일" 등과 같이 다수의 속성들을 가질 수 있고, 속성들 각각은 온톨로지 구성요소, 예컨대 클래스, 값과 연결될 수 있다. 이에 따라, 클래스 "사람"에 속하는 엔티티, 예컨대 엔티티 "버락오바마"는 속성들로서 "이름", "생일", "출생지", "직업", "배우자", "나이"등을 가질 수 있다. 도 4a의 온톨로지 스키마에 기초하여 구축된 도 1의 지식 베이스(700)는 엔티티 "버락오바마"가 가지는 속성들에 대응하는 다른 엔티티 및/또는 값을 정의하는 지식 데이터 단위, 즉 트리플을 가질 수 있다. 지식 베이스(700)는 지속적으로 갱신될 수 있고, 예컨대 엔티티의 속성에 대응하는 엔티티 또는 값이 부재하는 경우, 다양한 방식으로 엔티티 또는 값을 획득하여 저장할 수 있다.Referring to FIG. 4A, an ontology schema D20 may define a relationship between ontology components. That is, the class "person" may have a number of attributes such as "name "," birthday ", etc., and each of the attributes may be associated with an ontology component, e.g., class, value. Accordingly, entities belonging to the class "person ", such as entity" Barack Obama ", may have properties such as "name "," birthday ", "birthplace ", & The
도 4b를 참조하면, 온톨로지 스키마(D20)는 동종의 온톨로지 구성요소들 사이 계층 정보를 정의할 수 있다. 온톨로지 구성요소, 예컨대 클래스, 속성 등은 그 의미에 따라 계층적인 구조를 가질 수 있다. 도 4b에 도시된 바와 같이, 우측 열에 포함된 속성/클래스는 좌측 열에 포함된 속성/클래스의 상위 레벨의 속성/클래스일 수 있다. 상위 레벨의 속성/클래스는 하위 레벨의 속성/클래스의 의미를 포함하는 의미를 가질 수 있다. 예를 들면, 속성 "남편"은 속성 "배우자"를 상위 레벨의 속성으로서 가질 수 있고, 속성 "아내"는 속성 "배우자"를 상위 레벨의 속성으로 가질 수 있다. 유사하게, 클래스 "대통령"은 클래스 "정치인"을 상위 레벨의 클래스로서 가질 수 있다.Referring to FIG. 4B, the ontology schema D20 can define hierarchical information between ontology elements of the same type. The ontology components, such as classes, attributes, etc., may have a hierarchical structure depending on their meaning. As shown in FIG. 4B, the attribute / class included in the right column may be a property / class of the attribute / class of the upper level included in the left column. A higher level attribute / class may have a meaning that includes the meaning of a lower level attribute / class. For example, the attribute "husband" may have the property "spouse" as a property of a higher level, and the property "wife" Similarly, the class "President" can have the class "politician" as a high-level class.
도 5를 참조하면, 도 3의 그래프 생성부(142)는 자연어 질의 "버락오바마의 아내의 나이는?"으로부터 생성된 리소스들로부터 그래프 데이터를 생성할 수 있고, 도 5는 그래프 데이터에 의해서 정의된 일부의 그래프(G50)를 도시한다. 그래프 생성부(142)는 엔티티 "버락오바마"에 대응하는 노드(N51)를 생성할 수 있다. 엔티티 "버락오바마"는 클래스 "사람"에 속할 수 있고, 그래프 생성부(142)는 도 4a의 온톨로지 스키마를 참조하여, 엔티티 "버락오바마"의 속성들, "출생지", "나이", "생일", "배우자" 등에 대응하는, 노드(N51)로부터 출발하는 에지들을 생성할 수 있다. 도 5에 도시된 바와 같이, 속성 "배우자"에 대응하는 에지는 양방향 에지일 수 있다.Referring to FIG. 5, the
그래프 생성부(142)는 도 4a의 온톨로지 스키마를 참조하여, 에지들의 타단에 연결되는 노드들(N52, N53, N54, N55)을 생성할 수 있고, 생성된 노드들(N52, N53, N54, N55)은 속성에 따른 유형을 가질 수 있다. 예를 들면, 도 5에 도시된 바와 같이, 속성 "나이"에 연결된 노드(N54)는 값 "숫자"에 대응할 수 있고, 속성 "출생지"에 연결된 노드(N53)는 클래스 "장소"에 대응할 수 있고, 속성 "생일"에 연결된 노드(N54)는 값 "날짜"에 대응할 수 있다. 또한, 속성 "배우자"에 연결된 노드(N55)는 클래스 "사람"에 대응할 수 있다. 그래프 생성부(142)는 자연어 질의에 포함된 토큰 "아내"로부터 생성된 속성 "배우자"에 따라, 속성 "배우자"로 연결된 노드(N55)에 대한 속성들을 추가적으로 고려할 수 있다. 이에 따라, 비록 도시되지 아니하였으나, 노드(N55)에 대해서도 노드(N51)와 유사하게 다수의 속성들에 대응하는 다수의 에지들이 생성될 수 있다.The
도 3을 다시 참조하면, 리소스 필터링부(144)는 그래프 생성부(142)로부터 그래프 데이터를 수신할 수 있고, 그래프 데이터에서 리소스들을 필터링할 수 있다. 일부 실시예들에서, 리소스 필터링부(144)는 그래프 데이터의 구조에 기초하여 리소스들을 필터링할 수 있다. 예를 들면, 리소스 필터링부(144)는 에지를 가지지 아니하는 노드, 노드에 연결되지 아니한 일단을 가지는 에지와 같이 불완전한 그래프를 형성하는 리소스들을 제거할 수 있다. 또한, 일부 실시예들에서, 리소스 필터링부(144)는 에지로 상호 연결되지 아니한 노드들의 2이상의 그룹들이 존재하는 경우, 노드들의 개수가 상대적으로 적은 그룹을 제거할 수도 있다. 일부 실시예들에서, 리소스 필터링부(144)는 리소스의 가중치에 기초하여 리소스들을 필터링할 수 있다. 리소스 필터링부(144)는 그래프 데이터에서, 미리 정의된 기준치 이하의 합산된 가중치를 가지는 상호 연결된 노드 및 에지를 제거할 수 있다. 도 1을 참조하여 전술된 바와 같이, 자연어 인식 시스템(500)은 리소스로서, 토큰에 대응하는 온톨로지 구성요소와 함께 토큰과 온톨로지 구성요소의 매칭 정도를 나타내는 가중치를 제공할 수 있고, 리소스 필터링부(144)는 리소스에 포함된 가중치에 기초하여 그래프 데이터에서 리소스들을 필터링할 수 있다. 이에 따라, 도 5에서 음영으로 도시된 바와 같이, 그래프 생성부(142)는 그래프(G50)에서 일부 노드들(N52, N53, N54)을 제거함으로써, 노드들(N51, N55, N56) 및 노드들(N51, N55, N56)에 연결된 에지들을 추출할 수 있다. 리소스 필터링부(144)는 필터링된 리소스들을 포함하는 그래프 데이터를 지식 데이터 단위 생성부(146)에 제공할 수 있다.Referring again to FIG. 3, the
지식 데이터 단위 생성부(146)는 리소스 필터링부(144)로부터 필터링된 리소스들을 포함하는 그래프 데이터를 수신할 수 있고, 수신된 그래프 데이터로부터 적어도 하나의 지식 데이터 단위를 생성할 수 있다. 예를 들면, 지식 데이터 단위 생성부(146)는 도 5에서 음영 처리된 노드들(N51, N55, N56) 및 노드들(N51, N55, N56)에 연결된 에지들을 포함하는 그래프 데이터를 수신할 수 있고, 그래프 데이터로부터 2개의 지식 데이터 단위들을 생성할 수 있다. 즉, 2개의 트리플들 "E: 버락오바마 ? 배우자 ? C: 사람" 및 "C: 사람 ? 나이 ? V: 숫자"이 생성될 수 있다. 지식 데이터 단위 생성부(146)에 의해서 생성된 트리플은 도 2의 템플릿 생성부(160)에 제공될 수 있다.The knowledge data
도 6은 본 발명의 예시적 실시예에 따른 템플릿의 예시를 나타내는 도면이다. 구체적으로, 도 6은 온톨로지 구성요소들의 복수의 패턴들 및 그에 대응하는 복수의 SPARQL 템플릿들을 나타낸다.6 is a diagram illustrating an example of a template according to an exemplary embodiment of the present invention. Specifically, Figure 6 shows a plurality of patterns of ontology components and a corresponding plurality of SPARQL templates.
도 2를 참조하여 전술된 바와 같이, 템플릿 생성부(160)는 그래프 분석부(140)(또는 도 3의 지식 데이터 단위 생성부(146))로부터 수신된 적어도 하나의 지식 데이터 단위로부터 샘플 쿼리를 생성할 수 있다. 예를 들면, 도 5의 예시에 따라, 템플릿 생성부(160)가 2개의 트리플들 "E: 버락오바마 ? 배우자 ? C: 사람" 및 "C: 사람 ? 나이 ? V: 숫자"을 수신한 경우, 템플릿 생성부(160)는 아래와 같은 SPARQL 쿼리를 샘플 쿼리로서 생성할 수 있다.2, the
SELECT ?X {SELECT? X {
adr:0000148525 adp:spouse ?Yadr: 0000148525 adp: spouse? Y
?Y adp:age ?X? Y adp: age? X
}}
위 샘플 쿼리에서, "adr:0000148525"는 엔티티 "버락오바마"의 URI를 나타내고, "adp:spouse"는 속성 "배우자"의 URI를 나타내고, "adp:age"는 속성 "나이"의 URI를 나타낼 수 있다. 이에 따라, 엔티티 "버락오바마"와 속성 "배우자" 관계를 가지는 엔티티 "Y"가 검색될 수 있고, 엔티티 "Y"와 속성 "나이" 관계를 가지는 값 "X"가 검색될 수 있다.In the above sample query, "adr: 0000148525" represents the URI of the entity "Barack Obama", "adp: spouse" represents the URI of the property "spouse", and "adp: age" represents the URI of the property "age" . Accordingly, an entity "Y " having an attribute " Barack Obama " and an attribute" Spouse "can be retrieved and a value" X "
템플릿 생성부(160)는 샘플 쿼리로부터 템플릿을 생성할 수 있다. 예를 들면, "버락오바마의 아내의 나이는?"로부터 추출된 토큰들은 엔티티 "버락오바마", 속성 "배우자", 속성 "나이"로 구성되고, 2개의 속성들을 각각 "P1", "P2"로 표기할 때, 상기 자연어 질의의 온톨로지 구성요소들의 패턴은 "EP1P2"와 같이 표기될 수 있다. 자연어 질의 "버락오바마의 아내의 나이는?"으로부터 전술된 예시의 샘플 쿼리가 생성될 수 있고, 템플릿 생성부(160)는 샘플 쿼리에서 리소스에 대응하는 값을 가지는 온톨로지 구성요소를, 온톨로지 구성요소의 유형을 가지는 변수로 대체함으로써 템플릿을 생성할 수 있다. "%"로 시작해서 "%"로 끝나는 부분을 변수로 정의할 때, 패턴 "EP1P2"에 대응하는 SPARQL 템플릿이 도 6에 도시된 바와 같이 생성될 수 있다. 도 6에 도시된 템플릿들은 도 1의 템플릿 데이터베이스(900)에 저장될 수 있고, 자연어 질의에 대응하는 온톨로지 구성요소들의 패턴을 가지고 있는 질의 응답 시스템(300)에 의해서 참조될 수 있다.The
도 7은 본 발명의 예시적 실시예에 따라 도 2의 템플릿 생성부(160)의 예시를 나타내는 블록도이다. 구체적으로, 도 7의 템플릿 생성부(160')는 샘플 쿼리를 검증할 수 있고, 검증된 샘플 쿼리로부터 템플릿을 생성할 수 있다. 이를 위하여, 도 7에 도시된 바와 같이, 템플릿 생성부(160')는 쿼리 검증부(162)를 포함할 수 있다.FIG. 7 is a block diagram illustrating an example of the
일부 실시예들에서, 쿼리 검증부(162)는 지식 베이스(700')에 저장된 지식 데이터에 기초하여 샘플 쿼리를 검증할 수 있다. 즉, 쿼리 검증부(162)는 샘플 쿼리를 지식 베이스(700')에 제공하고, 지식 베이스(700')가 샘플 쿼리에 응답하여 제공하는 결과에 기초하여 샘플 쿼리를 검증할 수 있다. 예를 들면, 샘플 쿼리에 대하여 지식 베이스(700')에서 오류가 발생하는 경우 샘플 쿼리는 검증에 실패할 수 있는 한편, 샘플 쿼리에 대하여 지식 베이스(700')가 정상적인 응답을 제공하는 경우 샘플 쿼리는 검증에 성공할 수 있다.In some embodiments, the
일부 실시예들에서, 쿼리 검증부(162)는 관리자(30)에 의해서 검증될 수 있다. 이를 위하여, 도 7에 도시된 바와 같이, 템플릿 생성 시스템은 관리자 인터페이스(180)를 더 포함할 수 있다. 관리자 인터페이스(180)는 쿼리 검증부(162)로부터 수신한 샘플 쿼리(또는 샘플 쿼리로부터 생성된 템플릿)를 관리자(30)에 제공할 수 있고, 관리자(30)로부터 샘플 쿼리에 대한 피드백을 수신하여 쿼리 검증부(162)에 제공할 수 있다. 예를 들면, 관리자 인터페이스(180)는 관리자(30)로부터 샘플 쿼리의 적부(適否) 및/또는 변경에 대한 정보를 수신할 수 있고, 수신된 정보를 쿼리 검증부(162)에 제공할 수 있다. 쿼리 검증부(162)는 샘플 쿼리의 적부에 대한 정보에 따라 샘플 쿼리의 검증의 성공 여부를 판단할 수 있고, 또는 샘플 쿼리의 변경에 대한 정보에 따라 샘플 쿼리를 수정할 수 있다. 일부 실시예들에서, 관리자 인터페이스(180)는 관리자(30)로부터 템플릿 생성을 위한 자연어 질의(또는 샘플 자연어 질의)를 수신할 수도 있다. In some embodiments, the
도 8은 본 발명의 예시적 실시예에 따라 자연어 질의로부터 지식 베이스에 대한 쿼리의 생성에 사용되는 템플릿을 생성하는 방법을 나타내는 순서도이다. 도 8에 도시된 바와 같이, 도 8의 방법은 복수의 단계들(S10, S30, S50, S70, S90)을 포함할 수 있고, 온톨로지 스키마(D20)가 사용될 수 있다. 일부 실시예들에서, 도 8의 방법은 도 2의 템플릿 생성 시스템(100')에 의해서 수행될 수 있고, 이하에서 도 8은 도 2를 참조하여 설명될 것이다.8 is a flow diagram illustrating a method for generating a template for use in generating a query for a knowledge base from a natural language query in accordance with an exemplary embodiment of the present invention. 8, the method of FIG. 8 may include a plurality of steps S10, S30, S50, S70, S90, and an ontology schema D20 may be used. In some embodiments, the method of FIG. 8 may be performed by the template generation system 100 'of FIG. 2, and hereinafter, FIG. 8 will be described with reference to FIG.
단계 S10에서, 자연어 질의로부터 생성된 리소스들을 획득하는 동작이 수행될 수 있다. 예를 들면, 질의 전처리부(120)는 다양한 방식으로 자연어 질의를 획득할 수 있고, 획득된 자연어 질의를 자연어 인식 시스템(500')에 제공함으로써 자연어 인식 시스템(500')으로부터 리소스들을 획득할 수 있다. 리소스는 자연어 질의에 포함된 토큰에 대응하는 온톨로지 구성요소(예컨대, 엔티티, 속성, 클래스 등)를 포함할 수 있고, 토큰과 온톨로지 구성요소 사이 매칭 정도를 나타내는 가중치를 더 포함할 수도 있다.In step S10, an operation of obtaining the resources generated from the natural language query can be performed. For example, the
단계 S30에서, 온톨로지 스키마(D20)를 참조하여 그래프 데이터를 생성하는 동작이 수행될 수 있다. 온톨로지 스키마(D20)는 질의 응답 시스템(예컨대, 도 1의 300)이 참조하는 지식 베이스(예컨대, 도 1의 700)를 구축(또는 갱신)하는데 사용되는 데이터로서, 온톨로지 구성요소들 및 그것들의 관계를 정의할 수 있다. 예를 들면, 그래프 분석부(140)는 온톨로지 스키마(D20)를 참조하여 리소스들에 포함된 온톨로지 구성요소들을 노드 또는 에지로서 포함하는 그래프 데이터를 생성할 수 있다. 추가적으로, 그래프 분석부(140)는 그래프 데이터에서 그래프 데이터의 구조 및/또는 노드와 에지의 가중치들에 기초하여 리소스들을 필터링할 수 있고, 리소스들이 필터링된 그래프 데이터를 생성할 수 있다.In step S30, an operation of generating graph data by referring to the ontology schema D20 may be performed. The ontology schema D20 is data used to build (or update) a knowledge base (e.g., 700 in FIG. 1) referenced by a query response system (e.g., 300 in FIG. 1) Can be defined. For example, the
단계 S50에서, 지식 데이터 단위를 생성하는 동작이 수행될 수 있다. 예를 들면, 지식 데이터 단위는 트리플일 수 있고, 그래프 분석부(140)는 리소스들이 필터링된 그래프 데이터에서 적어도 하나의 트리플을 생성할 수 있다. 예를 들면, 트리플은 2개의 노드들 및 2개의 노드들을 연결하는 에지로부터 생성될 수 있다.In step S50, an operation of generating a knowledge data unit may be performed. For example, the knowledge data unit may be triple, and the
단계 S70에서, 샘플 쿼리를 생성하는 동작이 수행될 수 있다. 예를 들면, 템플릿 생성부(160)는 그래프 분석부(140)로부터 수신된 적어도 하나의 트리플로부터 샘플 쿼리를 생성할 수 있다. 샘플 쿼리는 트리플에 포함된 온톨로지 구성요소의 URI를 포함할 수 있다. 일부 실시예들에서, 샘플 쿼리는 검증될 수 있고, 예컨대 지식 베이스 및/또는 관리자를 통해서 검증될 수 있고, 템플릿 생성 시스템(100')은 검증을 위한 구성요소를 더 포함할 수 있다.In step S70, an operation of generating a sample query can be performed. For example, the
단계 S90에서, 템플릿을 생성하는 동작이 수행될 수 있다. 예를 들면, 템플릿 생성부(160)는 자연어 질의에 대응하는 온톨로지 구성요소들의 패턴을 획득할 수 있고, 샘플 쿼리에서 리소스에 대응하는 값을 가지는 온톨로지 구성요소를, 온톨로지 구성요소의 유형을 가지는 변수로 대체함으로써, 패턴에 대응하는 템플릿을 생성할 수 있다. 생성된 템플릿은 템플릿 데이터베이스(900')에 패턴과 함께 저장될 수 있고, 질의 응답 시스템(예컨대, 도 1의 300)에 의해서 자연어 질의에 따라 쿼리 생성시 사용될 수 있다.In step S90, an operation of generating a template may be performed. For example, the
이상에서와 같이 도면과 명세서에서 예시적인 실시예들이 개시되었다. 본 명세서에서 특정한 용어를 사용하여 실시예들을 설명되었으나, 이는 단지 본 발명의 기술적 사상을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.As described above, exemplary embodiments have been disclosed in the drawings and specification. While the embodiments have been described herein with reference to specific terms, it should be understood that they have been used only for purposes of describing the technical idea of the invention and not for limiting the scope of the invention as defined in the claims . Therefore, those skilled in the art will appreciate that various modifications and equivalent embodiments are possible without departing from the scope of the present invention. Accordingly, the true scope of the present invention should be determined by the technical idea of the appended claims.
Claims (10)
자연어 인식 시스템에 자연어 질의를 전달함으로써 상기 자연어 질의로부터 추출된 토큰들에 대응하는 온톨로지(ontology) 구성요소들을 각각 포함하는 리소스들을 획득하도록 구성된 자연어 질의 전처리부;
지식 데이터 단위들로 구성된 상기 지식 베이스의 온톨로지 스키마(schema)에 기초하여 상기 리소스들을 포함하는 그래프 데이터를 생성하고, 상기 그래프 데이터로부터 적어도 하나의 지식 데이터 단위를 생성하도록 구성된 그래프 분석부; 및
상기 적어도 하나의 지식 데이터 단위로부터 샘플 쿼리를 생성하고, 상기 샘플 쿼리로부터 상기 리소스들의 패턴에 대응하는 템플릿을 생성하도록 구성된 템플릿 생성부를 포함하는 시스템.A system for generating a template for generating a query from a natural language query to a knowledge base,
A natural language quality preprocessing unit configured to acquire resources each including ontology components corresponding to tokens extracted from the natural language query by transmitting a natural language query to the natural language recognition system;
A graph analyzer configured to generate graph data including the resources based on an ontology schema of the knowledge base composed of knowledge data units and to generate at least one knowledge data unit from the graph data; And
A template generator configured to generate a sample query from the at least one knowledge data unit and generate a template corresponding to the pattern of resources from the sample query.
상기 자연어 질의 전처리부는, 네트워크를 통해서 복수의 자연어 질의들을 수집하거나 질의 응답 시스템에 제공된 사용자의 자연어 질의들을 획득하도록 구성된 것을 특징으로 하는 시스템.The method according to claim 1,
Wherein the natural language query preprocessor is configured to collect a plurality of natural language queries through a network or to obtain user natural language queries provided to a query response system.
상기 자연어 질의 전처리부는, 상기 질의 응답 시스템에 제공된 상기 자연어 질의들 중 상기 질의 응답 시스템에 의한 처리과정에서 템플릿에 매칭되지 아니한 자연어 질의를 획득하도록 구성된 것을 특징으로 하는 시스템.The method of claim 2,
Wherein the natural language query preprocessing unit is configured to acquire a natural language query that is not matched with the template in the processing by the query response system among the natural language queries provided to the query response system.
상기 그래프 분석부는, 상기 온톨로지 구성요소들 중 엔티티 또는 클래스를 포함하는 리소스로부터 노드를 생성하고 상기 온톨로지 구성요소들 중 속성을 포함하는 리소스로부터 에지를 생성함으로써 상기 그래프 데이터를 생성하도록 구성된 그래프 생성부;
상기 그래프 데이터에 포함된 노드들 및 에지들 각각을 선택적으로 제거함으로써 상기 리소스들을 필터링하도록 구성된 리소스 필터링부; 및
필터링된 리소스들을 포함하는 그래프 데이터로부터 적어도 하나의 지식 데이터 단위를 생성하도록 구성된 지식 데이터 단위 생성부를 포함하는 것을 특징으로 하는 시스템.The method according to claim 1,
Wherein the graph analyzer comprises: a graph generator configured to generate the graph data by generating a node from a resource including an entity or a class among the ontology components and generating an edge from a resource of the ontology components;
A resource filtering unit configured to filter the resources by selectively removing each of the nodes and edges included in the graph data; And
And a knowledge data unit generation unit configured to generate at least one knowledge data unit from the graph data including the filtered resources.
상기 리소스 필터링부는, 에지를 가지지 아니하는 노드 및 노드에 연결되지 아니한 일단을 가지는 에지 중 적어도 하나를 제거함으로써 상기 리소스들을 필터링하도록 구성된 것을 특징으로 하는 시스템.The method of claim 4,
Wherein the resource filtering unit is configured to filter the resources by removing at least one of the node having no edge and the edge having no edge connected to the node.
상기 리소스들 각각은 토큰 및 온톨로지 구성요소의 매칭 정도에 대응하는 가중치를 더 포함하고,
상기 리소스 필터링부는, 상기 노드들 및 상기 에지들의 가중치들에 기초하여, 미리 정의된 기준치 이하의 합산된 가중치를 가지는 상호 연결된 노드 및 에지를 제거함으로써 상기 리소스들을 필터링하도록 구성된 것을 특징으로 하는 시스템.The method of claim 4,
Each of the resources further comprising a weight corresponding to a degree of matching of the token and the ontology component,
Wherein the resource filtering unit is configured to filter the resources by removing interconnected nodes and edges having aggregated weights that are less than or equal to a predefined reference value based on the weights of the nodes and the edges.
상기 템플릿 생성부는, 상기 지식 베이스의 지식 데이터에 기초하여 상기 샘플 쿼리를 검증하도록 구성된 쿼리 검증부를 포함하는 것을 특징으로 하는 시스템.The method according to claim 1,
Wherein the template generation unit includes a query verification unit configured to verify the sample query based on the knowledge data of the knowledge base.
관리자 인터페이스를 더 포함하고,
상기 쿼리 검증부는, 상기 관리자 인터페이스를 통해서 상기 자연어 질의 및 상기 샘플 쿼리를 관리자에 제공하고, 상기 관리자 인터페이스를 통해서 상기 관리자로부터 상기 샘플 쿼리의 적부(適否) 및 변경에 대한 정보를 수신하도록 구성된 것을 특징으로 하는 시스템.The method of claim 7,
Further comprising an administrator interface,
Wherein the query verifying unit is configured to provide the natural language query and the sample query to the manager through the manager interface and receive information on the suitability and the change of the sample query from the manager through the manager interface .
상기 템플릿 생성부는, 생성된 상기 템플릿을, 질의 응답 시스템에 의해서 액세스되는 템플릿 저장소에 저장하도록 구성된 것을 특징으로 하는 시스템.The method according to claim 1,
Wherein the template generation unit is configured to store the generated template in a template storage accessed by a query response system.
상기 지식 데이터 단위는 트리플(triple)이고,
상기 쿼리는 SPARQL(SPARQL Protocol and RDF Query Language)인 것을 특징으로 하는 시스템.The method according to claim 1,
Wherein the knowledge data unit is a triple,
Wherein the query is a SPARQL (SPARQL Protocol and RDF Query Language).
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170178745A KR101987915B1 (en) | 2017-12-22 | 2017-12-22 | System for generating template used to generate query to knowledge base from natural language question and question answering system including the same |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020170178745A KR101987915B1 (en) | 2017-12-22 | 2017-12-22 | System for generating template used to generate query to knowledge base from natural language question and question answering system including the same |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101987915B1 true KR101987915B1 (en) | 2019-06-12 |
Family
ID=66845828
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020170178745A KR101987915B1 (en) | 2017-12-22 | 2017-12-22 | System for generating template used to generate query to knowledge base from natural language question and question answering system including the same |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101987915B1 (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20200093441A (en) * | 2019-01-28 | 2020-08-05 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Method for obtaining data model in knowledge graph, apparatus, device and medium |
CN112163160A (en) * | 2020-10-12 | 2021-01-01 | 广西师范大学 | Knowledge graph-based sensitive identification method |
WO2021054514A1 (en) * | 2019-09-18 | 2021-03-25 | 주식회사 솔트룩스 | User-customized question-answering system based on knowledge graph |
KR102345890B1 (en) * | 2021-06-11 | 2022-01-03 | 주식회사 사이람 | Graph modeling method and graph modeling apparatus using structured data |
KR20220066737A (en) * | 2020-11-16 | 2022-05-24 | 주식회사 솔트룩스 | Knowledge extraction system for scientific technology papers |
KR102573563B1 (en) * | 2022-11-02 | 2023-08-31 | 주식회사 메타컴퓨팅 | Natural language data analysis system of ab initio type, and the method |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160060821A (en) * | 2014-11-20 | 2016-05-31 | 한국전자통신연구원 | Question answering system and method for structured knowledge-base using deep natrural language question analysis |
KR20160066236A (en) * | 2014-12-02 | 2016-06-10 | 주식회사 솔트룩스 | Method for producing structured query based on knowledge database and apparatus for the same |
KR20170033722A (en) * | 2015-09-17 | 2017-03-27 | 삼성전자주식회사 | Apparatus and method for processing user's locution, and dialog management apparatus |
-
2017
- 2017-12-22 KR KR1020170178745A patent/KR101987915B1/en active IP Right Grant
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20160060821A (en) * | 2014-11-20 | 2016-05-31 | 한국전자통신연구원 | Question answering system and method for structured knowledge-base using deep natrural language question analysis |
KR20160066236A (en) * | 2014-12-02 | 2016-06-10 | 주식회사 솔트룩스 | Method for producing structured query based on knowledge database and apparatus for the same |
KR20170033722A (en) * | 2015-09-17 | 2017-03-27 | 삼성전자주식회사 | Apparatus and method for processing user's locution, and dialog management apparatus |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20200093441A (en) * | 2019-01-28 | 2020-08-05 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Method for obtaining data model in knowledge graph, apparatus, device and medium |
KR102299744B1 (en) | 2019-01-28 | 2021-09-08 | 베이징 바이두 넷컴 사이언스 앤 테크놀로지 코., 엘티디. | Method for obtaining data model in knowledge graph, apparatus, device and medium |
WO2021054514A1 (en) * | 2019-09-18 | 2021-03-25 | 주식회사 솔트룩스 | User-customized question-answering system based on knowledge graph |
KR20210033348A (en) * | 2019-09-18 | 2021-03-26 | 주식회사 솔트룩스 | Customized Question-Answering system based on knowledge graph |
KR102252459B1 (en) * | 2019-09-18 | 2021-05-14 | 주식회사 솔트룩스 | Customized Question-Answering system based on knowledge graph |
US11960513B2 (en) | 2019-09-18 | 2024-04-16 | Saltlux Inc. | User-customized question-answering system based on knowledge graph |
CN112163160A (en) * | 2020-10-12 | 2021-01-01 | 广西师范大学 | Knowledge graph-based sensitive identification method |
CN112163160B (en) * | 2020-10-12 | 2023-08-08 | 广西师范大学 | Sensitive identification method based on knowledge graph |
KR20220066737A (en) * | 2020-11-16 | 2022-05-24 | 주식회사 솔트룩스 | Knowledge extraction system for scientific technology papers |
KR102543703B1 (en) * | 2020-11-16 | 2023-06-16 | 주식회사 솔트룩스 | Knowledge extraction system for scientific technology papers |
KR102345890B1 (en) * | 2021-06-11 | 2022-01-03 | 주식회사 사이람 | Graph modeling method and graph modeling apparatus using structured data |
KR102573563B1 (en) * | 2022-11-02 | 2023-08-31 | 주식회사 메타컴퓨팅 | Natural language data analysis system of ab initio type, and the method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101987915B1 (en) | System for generating template used to generate query to knowledge base from natural language question and question answering system including the same | |
JP7170779B2 (en) | Methods and systems for automatic intent mining, classification, and placement | |
CN105893349B (en) | Classification tag match mapping method and device | |
CN111625659B (en) | Knowledge graph processing method, device, server and storage medium | |
US10853357B2 (en) | Extensible automatic query language generator for semantic data | |
US10289717B2 (en) | Semantic search apparatus and method using mobile terminal | |
AU2019213302A1 (en) | Filtering data lineage diagrams | |
AU2016219421B2 (en) | Filtering data lineage diagrams | |
US10747958B2 (en) | Dependency graph based natural language processing | |
CN102135905B (en) | User customization-based body matching system and method | |
CN111881290A (en) | Distribution network multi-source grid entity fusion method based on weighted semantic similarity | |
KR101988396B1 (en) | System for generting query to knowledge base from natural language question and ranking resources and question answering system including the same | |
CN110619050B (en) | Intention recognition method and device | |
KR101739540B1 (en) | System and method for building integration knowledge base based | |
CN112559704A (en) | Knowledge graph generation tool configured by user-defined | |
KR101637504B1 (en) | System and method for processing informal data | |
Leonov et al. | Architecture and self-learning concept of knowledge-based systems by use monitoring of internet network | |
CN112395425A (en) | Data processing method and device, computer equipment and readable storage medium | |
Song et al. | Rgvisnet: A hybrid retrieval-generation neural framework towards automatic data visualization generation | |
CN115858919A (en) | Learning resource recommendation method and system based on project field knowledge and user comments | |
WO2022036515A1 (en) | Production process modeling and simulating method and apparatus | |
CN110929509B (en) | Domain event trigger word clustering method based on louvain community discovery algorithm | |
CN112463974A (en) | Method and device for establishing knowledge graph | |
CN116450827A (en) | Event template induction method and system based on large-scale language model | |
US9195940B2 (en) | Jabba-type override for correcting or improving output of a model |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GRNT | Written decision to grant |