WO2019085118A1 - Topic model-based associated word analysis method, and electronic apparatus and storage medium - Google Patents

Topic model-based associated word analysis method, and electronic apparatus and storage medium Download PDF

Info

Publication number
WO2019085118A1
WO2019085118A1 PCT/CN2017/113720 CN2017113720W WO2019085118A1 WO 2019085118 A1 WO2019085118 A1 WO 2019085118A1 CN 2017113720 W CN2017113720 W CN 2017113720W WO 2019085118 A1 WO2019085118 A1 WO 2019085118A1
Authority
WO
WIPO (PCT)
Prior art keywords
word
topic
words
queried
text
Prior art date
Application number
PCT/CN2017/113720
Other languages
French (fr)
Chinese (zh)
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 平安科技(深圳)有限公司
Publication of WO2019085118A1 publication Critical patent/WO2019085118A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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; CALCULATING OR 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

Definitions

  • the present application relates to the field of information retrieval, and in particular, to a method for analyzing related words based on a topic model, an electronic device, and a storage medium.
  • the calculation of related words is a very important step. Through the calculation of related words, we can estimate the user's possible thoughts when the user types less, and expand the content of the search. On the other hand, we can also find the synonyms of the user input, and look for similar meanings in the database. Other words for association matching.
  • the present application proposes a method, device and computer readable medium for analyzing related words based on a topic model.
  • the topic model-based related word analysis method, device and computer readable medium proposed in the present application are applicable to an information retrieval system of any professional field, and can quickly and accurately calculate related words corresponding to the feature words to be retrieved.
  • the present application proposes a method for analyzing related words based on a topic model, and the method includes the following steps:
  • the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried.
  • Corresponding theme model ;
  • obtaining the topic vector corresponding to each word from the probability distribution matrix comprises:
  • the parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
  • the preset associated word weight analysis rule comprises:
  • the other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
  • the other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
  • step A the following steps are further included:
  • the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
  • the present application further provides an electronic device based on a topic model, the device comprising: a memory, a processor, and a related word analysis system based on a topic model, where the topic model based related words are stored
  • the analysis system is executed by the processor, the following operations are implemented:
  • the performing, by the processor, the topic model-based related-word analysis system, the obtaining the topic vector corresponding to each word from the topic feature probability distribution matrix comprises:
  • the parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
  • the performing, by the processor, the topic model-based related word analysis system to implement the preset related word weight analysis rule comprises:
  • the other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
  • the processor performs the following operations before the step S1 is implemented by the topic model-based related word analysis system:
  • the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
  • the present application further provides a computer readable storage medium,
  • the computer readable medium stores a topic model-based related word analysis program, and the topic model-based related word analysis program is executed by the processor to implement the step of the above-described topic model-based related word analysis method.
  • the topic model based related word analysis method, the electronic device and the computer readable storage medium proposed by the present application firstly, when the subject model needs to be modeled in a technical field, the corresponding advance in the technical field
  • the determined database obtains the text to be queried in the technical field, and performs subject modeling on the acquired text to be acquired to obtain a topic model corresponding to each text to be queried; and then, based on the theme model, the text to be queried is trained to train the text to be queried to include The subject, and the probability distribution matrix of the probabilities of the words in the topics included in each topic; then, the subject vectors corresponding to the respective words are obtained from the probability distribution matrix, and the corresponding words are analyzed according to the preset related words weight analysis rules The relationship between the topic vectors to analyze the related words corresponding to the words to be retrieved.
  • FIG. 1 is a schematic diagram of a hardware architecture of a subject model based electronic device of the present application
  • FIG. 2 is a schematic diagram of program modules of a topic model-based related word analysis system of the present application
  • FIG. 3 is a schematic diagram of a hardware architecture of the analysis module of FIG. 2;
  • FIG. 4 is a schematic diagram of an implementation process of a method for analyzing related words based on a topic model in the present application
  • FIG. 5 is a schematic flow chart of the implementation of step S403 in FIG. 4.
  • FIG. 1 it is a schematic diagram of a hardware architecture of an electronic device of the present application.
  • the electronic device 1 includes, but is not limited to, the memory 11, the processor 12, and the network interface 13 can be connected to each other through a system bus. It is to be noted that FIG. 1 only shows an electronic device having components 11-13, but it should be understood that not all illustrated components may be implemented and that more or fewer components may be implemented instead.
  • the memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (for example, SD or DX memory, etc.), a random access memory (RAM), and a static random access.
  • Memory SRAM
  • ROM read only memory
  • EEPROM electrically erasable programmable read only memory
  • PROM programmable read only memory
  • magnetic memory Storage disk, CD, etc.
  • the memory 11 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1.
  • the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC), and a secure digital (Secure Digital, SD). ) cards, flash cards, etc.
  • the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device thereof.
  • the memory 11 is generally used to store an operating system installed in the electronic device 1 and various types of application software, such as program code of the related-word analysis system 200 based on the theme model. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
  • Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments.
  • the processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication with the electronic device 1.
  • the processor 12 is configured to run program code or process data stored in the memory 11, such as running a topic model based correlation word analysis system 200 or the like.
  • the network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 1 and other electronic devices.
  • the electronic device 1 further includes a display (not shown in FIG. 1 ), and the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode). Diode) Toucher, etc.
  • the display is used to display information processed in the electronic device 1 and a user interface or the like for displaying the visualization.
  • the present application proposes a topic model based related word analysis system 200.
  • the topic model based related word analysis system 200 can be divided into one or more modules, wherein one or more modules are stored in the memory 11 and are composed of one or more processors (in this embodiment Executed for the processor 12) to complete the application.
  • the topic model based related word analysis system 200 can be segmented into a modeling module 201, a training module 202, and an analysis module 203.
  • the program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the topic model based related word analysis system 200 in the electronic device 1.
  • the function of each program module 201-203 will be described in detail below.
  • the modeling module 201 is configured to acquire a predetermined database corresponding to the technical field (for example, a corresponding paper library of the technical field, a blog article library, etc.) when the subject model needs to be modeled in a technical field.
  • the text to be queried is subjected to topic modeling to obtain the topic model corresponding to each text to be queried.
  • the query may be processed according to an application scenario in the technical field. Edit the text to get good quality text to be queried.
  • the text in the predetermined database in the medical field is used as the text to be queried.
  • the text with no practical meaning is deleted according to the core keyword language in the medical field (for example, analyzing each query to be queried)
  • the text contains a predetermined type of core keyword language in the medical field and a corresponding number. If the type of the core keyword language contained in a text to be queried is less than the first threshold (for example, 2), the total number of core keyword words is included. Less than the second threshold (eg, 2), the text is determined to be meaningless text), and interference is eliminated.
  • the first threshold for example, 2
  • the second threshold eg, 2
  • the text is determined to be meaningless text
  • a topic represents a concept, an aspect, expressed as a series of related words, and is the conditional probability of these words.
  • the theme is a bucket with words with high probability of occurrence. These words have a strong correlation with this theme.
  • a corpus is needed.
  • the corpus corresponding to the technical domain to which the acquired text belongs is determined, and the determined corpus is used as the technical field.
  • the corpus of the topic modeling is used as the technical field.
  • the training module 202 is configured to train the to-be-queried text based on the topic model to train a probability distribution matrix of the topics included in the text to be queried and the probability that the words in the included topics appear in the respective topics.
  • the process of generating each word depends on the topic to which the word belongs, that is, usually there is a conditional probability relationship between a word and a topic.
  • the conditional probability relationship is usually expressed as: P ( Words
  • P Words
  • To represent such a relationship by a matrix the number of rows of the matrix is equal to the number of topics, and the number of columns is equal to the number of all words.
  • each row of the matrix is a probability distribution of generating different words under a certain topic. That is, when training a certain text to be queried based on the topic model, the probability distribution matrix between different words corresponding to the topic included in the text to be queried is usually trained.
  • each column of the probability distribution matrix represents the probability of occurrence of a certain word in a certain topic, and normalizing each parameter corresponding to each column to obtain The topic vector corresponding to each word in the dimension of the word.
  • the analyzing module 203 is configured to analyze the relationship between the topic vectors corresponding to the respective words according to the preset related word weight analysis rules, so as to analyze the related words corresponding to the words to be searched.
  • the preset associated word weight analysis rules include:
  • each of the other words corresponding to the subject vector corresponding to the word to be searched and the probability distribution matrix (the other words refer to: words other than the words to be searched in the words corresponding to the probability distribution matrix) Euclidean distance between corresponding theme vectors;
  • the other words corresponding to the found Euclidean distance are used as the related words of the word to be searched.
  • other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
  • the training result of the corpus to be queried by the topic model LDA (Latent Dirichlet Allocation) is used, and the potential probability distribution of words in each topic is abstracted into the probability of words to topics.
  • the distribution is used to calculate the Euclidean distance between the topic vectors corresponding to each word, and then the relationship between the words in the entire corpus is calculated according to the Euclidean distance between the topic vectors corresponding to each word.
  • the features in this embodiment are words.
  • FIG. 3 is a schematic diagram of the hardware architecture of the analysis module 203 of FIG.
  • the analysis module 203 includes a calculation unit 301, a comparison unit 302, and a related word determination unit 303.
  • the calculating unit 301 is configured to separately calculate the Euclidean distance between the topic vector corresponding to the word to be searched and the topic vector corresponding to each other word corresponding to the probability distribution matrix.
  • the parsing unit 302 is configured to analyze and calculate a size relationship between each Euclidean distance to find a minimum Euclidean distance.
  • the related word determining unit 303 is configured to use other words corresponding to the found smallest Euclidean distance as related words of the to-be-searched word.
  • the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is acquired.
  • topic modeling to obtain a topic model corresponding to each text to be queried; then, training the text to be queried based on the topic model to train the theme included in the text to be queried, and the probability that the words in the included topic appear in each topic
  • the probability distribution matrix is obtained.
  • the topic vector corresponding to each word is obtained from the probability distribution matrix, and the relationship between the topic vectors corresponding to each word is analyzed according to the preset related word weight analysis rules, so as to analyze the related words corresponding to the words to be searched.
  • the online open source synonym synonym lexicon be directly used in a specific professional field, but also the retrieval method based on the topic model-based related word analysis method is more accurate and the search result is more comprehensive than the existing related word analysis method. .
  • the present application also proposes a method for analyzing related words based on a topic model.
  • FIG. 4 it is a schematic diagram of an implementation process of a related-word analysis method based on a topic model in the present application.
  • the method for analyzing related words based on the topic model of the present application includes the following steps S401 to S403.
  • Step S401 when subject modeling is required in a technical field, obtaining a to-be-queried text in the technical field from a predetermined database corresponding to the technical domain (for example, a paper library corresponding to the technical field, a blog article library, etc.)
  • the subject of the acquired text to be queried is modeled to obtain a topic model corresponding to each text to be queried.
  • the query text may be edited according to an application scenario in the technical field to obtain a high-quality text to be queried.
  • the text in the predetermined database in the medical field is used as the text to be queried.
  • the text with no practical meaning is deleted according to the core keyword language in the medical field (for example, analyzing each query to be queried)
  • the text contains a predetermined type of core keyword language in the medical field and a corresponding number. If the type of the core keyword language contained in a text to be queried is less than the first threshold (for example, 2), the total number of core keyword words is included. Less than the second threshold (eg, 2), the text is determined to be meaningless text), and interference is eliminated.
  • the first threshold for example, 2
  • the second threshold eg, 2
  • a topic In the process of cutting words, only retain nouns and verbs, delete some adjectives, auxiliary words, etc., such as deleting "", " ⁇ ", " ⁇ ”, etc. interference.
  • a topic In a topic model, a topic represents a concept, an aspect, expressed as a series of related words, and is the conditional probability of these words.
  • the theme In terms of image, the theme is a bucket with words with high probability of occurrence. These words have a strong correlation with this theme.
  • a corpus is needed.
  • the corpus corresponding to the technical domain to which the acquired text belongs is determined, and the determined corpus is used as the technical field.
  • the corpus of the topic modeling is used as the technical field.
  • Step S402 the text to be queried is trained based on the topic model to train a probability distribution matrix of the subject included in the text to be queried and the probability that the words in the included subject appear in each topic.
  • the process of generating each word depends on the topic to which the word belongs, that is, usually there is a conditional probability relationship between a word and a topic.
  • the conditional probability relationship is usually expressed as: P ( Words
  • P Words
  • To represent such a relationship by a matrix the number of rows of the matrix is equal to the number of topics, and the number of columns is equal to the number of all words.
  • each row of the matrix is a probability distribution of generating different words under a certain topic. That is, when training a certain text to be queried based on the theme model, the probability distribution matrix between different words corresponding to the theme of the theme fish brother included in the text to be queried is usually trained.
  • each column of the probability distribution matrix represents the probability that a certain word appears in a certain topic, and further, after normalizing the parameters corresponding to each column , to obtain the theme vector corresponding to each word in the dimension of the word.
  • Step S403 analyzing the relationship between the topic vectors corresponding to each word according to the preset related word weight analysis rule, and analyzing the related words corresponding to the words to be searched.
  • the preset associated word weight analysis rules include:
  • each of the other words corresponding to the subject vector corresponding to the word to be searched and the probability distribution matrix (the other words refer to: words other than the words to be searched in the words corresponding to the probability distribution matrix) Euclidean distance between corresponding theme vectors;
  • the other words corresponding to the found Euclidean distance are used as the related words of the word to be searched.
  • other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
  • the training result of the corpus to be queried by the topic model LDA (Latent Dirichlet Allocation) is used, and the potential probability distribution of the words in each topic is abstracted into a probability distribution of words to topics, and the distribution is used to calculate the topic vector corresponding to each word.
  • the Euclidean distance between the Euclidean distances is used to calculate the relationship between the words in the entire corpus according to the Euclidean distance between the subject vectors corresponding to each word. It should be noted that the features in this embodiment are words.
  • step S403 in FIG. 5, it is a schematic flowchart of the implementation of step S403 in FIG. As shown in FIG. 5, step S403 specifically includes the following steps S501 to S503 in an embodiment.
  • Step S501 respectively calculating the Euclidean distance between the topic vector corresponding to the word to be retrieved and the topic vector corresponding to each other word corresponding to the probability distribution matrix.
  • Step S502 analyzing and calculating the size relationship between the various Euclidean distances, and finding the smallest Euclidean distance.
  • Step S503 the other words corresponding to the found smallest Euclidean distance are used as related words of the to-be-searched word.
  • the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried.
  • Corresponding topic model training the text to be queried based on the topic model to train the subject included in the text to be queried, and the probability distribution matrix of the probability that the words in the included subject appear in each topic; and then, from the probability distribution matrix Obtaining the topic vector corresponding to each word, and analyzing the relationship between the topic vectors corresponding to each word according to the preset related word weight analysis rule, so as to analyze the related words corresponding to the word to be searched.
  • the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better.
  • Implementation Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk,
  • the optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

A topic model-based associated word analysis method, the method comprising the following steps: A, when a technical field needs to be subjected to topic modeling, acquiring, from a predetermined database corresponding to the technical field, texts to be queried in the technical field, and carrying out topic modeling on the acquired texts to be queried, so as to acquire topic models corresponding to various texts to be queried; B, based on the topic models, training the texts to be queried, so as to train topics included in the texts to be queried and a probability distribution matrix of probabilities, occurring in various topics, of words in the included topics; and C, acquiring, from the probability distribution matrix, topic vectors corresponding to various words, and analyzing a relationship between the topic vectors corresponding to various words according to a pre-set associated word weight analysis rule, so as to analyze associated words corresponding to words to be retrieved. Accordingly, relatively accurate and comprehensive calculation of associated words is realized when a specific professional field is subjected to information retrieval.

Description

基于主题模型的关联词分析方法、电子装置及存储介质Method for analyzing related words based on topic model, electronic device and storage medium
本申请要求于2017年11月01日提交中国专利局、申请号为201711059225.4、发明名称为“基于主题模型的关联词分析方法、电子装置及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。This application claims the priority of the Chinese patent application filed on November 1, 2017, the Chinese Patent Office, the application number is 201711059225.4, and the invention name is "the subject-based model analysis method, electronic device and storage medium". The citation is incorporated in the application.
技术领域Technical field
本申请涉及信息检索领域,尤其涉及一种基于主题模型的关联词分析方法、电子装置及存储介质。The present application relates to the field of information retrieval, and in particular, to a method for analyzing related words based on a topic model, an electronic device, and a storage medium.
背景技术Background technique
信息检索***中,关联词计算是非常关键的一个步骤。通过关联词计算,我们一方面可以在用户键入内容较少的时候推算用户可能的想法,起到扩宽搜索内容的目的;而另一方面也可以寻找到用户输入内容的近义词,寻找数据库中意思相近的其他词语,进行联想匹配。In the information retrieval system, the calculation of related words is a very important step. Through the calculation of related words, we can estimate the user's possible thoughts when the user types less, and expand the content of the search. On the other hand, we can also find the synonyms of the user input, and look for similar meanings in the database. Other words for association matching.
不同于日常生活中常见的近义词和同义词的使用,在某些特定领域,例如,医疗健康领域、科技创新领域等,信息检索***中关联词的使用具有一定的专业程度,若将网上开源的近义词同义词的词库库直接使用在这些特定的专业领域,通常会导致检索结果不准确、且检索结果不全面等问题。Different from the use of synonyms and synonyms in daily life, in some specific fields, such as medical health, scientific and technological innovation, etc., the use of related words in information retrieval systems has a certain degree of professionalism, if the online open source synonyms are synonymous The use of the thesaurus in these specific areas of expertise often leads to inaccurate search results and incomplete search results.
发明内容Summary of the invention
有鉴于此,本申请提出一种基于主题模型的关联词分析方法、装置及计算机可读介质。本申请所提出的基于主题模型的关联词分析方法、装置及计算机可读介质适用于任何专业领域的信息检索***中,能够快速准确地计算待检索特征词对应的关联词。In view of this, the present application proposes a method, device and computer readable medium for analyzing related words based on a topic model. The topic model-based related word analysis method, device and computer readable medium proposed in the present application are applicable to an information retrieval system of any professional field, and can quickly and accurately calculate related words corresponding to the feature words to be retrieved.
首先,为实现上述目的,本申请提出一种基于主题模型的关联词分析方法,该方法包括如下步骤:First, in order to achieve the above object, the present application proposes a method for analyzing related words based on a topic model, and the method includes the following steps:
A、在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;A. When the subject model needs to be modeled in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried. Corresponding theme model;
B、基于所述主题模型训练所述待查询文本以训练出所述待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;B. Train the to-be-queried text based on the topic model to train a probability distribution matrix of a topic included in the text to be queried, and a probability that a word in the included topic appears in each topic;
C、从所述概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。C. Obtain a topic vector corresponding to each word from the probability distribution matrix, and analyze a relationship between topic vectors corresponding to each word according to a preset related word weight analysis rule to analyze related words corresponding to the word to be searched.
优选地,从所述概率分布矩阵中获取各个词语对应的主题向量包括:Preferably, obtaining the topic vector corresponding to each word from the probability distribution matrix comprises:
对所述概率分布矩阵中的每一列对应的参数进行归一化,从而获得以词语为维度的各个词语对应的主题向量。The parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
优选地,所述预设的关联词权重分析规则包括:Preferably, the preset associated word weight analysis rule comprises:
分别计算所述待检索词语对应的主题向量与所述概率分布矩阵对应的各 个其他词语对应的主题向量之间的欧式距离;Calculating respectively, each of the topic vector corresponding to the word to be searched and the probability distribution matrix Euclidean distance between topic vectors corresponding to other words;
分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
将找出的所述最小的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
优选地,所述其他词语指的是,所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语。Preferably, the other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
优选地,在所述步骤A之前还包括如下步骤:Preferably, before the step A, the following steps are further included:
根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题模型的语料库。According to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
此外,为实现上述目的,本申请还提供一种基于主题模型的电子装置,该装置包括:存储器、处理器,所述存储器上存储有基于主题模型的关联词分析***,所述基于主题模型的关联词分析***被处理器执行时实现如下操作:In addition, in order to achieve the above object, the present application further provides an electronic device based on a topic model, the device comprising: a memory, a processor, and a related word analysis system based on a topic model, where the topic model based related words are stored When the analysis system is executed by the processor, the following operations are implemented:
S1、在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;S1. When a subject model needs to be modeled in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried. Corresponding theme model;
S2、基于所述主题模型训练所述待查询文本以训练出所述待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;S2, training the to-be-queried text based on the topic model to train a probability distribution matrix of a topic included in the text to be queried, and a probability that a word in the included topic appears in each topic;
S3、从所述概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。S3. Obtain a topic vector corresponding to each word from the probability distribution matrix, and analyze a relationship between topic vectors corresponding to each word according to a preset related word weight analysis rule to analyze related words corresponding to the word to be searched.
优选地,所述处理器执行基于主题模型的关联词分析***实现从所述主题特征概率分布矩阵中获取各个词语对应的主题向量的操作包括:Preferably, the performing, by the processor, the topic model-based related-word analysis system, the obtaining the topic vector corresponding to each word from the topic feature probability distribution matrix comprises:
对所述概率分布矩阵中的每一列对应的参数进行归一化,从而获得以词语为维度的各个词语对应的主题向量。The parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
优选地,所述处理器执行基于主题模型的关联词分析***实现所述预设的关联词权重分析规则的操作包括:Preferably, the performing, by the processor, the topic model-based related word analysis system to implement the preset related word weight analysis rule comprises:
分别计算所述待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离;Calculating, respectively, an Euclidean distance between a topic vector corresponding to the to-be-searched word and a topic vector corresponding to each other word corresponding to the probability distribution matrix;
分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
将找出的所述最小的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
优选地,所述处理器执行基于主题模型的关联词分析***实现步骤S1之前,还实现如下操作:Preferably, the processor performs the following operations before the step S1 is implemented by the topic model-based related word analysis system:
根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题模型的语料库。According to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
进一步地,为实现上述目的,本申请还提供一种计算机可读存储介质, 该计算机可读介质上存储有基于主题模型的关联词分析程序,基于主题模型的关联词分析程序被处理器执行时实现上述基于主题模型的关联词分析方法的步骤。Further, to achieve the above object, the present application further provides a computer readable storage medium, The computer readable medium stores a topic model-based related word analysis program, and the topic model-based related word analysis program is executed by the processor to implement the step of the above-described topic model-based related word analysis method.
相较于现有技术,本申请所提出的基于主题模型的关联词分析方法、电子装置及计算机可读存储介质,首先,在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;然后,基于主题模型训练待查询文本以训练出待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;接着,从概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。这样,不仅可以将网上开源的近义词同义词的词库直接使用在特定的专业领域,而且相对于现有的关联词分析方式这种基于主题模型的关联词分析方法的检索结果比较准确、且检索结果比较全面。Compared with the prior art, the topic model based related word analysis method, the electronic device and the computer readable storage medium proposed by the present application firstly, when the subject model needs to be modeled in a technical field, the corresponding advance in the technical field The determined database obtains the text to be queried in the technical field, and performs subject modeling on the acquired text to be acquired to obtain a topic model corresponding to each text to be queried; and then, based on the theme model, the text to be queried is trained to train the text to be queried to include The subject, and the probability distribution matrix of the probabilities of the words in the topics included in each topic; then, the subject vectors corresponding to the respective words are obtained from the probability distribution matrix, and the corresponding words are analyzed according to the preset related words weight analysis rules The relationship between the topic vectors to analyze the related words corresponding to the words to be retrieved. In this way, not only can the online open source synonym synonym lexicon be directly used in a specific professional field, but also the retrieval method based on the topic model-based related word analysis method is more accurate and the search result is more comprehensive than the existing related word analysis method. .
附图说明DRAWINGS
图1是本申请的基于主题模型的电子装置的硬件架构的示意图;1 is a schematic diagram of a hardware architecture of a subject model based electronic device of the present application;
图2是本申请的基于主题模型的关联词分析***的程序模块示意图;2 is a schematic diagram of program modules of a topic model-based related word analysis system of the present application;
图3是图2中的分析模块的硬件架构示意图;3 is a schematic diagram of a hardware architecture of the analysis module of FIG. 2;
图4为本申请基于主题模型的关联词分析方法的实施流程示意图;4 is a schematic diagram of an implementation process of a method for analyzing related words based on a topic model in the present application;
图5为图4中步骤S403的实施流程示意图。FIG. 5 is a schematic flow chart of the implementation of step S403 in FIG. 4.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The implementation, functional features and advantages of the present application will be further described with reference to the accompanying drawings.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本申请,并不用于限定本申请。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make the objects, technical solutions, and advantages of the present application more comprehensible, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the specific embodiments described herein are merely illustrative of the application and are not intended to be limiting. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present application without departing from the inventive scope are the scope of the present application.
参阅图1所示,是本申请电子装置的硬件架构的示意图。Referring to FIG. 1 , it is a schematic diagram of a hardware architecture of an electronic device of the present application.
本实施例中,电子装置1包括,但不仅限于,可通过***总线相互通信连接存储器11、处理器12、网络接口13。需要指出的是,图1仅示出了具有组件11-13的电子装置,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。In this embodiment, the electronic device 1 includes, but is not limited to, the memory 11, the processor 12, and the network interface 13 can be connected to each other through a system bus. It is to be noted that FIG. 1 only shows an electronic device having components 11-13, but it should be understood that not all illustrated components may be implemented and that more or fewer components may be implemented instead.
其中,存储器11至少包括一种类型的可读存储介质,可读存储介质包括闪存、硬盘、多媒体卡、卡型存储器(例如,SD或DX存储器等)、随机访问存储器(RAM)、静态随机访问存储器(SRAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、可编程只读存储器(PROM)、磁性存 储器、磁盘、光盘等。在一些实施例中,存储器11可以是电子装置1的内部存储单元,例如电子装置1的硬盘或内存。在另一些实施例中,存储器11也可以是电子装置1的外部存储设备,例如电子装置1上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。当然,存储器11还可以既包括电子装置1的内部存储单元也包括其外部存储设备。本实施例中,存储器11通常用于存储安装于电子装置1的操作***和各类应用软件,例如基于主题模型的关联词分析***200的程序代码等。此外,存储器11还可以用于暂时地存储已经输出或者将要输出的各类数据。The memory 11 includes at least one type of readable storage medium including a flash memory, a hard disk, a multimedia card, a card type memory (for example, SD or DX memory, etc.), a random access memory (RAM), and a static random access. Memory (SRAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), programmable read only memory (PROM), magnetic memory Storage, disk, CD, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a hard disk or a memory of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 1, a smart memory card (SMC), and a secure digital (Secure Digital, SD). ) cards, flash cards, etc. Of course, the memory 11 can also include both an internal storage unit of the electronic device 1 and an external storage device thereof. In this embodiment, the memory 11 is generally used to store an operating system installed in the electronic device 1 and various types of application software, such as program code of the related-word analysis system 200 based on the theme model. Further, the memory 11 can also be used to temporarily store various types of data that have been output or are to be output.
处理器12在一些实施例中可以是中央处理器(Central Processing Unit,CPU)、控制器、微控制器、微处理器、或其他数据处理芯片。处理器12通常用于控制电子装置1的总体操作,例如执行与电子装置1进行数据交互或者通信相关的控制和处理等。本实施例中,处理器12用于运行存储器11中存储的程序代码或者处理数据,例如运行基于主题模型的关联词分析***200等。Processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data processing chip in some embodiments. The processor 12 is generally used to control the overall operation of the electronic device 1, such as performing control and processing related to data interaction or communication with the electronic device 1. In this embodiment, the processor 12 is configured to run program code or process data stored in the memory 11, such as running a topic model based correlation word analysis system 200 or the like.
网络接口13可包括无线网络接口或有线网络接口,该网络接口13通常用于在电子装置1与其他电子设备之间建立通信连接。The network interface 13 may comprise a wireless network interface or a wired network interface, which is typically used to establish a communication connection between the electronic device 1 and other electronic devices.
在本申请的另一些实施例中,电子装置1还包括显示器(图1中未示出),显示器可以是LED显示器、液晶显示器、触控式液晶显示器以及OLED(Organic Light-Emitting Diode,有机发光二极管)触摸器等。显示器用于显示在电子装置1中处理的信息以及用于显示可视化的用户界面等。In other embodiments of the present application, the electronic device 1 further includes a display (not shown in FIG. 1 ), and the display may be an LED display, a liquid crystal display, a touch liquid crystal display, and an OLED (Organic Light-Emitting Diode). Diode) Toucher, etc. The display is used to display information processed in the electronic device 1 and a user interface or the like for displaying the visualization.
至此,己经详细介绍了本申请各个实施例的应用环境和相关设备的硬件结构和功能。下面,将基于上述应用环境和相关设备,提出本申请的各个实施例。So far, the application environment of the various embodiments of the present application and the hardware structure and functions of related devices have been described in detail. Hereinafter, various embodiments of the present application will be proposed based on the above-described application environment and related devices.
首先,本申请提出一种基于主题模型的关联词分析***200。First, the present application proposes a topic model based related word analysis system 200.
参阅图2所示,是本申请基于主题模型的关联词分析***200第一实施例的程序模块图。本实施例中,基于主题模型的关联词分析***200可以被分割成一个或多个模块,其中,一个或者多个模块被存储于存储器11中,并由一个或多个处理器(本实施例中为所述处理器12)所执行,以完成本申请。例如,在图2中,基于主题模型的关联词分析***200可以被分割成建模模块201、训练模块202、以及分析模块203。本申请所称的程序模块是指能够完成特定功能的一系列计算机程序指令段,比程序更适合于描述基于主题模型的关联词分析***200在电子装置1中的执行过程。以下将就各程序模块201-203的功能进行详细描述。Referring to FIG. 2, it is a program module diagram of the first embodiment of the related-word analysis system 200 based on the subject model of the present application. In this embodiment, the topic model based related word analysis system 200 can be divided into one or more modules, wherein one or more modules are stored in the memory 11 and are composed of one or more processors (in this embodiment Executed for the processor 12) to complete the application. For example, in FIG. 2, the topic model based related word analysis system 200 can be segmented into a modeling module 201, a training module 202, and an analysis module 203. The program module referred to in the present application refers to a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program to describe the execution process of the topic model based related word analysis system 200 in the electronic device 1. The function of each program module 201-203 will be described in detail below.
建模模块201,用于在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库(例如,该技术领域对应的论文库、博客文章库等)获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型。The modeling module 201 is configured to acquire a predetermined database corresponding to the technical field (for example, a corresponding paper library of the technical field, a blog article library, etc.) when the subject model needs to be modeled in a technical field. The text to be queried is subjected to topic modeling to obtain the topic model corresponding to each text to be queried.
在本申请的一个实施例中,可以根据该技术领域的应用场景,对待查询 文本进行编辑,以获得优质的待查询文本。In an embodiment of the present application, the query may be processed according to an application scenario in the technical field. Edit the text to get good quality text to be queried.
例如,若该技术领域为医疗领域,则以医疗领域的预先确定的数据库中的文本作为待查询文本,首先,根据医疗领域的核心关键词语,删除无实际意义的文本(例如,分析各个待查询文本中含有预先确定的医疗领域的核心关键词语的种类和对应的数量,若一个待查询文本中含有的核心关键词语的种类小于第一阈值(例如,2),含有的核心关键词语的总数量小于第二阈值(例如,2),则确定该文本为无意义的文本),排除干扰。在切词过程中仅保留名词和动词,删除一些形容词、助词等,例如删除“的”、“得”、“地”等排除干扰。For example, if the technical field is in the medical field, the text in the predetermined database in the medical field is used as the text to be queried. First, the text with no practical meaning is deleted according to the core keyword language in the medical field (for example, analyzing each query to be queried) The text contains a predetermined type of core keyword language in the medical field and a corresponding number. If the type of the core keyword language contained in a text to be queried is less than the first threshold (for example, 2), the total number of core keyword words is included. Less than the second threshold (eg, 2), the text is determined to be meaningless text), and interference is eliminated. In the process of cutting words, only the nouns and verbs are retained, and some adjectives, auxiliary words, etc. are deleted, for example, deleting "the", "de", "ground", etc. to eliminate interference.
通常,主题模型中,主题表示一个概念、一个方面,表现为一系列相关的单词,是这些单词的条件概率。形象来说,主题就是一个桶,里面装了出现概率较高的单词,这些单词与这个主题有很强的相关性。Usually, in a topic model, a topic represents a concept, an aspect, expressed as a series of related words, and is the conditional probability of these words. In terms of image, the theme is a bucket with words with high probability of occurrence. These words have a strong correlation with this theme.
进行主题建模之前需要一个语料库,在本实施例中,根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题建模的语料库。Before the topic modeling, a corpus is needed. In this embodiment, according to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text belongs is determined, and the determined corpus is used as the technical field. The corpus of the topic modeling.
训练模块202,用于基于主题模型训练待查询文本以训练出待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵。The training module 202 is configured to train the to-be-queried text based on the topic model to train a probability distribution matrix of the topics included in the text to be queried and the probability that the words in the included topics appear in the respective topics.
通常,在LDA主题模型中,每一个词语的生成过程都依赖于该词语所属的主题,也即通常一个词语和一个主题之间都有一个条件概率关系,该条件概率关系通常表示为:P(词语|主题)。用矩阵表示这样一个关系,则矩阵的行数等于主题的个数,列数等于所有词语的个数,那么矩阵的每一行便是在某一个主题下生成不同词语的概率分布。也即为基于主题模型训练某个待查询文本时,通常训练出待查询文本包含的主题对应的不同词语之间的概率分布矩阵。Generally, in the LDA topic model, the process of generating each word depends on the topic to which the word belongs, that is, usually there is a conditional probability relationship between a word and a topic. The conditional probability relationship is usually expressed as: P ( Words|themes). To represent such a relationship by a matrix, the number of rows of the matrix is equal to the number of topics, and the number of columns is equal to the number of all words. Then each row of the matrix is a probability distribution of generating different words under a certain topic. That is, when training a certain text to be queried based on the topic model, the probability distribution matrix between different words corresponding to the topic included in the text to be queried is usually trained.
在本实施例中,重点分析概率分布矩阵的每一列,则概率分布矩阵的每一列表示的是某个词语在某一个主题中出现的概率,将每一列对应的参数进行归一化之后,获得以词语为维度的各个词语对应的主题向量。In this embodiment, focusing on each column of the probability distribution matrix, each column of the probability distribution matrix represents the probability of occurrence of a certain word in a certain topic, and normalizing each parameter corresponding to each column to obtain The topic vector corresponding to each word in the dimension of the word.
分析模块203,用于根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。The analyzing module 203 is configured to analyze the relationship between the topic vectors corresponding to the respective words according to the preset related word weight analysis rules, so as to analyze the related words corresponding to the words to be searched.
其中,预设的关联词权重分析规则包括:The preset associated word weight analysis rules include:
分别计算待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语(所述其他词语指的是:所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语)对应的主题向量之间的欧式距离;Calculating, respectively, each of the other words corresponding to the subject vector corresponding to the word to be searched and the probability distribution matrix (the other words refer to: words other than the words to be searched in the words corresponding to the probability distribution matrix) Euclidean distance between corresponding theme vectors;
分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
将找出的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the found Euclidean distance are used as the related words of the word to be searched.
其中,其他词语指的是,概率分布矩阵对应的词语中,除待检索词语之外的词语。Among them, other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
本实施例利用主题模型LDA(Latent Dirichlet Allocation)对待查询的语料库的训练结果,将每个主题中词语的潜在概率分布抽象为词语到主题的概率 分布,并利用该分布计算各个词语对应的主题向量之间的欧式距离,进而根据各个词语对应的主题向量之间的欧式距离推算整个语料库中各个词语之间的关联关系。需要说明的是,本实施例中的特征即为词语。In this embodiment, the training result of the corpus to be queried by the topic model LDA (Latent Dirichlet Allocation) is used, and the potential probability distribution of words in each topic is abstracted into the probability of words to topics. The distribution is used to calculate the Euclidean distance between the topic vectors corresponding to each word, and then the relationship between the words in the entire corpus is calculated according to the Euclidean distance between the topic vectors corresponding to each word. It should be noted that the features in this embodiment are words.
在一优选的实施例中,如图3所示,是图2中分析模块203的硬件架构的示意图。由图3可知,分析模块203包括:计算单元301、比较单元302、关联词确定单元303。In a preferred embodiment, as shown in FIG. 3, is a schematic diagram of the hardware architecture of the analysis module 203 of FIG. As can be seen from FIG. 3, the analysis module 203 includes a calculation unit 301, a comparison unit 302, and a related word determination unit 303.
计算单元301,用于分别计算待检索词语对应的主题向量与概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离。The calculating unit 301 is configured to separately calculate the Euclidean distance between the topic vector corresponding to the word to be searched and the topic vector corresponding to each other word corresponding to the probability distribution matrix.
解析单元302,用于分析计算各个欧式距离之间的大小关系,找出最小的欧式距离。The parsing unit 302 is configured to analyze and calculate a size relationship between each Euclidean distance to find a minimum Euclidean distance.
关联词确定单元303,用于将找出的最小的欧式距离对应的其他词语作为该待检索词语的关联词。The related word determining unit 303 is configured to use other words corresponding to the found smallest Euclidean distance as related words of the to-be-searched word.
实施上述的基于主题模型的关联词分析***,首先,在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;然后,基于主题模型训练待查询文本以训练出待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;接着,从概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。这样,不仅可以将网上开源的近义词同义词的词库直接使用在特定的专业领域,而且相对于现有的关联词分析方式这种基于主题模型的关联词分析方法的检索结果比较准确、且检索结果比较全面。Implementing the above-mentioned topic model-based related-word analysis system, firstly, when subject modeling is required in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is acquired. Performing topic modeling to obtain a topic model corresponding to each text to be queried; then, training the text to be queried based on the topic model to train the theme included in the text to be queried, and the probability that the words in the included topic appear in each topic The probability distribution matrix is obtained. Then, the topic vector corresponding to each word is obtained from the probability distribution matrix, and the relationship between the topic vectors corresponding to each word is analyzed according to the preset related word weight analysis rules, so as to analyze the related words corresponding to the words to be searched. In this way, not only can the online open source synonym synonym lexicon be directly used in a specific professional field, but also the retrieval method based on the topic model-based related word analysis method is more accurate and the search result is more comprehensive than the existing related word analysis method. .
此外,本申请还提出一种基于主题模型的关联词分析方法。In addition, the present application also proposes a method for analyzing related words based on a topic model.
如图4所示,为本申请基于主题模型的关联词分析方法实施流程示意图。由图4可知,本申请基于主题模型的关联词分析方法包括如下步骤S401至步骤S403。As shown in FIG. 4, it is a schematic diagram of an implementation process of a related-word analysis method based on a topic model in the present application. As can be seen from FIG. 4, the method for analyzing related words based on the topic model of the present application includes the following steps S401 to S403.
步骤S401,在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库(例如,该技术领域对应的论文库、博客文章库等)获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型。Step S401, when subject modeling is required in a technical field, obtaining a to-be-queried text in the technical field from a predetermined database corresponding to the technical domain (for example, a paper library corresponding to the technical field, a blog article library, etc.) The subject of the acquired text to be queried is modeled to obtain a topic model corresponding to each text to be queried.
在本申请的一个实施例中,可以根据该技术领域的应用场景,对待查询文本进行编辑,以获得优质的待查询文本。In an embodiment of the present application, the query text may be edited according to an application scenario in the technical field to obtain a high-quality text to be queried.
例如,若该技术领域为医疗领域,则以医疗领域的预先确定的数据库中的文本作为待查询文本,首先,根据医疗领域的核心关键词语,删除无实际意义的文本(例如,分析各个待查询文本中含有预先确定的医疗领域的核心关键词语的种类和对应的数量,若一个待查询文本中含有的核心关键词语的种类小于第一阈值(例如,2),含有的核心关键词语的总数量小于第二阈值(例如,2),则确定该文本为无意义的文本),排除干扰。在切词过程中仅保留名词和动词,删除一些形容词、助词等,例如删除“的”、“得”、“地”等排除 干扰。通常,主题模型中,主题表示一个概念、一个方面,表现为一系列相关的单词,是这些单词的条件概率。形象来说,主题就是一个桶,里面装了出现概率较高的单词,这些单词与这个主题有很强的相关性。For example, if the technical field is in the medical field, the text in the predetermined database in the medical field is used as the text to be queried. First, the text with no practical meaning is deleted according to the core keyword language in the medical field (for example, analyzing each query to be queried) The text contains a predetermined type of core keyword language in the medical field and a corresponding number. If the type of the core keyword language contained in a text to be queried is less than the first threshold (for example, 2), the total number of core keyword words is included. Less than the second threshold (eg, 2), the text is determined to be meaningless text), and interference is eliminated. In the process of cutting words, only retain nouns and verbs, delete some adjectives, auxiliary words, etc., such as deleting "", "得", "地", etc. interference. Usually, in a topic model, a topic represents a concept, an aspect, expressed as a series of related words, and is the conditional probability of these words. In terms of image, the theme is a bucket with words with high probability of occurrence. These words have a strong correlation with this theme.
进行主题建模之前需要一个语料库,在本实施例中,根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题建模的语料库。Before the topic modeling, a corpus is needed. In this embodiment, according to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text belongs is determined, and the determined corpus is used as the technical field. The corpus of the topic modeling.
步骤S402,基于主题模型训练待查询文本以训练出待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵。Step S402, the text to be queried is trained based on the topic model to train a probability distribution matrix of the subject included in the text to be queried and the probability that the words in the included subject appear in each topic.
通常,在LDA主题模型中,每一个词语的生成过程都依赖于该词语所属的主题,也即通常一个词语和一个主题之间都有一个条件概率关系,该条件概率关系通常表示为:P(词语|主题)。用矩阵表示这样一个关系,则矩阵的行数等于主题的个数,列数等于所有词语的个数,那么矩阵的每一行便是在某一个主题下生成不同词语的概率分布。也即为基于主题模型训练某个待查询文本时,通常训练出待查询文本包含的主题鱼哥哥主题对应的不同词语之间的概率分布矩阵。Generally, in the LDA topic model, the process of generating each word depends on the topic to which the word belongs, that is, usually there is a conditional probability relationship between a word and a topic. The conditional probability relationship is usually expressed as: P ( Words|themes). To represent such a relationship by a matrix, the number of rows of the matrix is equal to the number of topics, and the number of columns is equal to the number of all words. Then each row of the matrix is a probability distribution of generating different words under a certain topic. That is, when training a certain text to be queried based on the theme model, the probability distribution matrix between different words corresponding to the theme of the theme fish brother included in the text to be queried is usually trained.
在本实施例中,重点分析概率分布矩阵的每一列,则概率分布矩阵的每一列表示的是某个词语在某一个主题中出现的概率,进一步,将每一列对应的参数进行归一化之后,获得以词语为维度的各个词语对应的主题向量。In this embodiment, focusing on each column of the probability distribution matrix, each column of the probability distribution matrix represents the probability that a certain word appears in a certain topic, and further, after normalizing the parameters corresponding to each column , to obtain the theme vector corresponding to each word in the dimension of the word.
步骤S403,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。Step S403, analyzing the relationship between the topic vectors corresponding to each word according to the preset related word weight analysis rule, and analyzing the related words corresponding to the words to be searched.
其中,预设的关联词权重分析规则包括:The preset associated word weight analysis rules include:
分别计算待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语(所述其他词语指的是:所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语)对应的主题向量之间的欧式距离;Calculating, respectively, each of the other words corresponding to the subject vector corresponding to the word to be searched and the probability distribution matrix (the other words refer to: words other than the words to be searched in the words corresponding to the probability distribution matrix) Euclidean distance between corresponding theme vectors;
分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
将找出的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the found Euclidean distance are used as the related words of the word to be searched.
其中,其他词语指的是,概率分布矩阵对应的词语中,除待检索词语之外的词语。Among them, other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
本实施例利用主题模型LDA(Latent Dirichlet Allocation)对待查询的语料库的训练结果,将每个主题中词语的潜在概率分布抽象为词语到主题的概率分布,并利用该分布计算各个词语对应的主题向量之间的欧式距离,进而根据各个词语对应的主题向量之间的欧式距离推算整个语料库中各个词语之间的关联关系。需要说明的是,本实施例中的特征即为词语。In this embodiment, the training result of the corpus to be queried by the topic model LDA (Latent Dirichlet Allocation) is used, and the potential probability distribution of the words in each topic is abstracted into a probability distribution of words to topics, and the distribution is used to calculate the topic vector corresponding to each word. The Euclidean distance between the Euclidean distances is used to calculate the relationship between the words in the entire corpus according to the Euclidean distance between the subject vectors corresponding to each word. It should be noted that the features in this embodiment are words.
在一优选的实施例中,如图5所示,是图4中步骤S403的实施流程示意图。由图5可知,步骤S403在一是实施例中具体包括如下步骤S501至步骤S503。In a preferred embodiment, as shown in FIG. 5, it is a schematic flowchart of the implementation of step S403 in FIG. As shown in FIG. 5, step S403 specifically includes the following steps S501 to S503 in an embodiment.
步骤S501,分别计算待检索词语对应的主题向量与概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离。Step S501, respectively calculating the Euclidean distance between the topic vector corresponding to the word to be retrieved and the topic vector corresponding to each other word corresponding to the probability distribution matrix.
步骤S502,分析计算各个欧式距离之间的大小关系,找出最小的欧式距离。 Step S502, analyzing and calculating the size relationship between the various Euclidean distances, and finding the smallest Euclidean distance.
步骤S503,将找出的最小的欧式距离对应的其他词语作为该待检索词语的关联词。Step S503, the other words corresponding to the found smallest Euclidean distance are used as related words of the to-be-searched word.
实施上述的基于主题模型的关联词分析方法,Implementing the above-described topic model-based method for analyzing related words,
首先,在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;然后,基于主题模型训练待查询文本以训练出待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;接着,从概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。这样,不仅可以将网上开源的近义词同义词的词库直接使用在特定的专业领域,而且相对于现有的关联词分析方式这种基于主题模型的关联词分析方法的检索结果比较准确、且检索结果比较全面。First, when a subject model needs to be modeled in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried. Corresponding topic model; then, training the text to be queried based on the topic model to train the subject included in the text to be queried, and the probability distribution matrix of the probability that the words in the included subject appear in each topic; and then, from the probability distribution matrix Obtaining the topic vector corresponding to each word, and analyzing the relationship between the topic vectors corresponding to each word according to the preset related word weight analysis rule, so as to analyze the related words corresponding to the word to be searched. In this way, not only can the online open source synonym synonym lexicon be directly used in a specific professional field, but also the retrieval method based on the topic model-based related word analysis method is more accurate and the search result is more comprehensive than the existing related word analysis method. .
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。The serial numbers of the embodiments of the present application are merely for the description, and do not represent the advantages and disadvantages of the embodiments.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the foregoing embodiment method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be through hardware, but in many cases, the former is better. Implementation. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product stored in a storage medium (such as ROM/RAM, disk, The optical disc includes a number of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the methods described in various embodiments of the present application.
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。 The above is only a preferred embodiment of the present application, and is not intended to limit the scope of the patent application, and the equivalent structure or equivalent process transformations made by the specification and the drawings of the present application, or directly or indirectly applied to other related technical fields. The same is included in the scope of patent protection of this application.

Claims (20)

  1. 一种基于主题模型的关联词分析方法,其特征在于,所述方法包括如下步骤:A method for analyzing related words based on a topic model, characterized in that the method comprises the following steps:
    A、在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;A. When the subject model needs to be modeled in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried. Corresponding theme model;
    B、基于所述主题模型训练所述待查询文本以训练出所述待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;B. Train the to-be-queried text based on the topic model to train a probability distribution matrix of a topic included in the text to be queried, and a probability that a word in the included topic appears in each topic;
    C、从所述概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。C. Obtain a topic vector corresponding to each word from the probability distribution matrix, and analyze a relationship between topic vectors corresponding to each word according to a preset related word weight analysis rule to analyze related words corresponding to the word to be searched.
  2. 根据权利要求1所述的主题模型的关联词分析方法,其特征在于,从所述概率分布矩阵中获取各个词语对应的主题向量包括:The related-word analysis method of the topic model according to claim 1, wherein the obtaining the topic vector corresponding to each word from the probability distribution matrix comprises:
    对所述概率分布矩阵中的每一列对应的参数进行归一化,从而获得以词语为维度的各个词语对应的主题向量。The parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
  3. 根据权利要求1所述的主题模型的关联词分析方法,其特征在于,所述预设的关联词权重分析规则包括:The method for analyzing related words of a topic model according to claim 1, wherein the preset associated word weight analysis rules comprise:
    分别计算所述待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离;Calculating, respectively, an Euclidean distance between a topic vector corresponding to the to-be-searched word and a topic vector corresponding to each other word corresponding to the probability distribution matrix;
    分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
    将找出的所述最小的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
  4. 根据权利要求3所述的主题模型的关联词分析方法,其特征在于,所述其他词语指的是,所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语。The method for analyzing related words of a topic model according to claim 3, wherein the other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
  5. 根据权利要求1所述的主题模型的关联词分析方法,其特征在于,在所述步骤A之前还包括如下步骤:The method for analyzing a related word of a topic model according to claim 1, further comprising the following steps before the step A:
    根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题模型的语料库。According to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
  6. 一种电子装置,其特征在于,所述电子装置包括:存储器、处理器,所述存储器上存储有可在所述处理器上运行的基于主题模型的关联词分析***,所述基于主题模型的关联词分析***被所述处理器执行时实现如下操作:An electronic device, comprising: a memory, a processor, on the memory, a topic model-based related word analysis system executable on the processor, the topic model-based related word When the analysis system is executed by the processor, the following operations are implemented:
    S1、在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;S1. When a subject model needs to be modeled in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried. Corresponding theme model;
    S2、基于所述主题模型训练所述待查询文本以训练出所述待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵; S2, training the to-be-queried text based on the topic model to train a probability distribution matrix of a topic included in the text to be queried, and a probability that a word in the included topic appears in each topic;
    S3、从所述概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。S3. Obtain a topic vector corresponding to each word from the probability distribution matrix, and analyze a relationship between topic vectors corresponding to each word according to a preset related word weight analysis rule to analyze related words corresponding to the word to be searched.
  7. 根据权利要求6所述的电子装置,其特征在于,所述处理器执行基于主题模型的关联词分析***实现从所述主题特征概率分布矩阵中获取各个词语对应的主题向量的操作包括:The electronic device according to claim 6, wherein the performing, by the processor, the topic model-based related word analysis system, the obtaining the topic vector corresponding to each word from the topic feature probability distribution matrix comprises:
    对所述概率分布矩阵中的每一列对应的参数进行归一化,从而获得以词语为维度的各个词语对应的主题向量。The parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
  8. 根据权利要求6所述的电子装置,其特征在于,所述处理器执行基于主题模型的关联词分析***实现所述预设的关联词权重分析规则的操作包括:The electronic device according to claim 6, wherein the performing, by the processor, the topic model-based related word analysis system to implement the preset related word weight analysis rule comprises:
    分别计算所述待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离;Calculating, respectively, an Euclidean distance between a topic vector corresponding to the to-be-searched word and a topic vector corresponding to each other word corresponding to the probability distribution matrix;
    分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
    将找出的所述最小的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
  9. 根据权利要求8所述的电子装置,其特征在于,所述其他词语指的是,所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语。The electronic device according to claim 8, wherein the other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
  10. 根据权利要求6所述的电子装置,其特征在于,所述处理器执行基于主题模型的关联词分析***实现步骤S1之前,还实现如下操作:The electronic device according to claim 6, wherein the processor performs the following steps before the step S1 is implemented by the topic model-based related word analysis system:
    根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题模型的语料库。According to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有基于主题模型的关联词分析***,所述基于主题模型的关联词分析***被处理器执行时实现如下步骤:A computer readable storage medium, characterized in that the computer readable storage medium stores a topic model based related word analysis system, and the topic model based related word analysis system is executed by a processor to implement the following steps:
    A、在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;A. When the subject model needs to be modeled in a technical field, the text to be queried in the technical field is obtained from a predetermined database corresponding to the technical field, and the acquired text to be queried is subjected to topic modeling to obtain each text to be queried. Corresponding theme model;
    B、基于所述主题模型训练所述待查询文本以训练出所述待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;B. Train the to-be-queried text based on the topic model to train a probability distribution matrix of a topic included in the text to be queried, and a probability that a word in the included topic appears in each topic;
    C、从所述概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。C. Obtain a topic vector corresponding to each word from the probability distribution matrix, and analyze a relationship between topic vectors corresponding to each word according to a preset related word weight analysis rule to analyze related words corresponding to the word to be searched.
  12. 根据权利要求11所述的计算机可读存储介质,其特征在于,从所述概率分布矩阵中获取各个词语对应的主题向量包括:The computer readable storage medium according to claim 11, wherein the obtaining the topic vector corresponding to each word from the probability distribution matrix comprises:
    对所述概率分布矩阵中的每一列对应的参数进行归一化,从而获得以词语为维度的各个词语对应的主题向量。The parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
  13. 根据权利要求11所述的计算机可读存储介质,其特征在于,所述预 设的关联词权重分析规则包括:A computer readable storage medium according to claim 11 wherein said pre-preparation The associated word weight analysis rules include:
    分别计算所述待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离;Calculating, respectively, an Euclidean distance between a topic vector corresponding to the to-be-searched word and a topic vector corresponding to each other word corresponding to the probability distribution matrix;
    分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
    将找出的所述最小的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
  14. 根据权利要求13所述的计算机可读存储介质,其特征在于,所述其他词语指的是,所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语。The computer readable storage medium according to claim 13, wherein the other words refer to words other than the words to be retrieved among words corresponding to the probability distribution matrix.
  15. 根据权利要求11所述的计算机可读存储介质,其特征在于,在所述步骤A之前还包括如下步骤:The computer readable storage medium according to claim 11, further comprising the following steps before said step A:
    根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题模型的语料库。According to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
  16. 一种基于主题模型的关联词分析***,其特征在于,包括:A related word analysis system based on a topic model, characterized in that it comprises:
    建模模块,用于在需要对一个技术领域进行主题建模时,从该技术领域对应的预先确定的数据库获取该技术领域的待查询文本,对获取的待查询文本进行主题建模,以获取各个待查询文本对应的主题模型;a modeling module, configured to acquire a text to be queried in the technical domain from a predetermined database corresponding to the technical field when the subject is required to be modeled in a technical field, and subject the acquired text to be queried to obtain a topic model corresponding to each text to be queried;
    训练模块,用于基于所述主题模型训练所述待查询文本以训练出所述待查询文本包含的主题、及包含的主题中的词语在各个主题中出现的概率的概率分布矩阵;a training module, configured to train the to-be-queried text based on the topic model to train a probability distribution matrix of a theme included in the text to be queried, and a probability that a word in the included topic appears in each topic;
    分析模块,用于从所述概率分布矩阵中获取各个词语对应的主题向量,根据预设的关联词权重分析规则分析各个词语对应的主题向量之间的关系,以分析出待检索词语对应的关联词。The analysis module is configured to obtain a topic vector corresponding to each word from the probability distribution matrix, and analyze a relationship between the topic vectors corresponding to each word according to a preset related word weight analysis rule to analyze the related word corresponding to the word to be searched.
  17. 根据权利要求16所述的基于主题模型的关联词分析***,其特征在于,从所述概率分布矩阵中获取各个词语对应的主题向量包括:The topic model-based related word analysis system according to claim 16, wherein the obtaining the topic vector corresponding to each word from the probability distribution matrix comprises:
    对所述概率分布矩阵中的每一列对应的参数进行归一化,从而获得以词语为维度的各个词语对应的主题向量。The parameters corresponding to each column in the probability distribution matrix are normalized to obtain a topic vector corresponding to each word in the dimension of the word.
  18. 根据权利要求16所述的基于主题模型的关联词分析***,其特征在于,所述预设的关联词权重分析规则包括:The topic model-based related word analysis system according to claim 16, wherein the preset related word weight analysis rules comprise:
    分别计算所述待检索词语对应的主题向量与所述概率分布矩阵对应的各个其他词语对应的主题向量之间的欧式距离;Calculating, respectively, an Euclidean distance between a topic vector corresponding to the to-be-searched word and a topic vector corresponding to each other word corresponding to the probability distribution matrix;
    分析计算的各个欧式距离之间的大小关系,找出最小的欧式距离;Analyze the calculated size relationship between the various Euclidean distances to find the smallest Euclidean distance;
    将找出的所述最小的欧式距离对应的其他词语作为该待检索词语的关联词。The other words corresponding to the smallest Euclidean distance found are used as the related words of the word to be searched.
  19. 根据权利要求18所述的基于主题模型的关联词分析***,其特征在于,所述其他词语指的是,所述概率分布矩阵对应的词语中,除所述待检索词语之外的词语。The topic model-based related word analysis system according to claim 18, wherein the other words refer to words other than the words to be retrieved among the words corresponding to the probability distribution matrix.
  20. 根据权利要求16所述的基于主题模型的关联词分析***,其特征在 于,还包括:The topic model based related word analysis system according to claim 16, characterized in that It also includes:
    根据预先确定的技术领域与语料库的映射关系,确定获取的待查询文本所属的技术领域对应的语料库,并将确定的语料库作为该技术领域的主题模型的语料库。 According to the mapping relationship between the predetermined technical field and the corpus, the corpus corresponding to the technical domain to which the acquired text to be queried belongs is determined, and the determined corpus is used as a corpus of the subject model of the technical field.
PCT/CN2017/113720 2017-11-01 2017-11-30 Topic model-based associated word analysis method, and electronic apparatus and storage medium WO2019085118A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711059225.4 2017-11-01
CN201711059225.4A CN108052520A (en) 2017-11-01 2017-11-01 Conjunctive word analysis method, electronic device and storage medium based on topic model

Publications (1)

Publication Number Publication Date
WO2019085118A1 true WO2019085118A1 (en) 2019-05-09

Family

ID=62118863

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/113720 WO2019085118A1 (en) 2017-11-01 2017-11-30 Topic model-based associated word analysis method, and electronic apparatus and storage medium

Country Status (2)

Country Link
CN (1) CN108052520A (en)
WO (1) WO2019085118A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111382566B (en) * 2018-12-28 2024-05-24 北京搜狗科技发展有限公司 Site theme determining method and device and electronic equipment
CN110413737B (en) * 2019-07-29 2022-10-14 腾讯科技(深圳)有限公司 Synonym determination method, synonym determination device, server and readable storage medium
CN115730592A (en) * 2022-11-30 2023-03-03 贵州电网有限责任公司信息中心 Power grid redundant data elimination method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831234A (en) * 2012-08-31 2012-12-19 北京邮电大学 Personalized news recommendation device and method based on news content and theme feature
CN103425799A (en) * 2013-09-04 2013-12-04 北京邮电大学 Personalized research direction recommending system and method based on themes
CN103440329A (en) * 2013-09-04 2013-12-11 北京邮电大学 Authoritative author and high-quality paper recommending system and recommending method
CN106897276A (en) * 2015-12-17 2017-06-27 中国科学院深圳先进技术研究院 A kind of internet data clustering method and system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8326820B2 (en) * 2009-09-30 2012-12-04 Microsoft Corporation Long-query retrieval
CN103699625B (en) * 2013-12-20 2017-05-10 北京百度网讯科技有限公司 Method and device for retrieving based on keyword
CN105224521B (en) * 2015-09-28 2018-05-25 北大方正集团有限公司 Key phrases extraction method and the method and device using its acquisition correlated digital resource
CN105955948B (en) * 2016-04-22 2018-07-24 武汉大学 A kind of short text theme modeling method based on semanteme of word similarity
CN106202177B (en) * 2016-06-27 2017-12-15 腾讯科技(深圳)有限公司 A kind of file classification method and device
CN106202294B (en) * 2016-07-01 2020-09-11 北京奇虎科技有限公司 Related news computing method and device based on keyword and topic model fusion
CN106844424B (en) * 2016-12-09 2020-11-03 宁波大学 LDA-based text classification method
CN107220232B (en) * 2017-04-06 2021-06-11 北京百度网讯科技有限公司 Keyword extraction method and device based on artificial intelligence, equipment and readable medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102831234A (en) * 2012-08-31 2012-12-19 北京邮电大学 Personalized news recommendation device and method based on news content and theme feature
CN103425799A (en) * 2013-09-04 2013-12-04 北京邮电大学 Personalized research direction recommending system and method based on themes
CN103440329A (en) * 2013-09-04 2013-12-11 北京邮电大学 Authoritative author and high-quality paper recommending system and recommending method
CN106897276A (en) * 2015-12-17 2017-06-27 中国科学院深圳先进技术研究院 A kind of internet data clustering method and system

Also Published As

Publication number Publication date
CN108052520A (en) 2018-05-18

Similar Documents

Publication Publication Date Title
CN110502621B (en) Question answering method, question answering device, computer equipment and storage medium
US20210319032A1 (en) Systems and methods for contextual retrieval and contextual display of records
US11748501B2 (en) Tagging documents with security policies
US9135240B2 (en) Latent semantic analysis for application in a question answer system
WO2019136993A1 (en) Text similarity calculation method and device, computer apparatus, and storage medium
US9864741B2 (en) Automated collective term and phrase index
US9361587B2 (en) Authoring system for bayesian networks automatically extracted from text
KR20200094627A (en) Method, apparatus, device and medium for determining text relevance
WO2019041521A1 (en) Apparatus and method for extracting user keyword, and computer-readable storage medium
JP2020135853A (en) Method, apparatus, electronic device, computer readable medium, and computer program for determining descriptive information
CN110162771B (en) Event trigger word recognition method and device and electronic equipment
CN112651236B (en) Method and device for extracting text information, computer equipment and storage medium
CN108427702B (en) Target document acquisition method and application server
CN110750627A (en) Material retrieval method and device, electronic equipment and storage medium
WO2019085118A1 (en) Topic model-based associated word analysis method, and electronic apparatus and storage medium
CN111553556A (en) Business data analysis method and device, computer equipment and storage medium
WO2020233381A1 (en) Speech recognition-based service request method and apparatus, and computer device
WO2023029513A1 (en) Artificial intelligence-based search intention recognition method and apparatus, device, and medium
EP3425531A1 (en) System, method, electronic device, and storage medium for identifying risk event based on social information
CN115544214B (en) Event processing method, device and computer readable storage medium
CN116383412A (en) Functional point amplification method and system based on knowledge graph
WO2021056740A1 (en) Language model construction method and system, computer device and readable storage medium
CN114218431A (en) Video searching method and device, electronic equipment and storage medium
JP2024518458A (en) System and method for automatic topic detection in text
CN114118072A (en) Document structuring method and device, electronic equipment and computer readable storage medium

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/09/2020)

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17930544

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17930544

Country of ref document: EP

Kind code of ref document: A1