TWI673705B - Natural language understanding system and semantic analysis method - Google Patents
Natural language understanding system and semantic analysis method Download PDFInfo
- Publication number
- TWI673705B TWI673705B TW107111597A TW107111597A TWI673705B TW I673705 B TWI673705 B TW I673705B TW 107111597 A TW107111597 A TW 107111597A TW 107111597 A TW107111597 A TW 107111597A TW I673705 B TWI673705 B TW I673705B
- Authority
- TW
- Taiwan
- Prior art keywords
- module
- semantic analysis
- natural language
- grammar
- language understanding
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/253—Grammatical analysis; Style critique
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
本發明提出一種自然語言理解系統包括語意分析模組以及處理器。語意分析模組包括表達式模組,表達式模組包括通用部分以及非通用部分,其中非通用部分包括參數列表。處理器用以執行語意分析模組,以使語意分析模組結合表達式模組的通用部分以及非通用部分,語意分析模組依據表達式模組的非通用部分的參數列表來提供多個實際參數至表達式模組的通用部分,以產生語法規則資料。另外,一種語意分析方法亦被提出。 The invention provides a natural language understanding system including a semantic analysis module and a processor. The semantic analysis module includes an expression module. The expression module includes a general part and a non-universal part. The non-universal part includes a parameter list. The processor is used to execute a semantic analysis module, so that the semantic analysis module combines the general part and the non-universal part of the expression module. The semantic analysis module provides multiple actual parameters according to the parameter list of the non-generic part of the expression module Go to the general part of the expression module to generate grammar rule data. In addition, a semantic analysis method is also proposed.
Description
本發明是有關於一種自然語言理解技術,且特別是有關於一種自然語言理解系統以及語意分析方法。 The present invention relates to a natural language understanding technology, and more particularly, to a natural language understanding system and a semantic analysis method.
在智能語音辨識的應用領域中,自然語言理解(Natural Language Understanding,NLU)技術是目前重要的關鍵技術。自然語言理解技術能負責提取使用者語句中的關鍵信息,並且能判斷使用者的意圖,以對應於使用者的意圖執行後續處理。然而,在基於規則的語意分析方法的實際應用中,自然語言理解系統需要針對大量的語料各別設計對應的語法規則。但是,由於在自然語言中存在許多相似的詞彙結構,使得在相應的語法規則中存在許多冗餘的內容,導致增加編譯語法規則的工作量,也增加了維護和修改的難度。有鑑於此,以下將提出幾個範例實施例的解決方案。 In the field of intelligent speech recognition, Natural Language Understanding (NLU) technology is currently an important key technology. Natural language understanding technology can be responsible for extracting key information in user sentences, and can judge the user's intention to perform subsequent processing corresponding to the user's intention. However, in the practical application of rule-based semantic analysis methods, natural language understanding systems need to design corresponding grammar rules for a large number of corpora. However, due to the existence of many similar vocabulary structures in natural language, there are many redundant contents in the corresponding grammatical rules, which leads to an increase in the workload of compiling grammatical rules and the difficulty of maintaining and modifying. In view of this, solutions of several exemplary embodiments will be proposed below.
本發明提供一種自然語言理解系統以及語意分析方法,可依據表達式模組來產生多筆語法規則資料,以有效節省自然語言理解系統編譯語法規則的工作量。 The invention provides a natural language understanding system and a semantic analysis method, which can generate multiple pieces of grammatical rule data according to an expression module, so as to effectively save the workload of compiling grammatical rules in a natural language understanding system.
本發明的自然語言理解系統包括語意分析模組以及處理器。語意分析模組包括表達式模組,表達式模組包括通用部分以及非通用部分,非通用部分包括參數列表。處理器用以執行語意分析模組,以使語意分析模組結合表達式模組的通用部分以及非通用部分,語意分析模組依據表達式模組的非通用部分的參數列表來提供多個實際參數的至少其中之一至表達式模組的通用部分,以產生至少一語法規則資料。 The natural language understanding system of the present invention includes a semantic analysis module and a processor. The semantic analysis module includes an expression module, the expression module includes a general part and a non-universal part, and the non-universal part includes a parameter list. The processor is used to execute a semantic analysis module, so that the semantic analysis module combines the general part and the non-universal part of the expression module. The semantic analysis module provides multiple actual parameters according to the parameter list of the non-generic part of the expression module. At least one of them to the general part of the expression module to generate at least one grammar rule data.
本發明的一種語意分析方法適用於自然語言理解系統。自然語言理解系統包括語意分析模組。語意分析方法包括以下步驟:執行語意分析模組,以使語意分析模組結合表達式模組的通用部分以及非通用部分,其中非通用部分包括參數列表;依據表達式模組的非通用部分的參數列表來提供多個實際參數的至少其中之一至表達式模組的通用部分,以產生至少一語法規則資料;藉由語意分析模組經由至少一語法規則資料來比對語料資料,以取得對應於語料資料的語意資訊。 A semantic analysis method of the present invention is applicable to a natural language understanding system. The natural language understanding system includes a semantic analysis module. The semantic analysis method includes the following steps: the semantic analysis module is executed so that the semantic analysis module combines the general part and the non-universal part of the expression module, wherein the non-universal part includes a parameter list; The parameter list provides at least one of a plurality of actual parameters to a common part of the expression module to generate at least one grammatical rule data; the semantic analysis module compares corpus data with at least one grammatical rule data to obtain Semantic information corresponding to corpus data.
基於上述,本發明的自然語言理解系統以及語意分析方法可在表達式模組中編譯通用部分以及非通用部分的形式,以使 透過結合表達式模組的通用部分以非通用部分來產生多筆語法規則資料。因此,本發明的自然語言理解系統以及語意分析方法可有效節省自然語言理解系統編譯語法規則的工作量,並且可便於維護。 Based on the above, the natural language understanding system and the semantic analysis method of the present invention can compile the form of the general part and the non-universal part in the expression module, so that By combining the common part of the expression module with the non-common part, multiple pieces of grammar rule data are generated. Therefore, the natural language understanding system and the semantic analysis method of the present invention can effectively save the workload of compiling grammar rules of the natural language understanding system, and can be easily maintained.
為讓本發明的上述特徵和優點能更明顯易懂,下文特舉實施例,並配合所附圖式作詳細說明如下。 In order to make the above features and advantages of the present invention more comprehensible, embodiments are hereinafter described in detail with reference to the accompanying drawings.
100‧‧‧電子裝置 100‧‧‧ electronic device
110‧‧‧處理器 110‧‧‧ processor
120‧‧‧記憶體 120‧‧‧Memory
121‧‧‧語意分析模組 121‧‧‧ Semantic Analysis Module
122‧‧‧表達式模組 122‧‧‧ Expression Module
123‧‧‧通用部分 123‧‧‧General section
124‧‧‧非通用部分 124‧‧‧ Non-common parts
130_1、130_2、130_N‧‧‧語法規則資料 130_1, 130_2, 130_N‧‧‧ grammar rules data
S310、S320、S330‧‧‧步驟 S310, S320, S330‧‧‧ steps
圖1繪示本發明的一實施例的自然語言理解系統的示意圖。 FIG. 1 is a schematic diagram of a natural language understanding system according to an embodiment of the present invention.
圖2繪示本發明的一實施例的語意分析模組的示意圖。 FIG. 2 is a schematic diagram of a semantic analysis module according to an embodiment of the present invention.
圖3繪示本發明的一實施例的語意分析方法的流程圖。 FIG. 3 is a flowchart of a semantic analysis method according to an embodiment of the present invention.
為了使本發明之內容可以被更容易明瞭,以下特舉實施例做為本發明確實能夠據以實施的範例。另外,凡可能之處,在圖式及實施方式中使用相同標號的元件/構件/步驟,係代表相同或類似部件。 In order to make the content of the present invention easier to understand, the following specific embodiments are examples based on which the present invention can be implemented. In addition, wherever possible, the same reference numbers are used in the drawings and embodiments to refer to the same or similar components.
圖1繪示本發明的一實施例的自然語言理解系統的示意圖。在本實施例中,自然語言理解(Natural Language Understanding,NLU)系統100包括處理器110、記憶體120以及輸入裝置130。記憶體120儲存語意分析模組121。處理器110耦接記憶體120以及 輸入裝置130。在本實施例中,語意分析模組121可以是預先儲存在另一儲存裝置中,當處理器110執行語意分析模組121時,處理器110讀取此另一儲存裝置,以將語意分析模組121載入至記憶體120。此另一儲存裝置可例如是硬碟(Hard Disk Drive,HDD)、固態硬碟(Solid State Disk,SSD)或光碟(Optical Disc,OD)等諸如此類的裝置,本發明並不加以限制。在本實施例中,處理器110執行語意分析模組121來產生語法規則資料。 FIG. 1 is a schematic diagram of a natural language understanding system according to an embodiment of the present invention. In this embodiment, the natural language understanding (NLU) system 100 includes a processor 110, a memory 120, and an input device 130. The memory 120 stores a semantic analysis module 121. The processor 110 is coupled to the memory 120 and Input device 130. In this embodiment, the semantic analysis module 121 may be stored in another storage device in advance. When the processor 110 executes the semantic analysis module 121, the processor 110 reads the other storage device to convert the semantic analysis module. The group 121 is loaded into the memory 120. The other storage device may be, for example, a hard disk drive (HDD), a solid state disk (SSD), or an optical disc (OD), and the like, which is not limited in the present invention. In this embodiment, the processor 110 executes the semantic analysis module 121 to generate grammatical rule data.
在本實施例中,處理器110例如是中央處理單元(Central Processing Unit,CPU)、系統單晶片(System on Chip,SOC)或是其他可程式化之一般用途或特殊用途的微處理器(Microprocessor)、數位信號處理器(Digital Signal Processor,DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits,ASIC)、可程式化邏輯裝置(Programmable Logic Device,PLD)、其他類似處理裝置或這些裝置的組合。值得注意的是,在本實施例中,處理器110包括編譯器(Compiler),其中編譯器可用以執行本發明各實施所述的各種自然語言以及程式編譯工作。 In this embodiment, the processor 110 is, for example, a central processing unit (CPU), a system on chip (SOC), or other programmable general-purpose or special-purpose microprocessors. ), Digital Signal Processor (DSP), Programmable Controller, Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD), other similar processing Device or a combination of these devices. It is worth noting that, in this embodiment, the processor 110 includes a compiler, where the compiler can perform various natural language and program compilation tasks described in the embodiments of the present invention.
在本實施例中,記憶體120例如是動態隨機存取記憶體(Dynamic Random Access Memory,DRAM)、快閃記憶體(Flash memory)或非揮發性隨機存取記憶體(Non-Volatile Random Access Memory,NVRAM)等。在本實施例中,記憶體120用以儲存本發明各實施例所述之資料、參數以及程式模組,並且處理器110可執行這些資料、參數以及程式模組,以實現本發明各實施例所述之 系統以及方法。 In this embodiment, the memory 120 is, for example, a dynamic random access memory (DRAM), a flash memory, or a non-volatile random access memory (Non-Volatile Random Access Memory). , NVRAM) and so on. In this embodiment, the memory 120 is used to store data, parameters, and program modules described in the embodiments of the present invention, and the processor 110 can execute these data, parameters, and program modules to implement the embodiments of the present invention. Mentioned System and method.
在本實施例中,輸入裝置130可用以接收使用者輸出的指令參數。輸入裝置130例如是鍵盤(Keyboard)、語音接收器(Voice receiver)、麥克風(Microphone)或這些裝置的組合等。輸入裝置130可用以接收使用者提供的語音信息或指令參數等,本發明並不加以限制。在本實施例中,輸入裝置130可依據上述各種型式的輸入方式來提供資料或參數至處理器110。 In this embodiment, the input device 130 may be used to receive a command parameter output by a user. The input device 130 is, for example, a keyboard, a voice receiver, a microphone, or a combination of these devices. The input device 130 can be used to receive voice information or command parameters provided by a user, which is not limited in the present invention. In this embodiment, the input device 130 may provide data or parameters to the processor 110 according to the above-mentioned various types of input methods.
圖2繪示本發明的一實施例的語意分析模組的示意圖。參考圖1以及圖2。在本實施例中,語意分析模組121包括表達式模組122。在本實施例中,語意分析模組121依據上下文無關文法(Context free Grammars,CFGs)來建構表達式模組122。並且,語意分析模組121以擴展巴科斯-瑙爾範式(Extended Backus-Naur Form,EBNF)來制定表達式模組122的語法規則。在本實施例中,表達式模組122預先編譯具有通用部分123以及非通用部分124的表達式模組122。在本實施例中,當處理器110執行語意分析模組121時,語意分析模組121結合表達式模組122的通用部分123以及非通用部分124,以產生多個語法規則資料130_1、130_2~130_N,其中N為大於1的正整數。 FIG. 2 is a schematic diagram of a semantic analysis module according to an embodiment of the present invention. Refer to FIG. 1 and FIG. 2. In this embodiment, the semantic analysis module 121 includes an expression module 122. In this embodiment, the semantic analysis module 121 constructs the expression module 122 according to context free grammars (CFGs). In addition, the semantic analysis module 121 formulates the grammatical rules of the expression module 122 in an Extended Backus-Naur Form (EBNF). In this embodiment, the expression module 122 compiles the expression module 122 having a general portion 123 and a non-universal portion 124 in advance. In this embodiment, when the processor 110 executes the semantic analysis module 121, the semantic analysis module 121 combines the general part 123 and the non-universal part 124 of the expression module 122 to generate a plurality of grammatical rule data 130_1, 130_2 ~ 130_N, where N is a positive integer greater than 1.
具體而言,在本實施例中,表達式模組122的通用部分123包括語法模板,並且此語法模板包括參數化的產生式模組。非通用部分124包括參數列表,並且參數列表包括多個實際參數(actual parameter)。在本實施例中,當處理器110執行語意分析模 組121以結合表達式模組122的通用部分123以及非通用部分124時,語意分析模組121將參數列表當中的這些實際參數傳遞至參數化的產生式模組中,以產生語法規則資料130_1、130_2~130_N。 Specifically, in this embodiment, the general part 123 of the expression module 122 includes a syntax template, and this syntax template includes a parameterized production module. The non-universal portion 124 includes a parameter list, and the parameter list includes a plurality of actual parameters. In this embodiment, when the processor 110 executes a semantic analysis module When the group 121 combines the general part 123 and the non-universal part 124 of the expression module 122, the semantic analysis module 121 passes these actual parameters in the parameter list to the parameterized production module to generate grammatical rule data 130_1 , 130_2 ~ 130_N.
在本實施例中,語法模板的參數化的產生式模組可包括形式參數(formal parameter)。也就是說,當語意分析模組121以結合表達式模組122的通用部分123以及非通用部分124時,在參數列表當中的這些實際參數可傳遞至參數化的產生式模組中的形式參數。舉例來說,表達式模組122的表達式內容可如以下語法:<疊詞(verb)>:$(verb)一$(verb);<做某事(verb,predicate)>:我想<疊詞($(verb))><recent>$(predicate);<recent>:最近的|近期的|新的;<語法1>:<做某事(看,電影)>;<語法2>:<做某事(聽,流行歌曲)>。 In this embodiment, the parameterized production module of the grammar template may include a formal parameter. That is, when the semantic analysis module 121 combines the general part 123 and the non-universal part 124 of the expression module 122, these actual parameters in the parameter list can be passed to the formal parameters in the parameterized production module . For example, the expression content of the expression module 122 may have the following syntax: <verb (verb)>: $ (verb)-$ (verb); <do something (verb, predicate)>: I want to < Redundant ($ (verb))> <recent> $ (predicate); <recent>: recent | recent | new; <grammar 1>: <do something (watch, movie)>; <grammar 2> : <Doing something (listening, pop song)>.
在上述語法中,“<疊詞(verb)>:$(verb)一$(verb)”以及“<做某事(verb,predicate)>:我想<疊詞($(verb))><recent>$(predicate)”為通用部分123的語法模板的參數化的產生式。“<疊詞(verb)>”具有一個形式參數“(verb)”。“<做某事(verb,predicate)>”具有兩個形式參數“(verb)”以及“(predicate)”。在上述語法中,“<語法1>”以及“<語法2>”為表達式模組122的非通用部分124,並且對應於上述的“<做某事(verb,predicate)>”。“<語法1>”具有兩個實際參數“看”以及“電影”,“<語法2>”具有兩個實際參數“聽”以及“流行歌曲”。在此範例中,“<語法1>”以及“<語法2>”分別具有動詞(verb)實際參數以及謂語 (predicate)實際參數。 In the above grammar, "<Redundant words (verb)>: $ (verb)-$ (verb)" and "<Do something (verb, predicate)>: I want <Redundant words ($ (verb))> < “recent> $ (predicate)” is a parameterized production of the syntax template of the general part 123. "<Redundant (verb)>" has a formal parameter "(verb)". "<做 什么 (verb, predicate)>" has two formal parameters "(verb)" and "(predicate)". In the above syntax, “<grammar 1>” and “<grammar 2>” are non-universal parts 124 of the expression module 122, and correspond to the above-mentioned “<do something (verb, predicate)>”. "<Grammar 1>" has two actual parameters "watch" and "movie", and "<grammar 2>" has two actual parameters "listen" and "pop song". In this example, "<grammar 1>" and "<grammar 2>" have verb actual parameters and predicates, respectively (predicate) the actual parameters.
也就是說,語意分析模組121可依據上述表達式模組122的表達式內容來產生兩個語法規則。依據“<語法1>”,這兩個語法規則的其中一個為“我想看一看<recent>電影;<recent>:最近的|近期的|新的”。依據“<語法2>”,這兩個語法規則的其中另一個為“我想聽一聽<recent>流行歌曲;<recent>:最近的|近期的|新的”。換句話說,語意分析模組121無須額外編譯對應於兩個語法規則的獨立的兩個表達式。在此範例中,語意分析模組121只需編譯一個具有通用部分123的表達式模組122,以藉由通用部分123當中的語法模板的參數化的產生式,即可獲得上述兩個語法規則。因此,本實施例的自然語言理解系統100可有效節省編譯語法規則的工作量。 That is, the semantic analysis module 121 can generate two grammatical rules according to the expression content of the expression module 122 described above. According to "<Syntax 1>", one of these two syntax rules is "I want to see a <recent> movie; <recent>: recent | recent | new | new." According to "<grammar 2>", the other of these two grammar rules is "I want to listen to <recent> popular songs; <recent>: recent | recent | new | new." In other words, the semantic analysis module 121 does not need to additionally compile two independent expressions corresponding to two grammatical rules. In this example, the semantic analysis module 121 only needs to compile an expression module 122 with a general part 123 to obtain the above two grammatical rules through the parameterized production of the grammar template in the general part 123. . Therefore, the natural language understanding system 100 of this embodiment can effectively save the workload of compiling syntax rules.
在一實施例中,語法模板的參數化的產生式模組也可包括位置參數(positional parameter),也就是說,當語意分析模組121以結合表達式模組122的通用部分123以及非通用部分124時,在參數列表當中的這些實際參數可傳遞至參數化的產生式模組中的位置參數。舉例來說,上述的“<疊詞>”以及“<做某事>”為表達式模組122的通用部分123的語法模板的參數化的產生式。在此範例中,“<疊詞>”的語法表示式可為“<疊詞>:_1一_1”,並且“<做某事>”的語法表示式可為“<做某事>:我想<疊詞><recent>_2”,其中“_1”以及“_2”可分對應參數列表中的第一個參數以及第二個參數。同理於上述形式參數,語意分析模組121只需編譯一個具 有通用部分123的表達式模組122,以藉由通用部分123當中的語法模板的參數化的產生式,即可獲得上述兩個語法規則。 In an embodiment, the parameterized production module of the grammar template may also include positional parameters, that is, when the semantic analysis module 121 is combined with the general part 123 and the non-universal part of the expression module 122 In part 124, these actual parameters in the parameter list can be passed to the position parameters in the parameterized production module. For example, the above-mentioned "<duplicate word>" and "<do something>" are parameterized productions of the syntax template of the general part 123 of the expression module 122. In this example, the grammatical expression of "<stackword>" can be "<stackword>: _ 1-1_1", and the grammatical expression of "<dosomething>" can be "<dosomething>": I think <duplicate> <recent> _2 ", where" _1 "and" _2 "can be divided into the first parameter and the second parameter in the corresponding parameter list. Similar to the above formal parameters, the semantic analysis module 121 only needs to compile a The expression module 122 having the general part 123 can obtain the above two grammatical rules by using the parameterized production of the grammar template in the general part 123.
再參考圖1以及圖2,在本實施例中,自然語言理解系統100可藉由輸入裝置130接收使用者輸入的語料資料,並且比對語料資料,以取得對應於語料資料的語意資訊。在本實施例中,語意分析模組121可依據上述實施例結合表達式模組122的通用部分123以及非通用部分124的方式來產生這些語法規則資料130_1、130_2~130_N。在本實施例中,語意分析模組121產生這些語法規則資料130_1、130_2~130_N的方式可如同於在C語言中的預處理階段所進行的宏(macro)展開方式。處理器110可展開上述語法模板,並且記錄至記憶體120中,以經由表達式模組122同時產生這些語法規則資料130_1、130_2~130_N。也就是說,記憶體120會用較多的記憶體空間來記錄展開後的表達式模組122的這些語法規則資料130_1、130_2~130_N,並且藉由這些語法規則資料130_1、130_2~130_N來比對使用者提供的語料資料,以取得對應於語料資料的語意資訊。因此,當自然語言理解系統100進行自然語言理解操作時,自然語言理解系統100具有高效率的比對效果。 Referring again to FIG. 1 and FIG. 2, in this embodiment, the natural language understanding system 100 may receive the corpus data input by the user through the input device 130 and compare the corpus data to obtain the semantic meaning corresponding to the corpus data. Information. In this embodiment, the semantic analysis module 121 may generate these grammatical rule data 130_1, 130_2 ~ 130_N by combining the general part 123 and the non-universal part 124 of the expression module 122 according to the above embodiment. In this embodiment, the manner in which the semantic analysis module 121 generates these grammatical rule data 130_1, 130_2 ~ 130_N can be similar to the macro expansion method performed in the preprocessing stage in the C language. The processor 110 may expand the grammar template and record it in the memory 120 to generate these grammar rule data 130_1, 130_2 ~ 130_N through the expression module 122 at the same time. That is to say, the memory 120 uses more memory space to record the grammatical rule data 130_1, 130_2 ~ 130_N of the expanded expression module 122, and compares these grammatical rule data 130_1, 130_2 ~ 130_N with Corpus data provided by the user to obtain semantic information corresponding to the corpus data. Therefore, when the natural language understanding system 100 performs a natural language understanding operation, the natural language understanding system 100 has a highly efficient comparison effect.
然而,在一實施例中,語意分析模組121產生這些語法規則資料130_1、130_2~130_N的方式也可如同於在C語言中的函數調用(function call)方式,也就是說,處理器110保留上述語法模板在記憶體120中,並且將在非通用部分124中的這些實際 參數動態替換至在通用部分123中的語法模板的參數化的產生式模組中,以經由表達式模組122逐一產生這些語法規則資料130_1、130_2~130_N。換句話說,在這些實際參數動態替換至參數化的產生式模組的過程中,每替換一次則立即進行比對。因此,當自然語言理解系統100進行自然語言理解操作時,自然語言理解系統100可有效節省記憶體120空間。 However, in an embodiment, the way in which the semantic analysis module 121 generates these grammatical rule data 130_1, 130_2 ~ 130_N can also be the same as the function call method in the C language, that is, the processor 110 reserves The above grammar template is in the memory 120, and these actual The parameters are dynamically substituted into the parameterized production module of the grammar template in the general part 123 to generate these grammar rule data 130_1, 130_2 ~ 130_N one by one through the expression module 122. In other words, in the process of dynamically replacing these actual parameters to the parameterized production module, each replacement is immediately compared. Therefore, when the natural language understanding system 100 performs a natural language understanding operation, the natural language understanding system 100 can effectively save space in the memory 120.
圖3繪示本發明的一實施例的語意分析方法的流程圖。參考圖1至圖3,本實施例的語意分析方法可至少適用於圖1以及圖3實施例的自然語言理解系統100以及語意分析模組121。在步驟S310中,自然語言理解系統100執行語意分析模組121,以使語意分析模組121結合表達式模組122的通用部分123以及非通用部分124,其中非通用部分124包括參數列表。在步驟S320中,自然語言理解系統100依據表達式模組122的非通用部分124的參數列表來提供多個實際參數至表達式模組122的通用部分123,以產生語法規則資料130_1、130_2~130_N。在步驟S330中,自然語言理解系統100藉由語意分析模組121經由語法規則資料130_1、130_2~130_N來比對語料資料,以取得對應於語料資料的語意資訊。因此,本實施例語意分析方法可有效節省自然語言理解系統100編譯語法規則的工作量。 FIG. 3 is a flowchart of a semantic analysis method according to an embodiment of the present invention. Referring to FIG. 1 to FIG. 3, the semantic analysis method of this embodiment is applicable to at least the natural language understanding system 100 and the semantic analysis module 121 of the embodiments of FIG. 1 and FIG. 3. In step S310, the natural language understanding system 100 executes the semantic analysis module 121, so that the semantic analysis module 121 combines the general part 123 and the non-universal part 124 of the expression module 122, where the non-universal part 124 includes a parameter list. In step S320, the natural language understanding system 100 provides a plurality of actual parameters to the general part 123 of the expression module 122 according to the parameter list of the non-general part 124 of the expression module 122 to generate grammatical rule data 130_1, 130_2 ~ 130_N. In step S330, the natural language understanding system 100 uses the semantic analysis module 121 to compare the corpus data through the grammatical rule data 130_1, 130_2 ~ 130_N to obtain the semantic information corresponding to the corpus data. Therefore, the semantic analysis method of this embodiment can effectively save the workload of compiling grammar rules of the natural language understanding system 100.
此外,關於本實施例的自然語言理解系統100的相關裝置特徵以及技術內容可依據上述圖1以及圖2實施例的內容而獲致足夠的教示、建議以及實施說明,因此不再贅述。 In addition, the relevant device features and technical contents of the natural language understanding system 100 of this embodiment can be obtained based on the content of the embodiments of FIG. 1 and FIG. 2 to obtain sufficient teaching, suggestions, and implementation descriptions, and therefore will not be repeated.
綜上所述,本發明的自然語言理解系統以及語意分析方法可在表達式模組的通用部分中,預先編譯語法模板。當自然語言理解系統執行表達式模組時,自然語言理解系統可將非通用部分的參數列表的多個實際參數提供至通用部分的語法模板中,以產生多筆語法規則資料。也就是說,本發明的自然語言理解系統以及語意分析方法無須預先編譯大量的語法規則資料,即可依據語法模板產生多筆語法規則資料。因此,本發明的自然語言理解系統以及語意分析方法可有效節省自然語言理解系統編譯語法規則的工作量,並且可便於維護。 In summary, the natural language understanding system and the semantic analysis method of the present invention can compile a grammar template in advance in the general part of the expression module. When the natural language understanding system executes the expression module, the natural language understanding system may provide multiple actual parameters of the parameter list of the non-general part to the grammar template of the general part to generate multiple pieces of grammar rule data. That is, the natural language understanding system and the semantic analysis method of the present invention can generate multiple pieces of grammatical rule data according to the grammar template without compiling a large amount of grammatical rule data in advance. Therefore, the natural language understanding system and the semantic analysis method of the present invention can effectively save the workload of compiling grammar rules of the natural language understanding system, and can be easily maintained.
雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。 Although the present invention has been disclosed as above with the examples, it is not intended to limit the present invention. Any person with ordinary knowledge in the technical field can make some modifications and retouching without departing from the spirit and scope of the present invention. The protection scope of the present invention shall be determined by the scope of the attached patent application.
Claims (13)
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810112700.8A CN108021559B (en) | 2018-02-05 | 2018-02-05 | Natural language understanding system and semantic analysis method |
??201810112700.8 | 2018-02-05 |
Publications (2)
Publication Number | Publication Date |
---|---|
TW201935463A TW201935463A (en) | 2019-09-01 |
TWI673705B true TWI673705B (en) | 2019-10-01 |
Family
ID=62075106
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107111597A TWI673705B (en) | 2018-02-05 | 2018-04-02 | Natural language understanding system and semantic analysis method |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108021559B (en) |
TW (1) | TWI673705B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109543192B (en) * | 2018-11-30 | 2023-05-05 | 出门问问创新科技有限公司 | Natural language analysis method, device, equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200834344A (en) * | 2006-11-02 | 2008-08-16 | Crimsonlogic Pte Ltd | System and method for processing language independent natural language statements |
CN103871402A (en) * | 2012-12-11 | 2014-06-18 | 北京百度网讯科技有限公司 | Language model training system, a voice identification system and corresponding method |
TWI567569B (en) * | 2014-04-29 | 2017-01-21 | Rakuten Inc | Natural language processing systems, natural language processing methods, and natural language processing programs |
TWI601129B (en) * | 2015-06-30 | 2017-10-01 | 芋頭科技(杭州)有限公司 | A semantic parsing system and method for spoken language |
TW201737241A (en) * | 2016-03-25 | 2017-10-16 | Alibaba Group Services Ltd | Language recognition method, device, and system |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6675370B1 (en) * | 2000-02-02 | 2004-01-06 | International Business Machines Corporation | System and method for imbedding hyperlinked language grammar notation in a “literate” programming environment |
CN101814065B (en) * | 2009-02-23 | 2014-07-30 | 富士通株式会社 | Syntactic analysis device and syntactic analysis method |
CN101763211A (en) * | 2009-04-30 | 2010-06-30 | 广东国笔科技股份有限公司 | System for analyzing semanteme in real time and controlling related operation |
CN102262622A (en) * | 2010-05-31 | 2011-11-30 | 国际商业机器公司 | Document processing, template generating and conceptbase generating methods and devices |
CN101894236B (en) * | 2010-07-28 | 2012-01-11 | 北京华夏信安科技有限公司 | Software homology detection method and device based on abstract syntax tree and semantic matching |
CN102609462A (en) * | 2012-01-14 | 2012-07-25 | 杭州安恒信息技术有限公司 | Method for compressed storage of massive SQL (structured query language) by means of extracting SQL models |
CN102768682B (en) * | 2012-06-28 | 2015-10-21 | 用友网络科技股份有限公司 | Business rule treating apparatus and business rule disposal route |
CN103294666B (en) * | 2013-05-28 | 2017-03-01 | 百度在线网络技术(北京)有限公司 | Grammar compilation method, semantic analytic method and corresponding intrument |
US20150242396A1 (en) * | 2014-02-21 | 2015-08-27 | Jun-Huai Su | Translating method for translating a natural-language description into a computer-language description |
CN106020803B (en) * | 2016-05-11 | 2020-12-29 | 深圳市麦斯杰网络有限公司 | Dynamic definition method and device of monitored object template |
CN107340999A (en) * | 2017-01-09 | 2017-11-10 | 北京理工大学 | Software automation method and system and the method in structure natural language understanding storehouse |
-
2018
- 2018-02-05 CN CN201810112700.8A patent/CN108021559B/en active Active
- 2018-04-02 TW TW107111597A patent/TWI673705B/en active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW200834344A (en) * | 2006-11-02 | 2008-08-16 | Crimsonlogic Pte Ltd | System and method for processing language independent natural language statements |
CN103871402A (en) * | 2012-12-11 | 2014-06-18 | 北京百度网讯科技有限公司 | Language model training system, a voice identification system and corresponding method |
TWI567569B (en) * | 2014-04-29 | 2017-01-21 | Rakuten Inc | Natural language processing systems, natural language processing methods, and natural language processing programs |
TWI601129B (en) * | 2015-06-30 | 2017-10-01 | 芋頭科技(杭州)有限公司 | A semantic parsing system and method for spoken language |
TW201737241A (en) * | 2016-03-25 | 2017-10-16 | Alibaba Group Services Ltd | Language recognition method, device, and system |
Also Published As
Publication number | Publication date |
---|---|
CN108021559A (en) | 2018-05-11 |
TW201935463A (en) | 2019-09-01 |
CN108021559B (en) | 2022-05-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8589163B2 (en) | Adapting language models with a bit mask for a subset of related words | |
US7860719B2 (en) | Disfluency detection for a speech-to-speech translation system using phrase-level machine translation with weighted finite state transducers | |
US10242670B2 (en) | Syntactic re-ranking of potential transcriptions during automatic speech recognition | |
US20080140387A1 (en) | Method and system for machine understanding, knowledge, and conversation | |
WO2021179701A1 (en) | Multilingual speech recognition method and apparatus, and electronic device | |
US20200074991A1 (en) | Automated data cartridge for conversational ai bots | |
JPH0320800A (en) | Method and device for recognizing voice | |
JP6955963B2 (en) | Search device, similarity calculation method, and program | |
KR100735559B1 (en) | Apparatus and method for constructing language model | |
JP2006085160A (en) | Creation of speech recognition syntax for alphanumeric concept | |
US20190129695A1 (en) | Programming by voice | |
KR101409413B1 (en) | Method for natural language processing using unification grammar | |
TWI673705B (en) | Natural language understanding system and semantic analysis method | |
US9658999B2 (en) | Language processing method and electronic device | |
TWI652668B (en) | Natural language recognition device and natural language recognition method | |
KR20150027465A (en) | Method and apparatus for generating multiple phoneme string for foreign proper noun | |
JP2007065029A (en) | Syntax/semantic analysis system and program, and speech recognition system | |
CN111752967A (en) | SQL-based data processing method and device, electronic equipment and storage medium | |
TWI675365B (en) | Grammar compiling system and grammar compiling method | |
JP2009080681A (en) | Program structure parsing method and device | |
Kumar et al. | Low resource pipeline for spoken language understanding via weak supervision | |
Gavhal et al. | Sentence Compression Using Natural Language Processing | |
Skantze | Jindigo: a java-based framework for incremental dialogue systems | |
Foth et al. | An experiment on incremental analysis using robust parsing techniques | |
KR20120035077A (en) | Method and apparatus for providing hybrid automatic translation |