WO2017215244A1 - 提供相关词的方法和装置 - Google Patents

提供相关词的方法和装置 Download PDF

Info

Publication number
WO2017215244A1
WO2017215244A1 PCT/CN2016/113175 CN2016113175W WO2017215244A1 WO 2017215244 A1 WO2017215244 A1 WO 2017215244A1 CN 2016113175 W CN2016113175 W CN 2016113175W WO 2017215244 A1 WO2017215244 A1 WO 2017215244A1
Authority
WO
WIPO (PCT)
Prior art keywords
word
keyword
word set
related word
words
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/113175
Other languages
English (en)
French (fr)
Inventor
李贤�
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Shiyuan Electronics Thecnology Co Ltd
Original Assignee
Guangzhou Shiyuan Electronics Thecnology Co Ltd
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 Guangzhou Shiyuan Electronics Thecnology Co Ltd filed Critical Guangzhou Shiyuan Electronics Thecnology Co Ltd
Publication of WO2017215244A1 publication Critical patent/WO2017215244A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis

Definitions

  • the present invention relates to the field of computer technologies, and in particular, to a method and apparatus for providing related words.
  • the shopping website and the search engine service website provide the keyword search function, that is, the user inputs the keyword of the product or technology that is to be searched, and the server searches for the corresponding result according to the keyword and returns it to the user.
  • the server In order to provide accurate search results, the server generally expands the keyword, that is, according to the keyword input by the user, finds the relevant word corresponding to the keyword, and provides the related word found to the user, and searches for the keyword through the keyword.
  • the search is based on the related words.
  • the existing related word expansion is extended by existing dictionaries, such as WordNet, "Synonym Lin", and the related words obtained in this way are quite limited in number, and the related words obtained may not keep up with the language.
  • the developmental changes cannot meet the requirements of timeliness of related words.
  • Embodiments of the present invention provide a method and apparatus for providing related words, which can provide a more and more accurate related words.
  • Taking a keyword input by the user as an input word acquiring a lower related word set of the keyword from the vocabulary database, and determining a relevance of each lower related word in the lower related word set to the keyword;
  • the relevant related words are selected to select related words provided to the user.
  • the episode related word set of the keyword is obtained from the vocabulary database according to the lower related word set of the keyword, and each of the upper related word sets is determined.
  • the relevance of the related words to the keywords is specifically:
  • the input word is updated by the lower-level related word, and the lower-level related word set of the updated input word is obtained from the entry database;
  • the lower related word set including the keyword is selected from the lower related word set, and the input word corresponding to the lower related word set including the keyword is used as the upper related word to obtain the keyword.
  • a correlation word set wherein, the degree of relevance of the keyword corresponding to the lower-level related word set in the lower-level related word set including the keyword, as the input word is used as a superordinate related word The relevance of the keyword;
  • the manner of obtaining the lower related word set from the entry database includes:
  • an entry containing the to-be-recognized related words is obtained from the entry database, and the related to-be-tested correlation is The entry of the word is subjected to word segmentation and screening, and the control word set of the related word to be tested is obtained;
  • the to-be-relevant related word is a lower related word of the input word, and obtains a lower related word a set; wherein the absolute value is used as a correlation between the lower related word and the keyword.
  • the entry containing the input word is obtained from the vocabulary database, and the word is segmented and filtered, and the related word set is obtained, specifically including :
  • the control word set of the relevant words to be tested includes:
  • a word belonging to the core word in the user dictionary is extracted from the second word set as a control word, and a control word set is obtained.
  • the obtaining method further includes:
  • the correlation threshold of each of the superordinate related words in the superordinate related word set of the keyword and the keyword is subtracted from the screening threshold, and the normalization of the correlation degree is completed.
  • the implementation of the present invention further provides an apparatus for providing related words, including:
  • a lower-level related word set module configured to use a keyword input by a user as an input word, obtain a lower-level related word set of the keyword from a vocabulary database, and determine each lower-level related word and place in the lower-level related word set The relevance of the keywords;
  • a superordinate related word set module configured to acquire a superordinate related word set of the keyword from a vocabulary database according to a lower related word set of the keyword, and determine each superordinate related word in the episode related word set The relevance of the keyword;
  • a related word set module configured to use a union of a lower related word set and a superordinate related word set of the keyword as an output related word set of the keyword, and output related according to each of the output related word sets The relevance of the word, the related words provided to the user are selected in the output related word set.
  • the upper related word set module specifically includes: a lower word set obtaining unit, a threshold value determining unit, and a higher word set obtaining unit, wherein
  • the lower word set obtaining unit is configured to update each input word with the lower related word for each lower related word in the lower related word set, and obtain the lower related word set of the updated input word from the entry database ;
  • the threshold determining unit is configured to determine whether the total number of the lower related word sets is greater than a preset threshold
  • the upper word set obtaining unit is configured to: when determining that the total number of the lower related word sets is greater than a preset threshold, select a lower related word set including the keyword from the lower related word set, and include the The lower related words of the keyword Corresponding input words are used as superordinate related words to obtain a set of superordinate related words of the keyword; wherein, the input words corresponding to the keywords in the lower related word set including the keyword and the lower related related words set Correlation degree as the relevance of the input word to the keyword when it is a superordinate related word;
  • the lower word acquiring unit is further configured to: when determining that the total number of the lower related word sets is less than a preset threshold, continue to perform the following operations: for each lower related word in the lower related word set of the updated input words, The lower related words update the input words again, and obtain the lower related words of the newly updated input words from the entry database until the total number of the lower related words is greater than a preset threshold.
  • the lower related word set module and the lower word set obtaining unit further comprise a unit for acquiring a lower related word set from the entry database, specifically:
  • the related word set unit is configured to obtain an entry including the input word from the vocabulary database according to the input word, and perform word segmentation and screening on the term, and obtain a related word set to be tested;
  • a comparison word set unit configured to acquire, for each of the to-be-recognized related words in the to-be-tested related word set, an entry including the to-be-tested related word from the entry database according to the inquiring related word, And performing word segmentation and screening on the words of the related words to be inspected, and obtaining a comparison word set of the related words to be tested;
  • a judgment obtaining unit configured to determine, when the absolute value of the intersection of the control word set of the to-be-tested related word and the to-be-tested related word set is greater than a screening threshold, the in-relevant related word is a lower correlation of the input word a word, obtaining a lower related word set; wherein the absolute value is used as a relevance of the lower related word to the keyword.
  • the unit of the related words to be tested specifically includes:
  • a first lexical sub-unit configured to obtain, from the vocabulary database, an entry that includes the input word and is sorted before the Mth position according to the input word;
  • a first adjustment subunit configured to perform format adjustment on the obtained entry according to a standard entry format
  • the first call subunit is used to call the word segmentation tool
  • a first word segment sub-unit configured to perform word segmentation on the format-adjusted term by using the word segmentation tool to obtain a first word set
  • a first extracting subunit configured to extract a word belonging to a core word in a user word from the first word set as a related word to be tested, to obtain a related word set to be tested;
  • the user dictionary is a word segmentation tool which provided;
  • control word set unit specifically includes:
  • a second term sub-unit configured to obtain, according to the to-be-tested related words, an entry that includes the to-be-tested related words and is sorted before the Mth position;
  • a second adjustment subunit configured to perform format adjustment on the term that includes the to-be-recognized related word and is sorted before the Mth position according to the standard entry format
  • a second calling subunit configured to invoke the word segmentation tool
  • a second word segment sub-unit configured to perform word segmentation on the format-adjusted term containing the to-be-tested related words and sorted before the Mth position by using the word segmentation tool to obtain a second word set;
  • a second extraction subunit configured to obtain a comparison word set according to a word extracted from the second word set and belonging to a core word in the user dictionary as a control word.
  • the apparatus for providing related words further includes a normalization module:
  • the normalization module is configured to subtract the relevance of each of the lower related words in the lower related word set of the keyword from the keyword by the screening threshold; and to use the keyword
  • the correlation between each of the superordinate related words in the epistem-related word set and the keyword is subtracted from the screening threshold, and the normalization of the correlation is completed.
  • the method and device for providing a related word provided by an embodiment of the present invention obtains a lower related word set of the keyword from a vocabulary database by using a keyword provided by a user, and then, according to the lower related word set, the keyword is extracted.
  • the episode of related words, and finally the union of the lower related words and the episodes as the output related words of the keyword can expand a large number of related words to provide for user selection, and further, by determining related words Relevance can be accurately described as the degree of correlation between related words and keywords, and subsequent related words can be selected according to the relevance of related words, and can be accurately described by the relevance of related words.
  • Provide related words can be accurately described as the degree of correlation between related words and keywords, and subsequent related words can be selected according to the relevance of related words, and can be accurately described by the relevance of related words.
  • FIG. 1 is a schematic flow chart of an embodiment of a method for providing related words provided by the present invention
  • step S2 is a schematic flow chart of an embodiment of step S2 of the method for providing related words provided in FIG. 1;
  • step S3 is a schematic flow chart of an implementation of step S3 of the method for providing related words provided by FIG. 1;
  • FIG. 4 is a schematic flow chart of another embodiment of a method for providing related words provided by the present invention.
  • FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for providing related words according to the present invention.
  • FIG. 6 is a schematic structural diagram of an embodiment of a superordinate related word set module of a device for providing related words according to the present invention
  • FIG. 7 is a schematic structural diagram of an embodiment of a unit for acquiring a lower related word set of the apparatus for providing related words provided by the present invention.
  • FIG. 8 is a schematic structural diagram of an embodiment of a to-be-relevant related word set unit of a device for providing related words according to the present invention.
  • FIG. 9 is a schematic structural diagram of an embodiment of a control word set unit of the apparatus for providing related words provided by the present invention.
  • FIG. 1 is a schematic flowchart of an embodiment of a method for providing related words provided by the present invention
  • FIG. 2 is an embodiment of step S2 of the method for providing related words provided by FIG. 1
  • FIG. 3 is a schematic flow chart of an implementation of step S3 of the method for providing related words provided in FIG. 1 .
  • the paper database for example, China Knowledge Network
  • the related words of the keyword Java are obtained as an example, and the method for providing related words in the embodiment is described in detail, and the method includes the following step:
  • Step S1 using the keyword Java input by the user as an input word, obtaining a lower-level related word set of the keyword Java from the entry database, and determining the relevance of each lower-level related word in the lower-level related word set to the keyword .
  • Step S1 includes steps S11 to S13, as follows:
  • the search engine to obtain, according to the input word Java, the entry containing the input word Java and sorted before the Mth position, for example, the first 50 pages of the abstract as a term, or searching for keywords in the wiki The first 500 abstracts of Java;
  • Formatting the terms according to the standard entry format for example, unifying lowercase in the entry into uppercase, deleting extra spaces in the entry, punctuation in the unified entry, or formatting the entry in full-width or The half-width format is unified into one type.
  • the word segmentation tool is called; preferably, the word segmentation tool is a jieba word segmentation tool, but is not limited to this word segmentation tool.
  • Extracting, according to the keyword extraction algorithm, words related to the input words from the first word set as related words ⁇ a 1 , . . . , a n ⁇ to obtain a related word set A ⁇ a 1 ,... , a n ⁇ .
  • the core word can be extracted from the first word set as a related word to be tested by using a word segmentation tool or by adding a dictionary through the device providing the related word.
  • the terms of the related words are segmented and screened for the words of the related words to be inspected, and the control words of the related words to be tested are obtained.
  • this step S22 is the same as the specific implementation process of the previous step S21, except that the input word in step S21 becomes the related word ⁇ a 1 , . . . , a n ⁇ , and then the obtained test is obtained.
  • a i related words of the set of words associated quarantine B ai ⁇ b i1, ... , b in ⁇ as a control experiment to be the set of words associated word a i, and therefore will not describe them here.
  • the noise words can be filtered out, and the efficiency of acquiring the lower related words is improved.
  • step S31 obtain a consistent manner the bit associated word set acquires the next bit associated word set with the step S2 above embodiment, this No longer.
  • the upper-level related word set of Java is a set of input words in a set, that is, the lower-level related word set of each element in the set has the same element as Java. .
  • the user can be provided with relevant information from multiple dimensions. word.
  • the output related word set selects related words provided to the user.
  • the obtaining method further comprises normalizing the correlation:
  • the correlation threshold of each of the superordinate related words in the superordinate related word set of the keyword and the keyword is subtracted from the screening threshold, and the normalization of the correlation degree is completed.
  • the purpose of normalization is to make the value of the correlation between the related words of the keyword-related output words and the degree of relevance of the keyword can be based on 0, the higher the value, the related words and keywords.
  • the higher the degree of correlation the more convenient to select the relevant words provided to the user in the output related word set in step S4.
  • the method for providing a related word can filter out the influence of a noise word and improve the quality of the obtained related word by using the related word after the obtained lower-order related words to be verified as the lower related words. In other words, the accuracy of the relevant words provided to the user can be ensured.
  • the upper-level related words of the keyword are reversely obtained when the lower-level related word set is continued, and the number of related words provided by the user can be expanded to a large extent, and the upper-level related words can be confirmed. The quality of related words.
  • FIG. 4 it is a schematic flowchart of another embodiment of a method for providing related words according to the present invention.
  • the method for providing related words in this embodiment is as follows: using a thesis database and a Wikipedia database as the entry database respectively, and obtaining corresponding data therefrom. a first output related word set and a second output related word set, and then the union of the first output related word set and the second output related word set as a final output related word set of the keyword; wherein, in the Wikipedia database
  • the manner in which the second output related word set is obtained is the same as the manner in which the output related word set is obtained in the paper database in the previous embodiment.
  • two different vocabulary databases are used, and the vocabulary database is a essay database and a Wikipedia database for mining related words.
  • the extension of related words is highly targeted, and the corpus can be avoided.
  • the related words provided to the user are too one-sided.
  • FIG. 5 is a schematic structural diagram of an embodiment of an apparatus for providing related words provided by the present invention, which can implement the entire process of the foregoing two embodiments, and the apparatus for providing related words includes:
  • the lower related word set module 10 is configured to use a keyword input by the user as an input word, obtain a lower related word set of the keyword from the entry database, and determine each lower related word in the lower related word set. The relevance of the keyword;
  • the superordinate related word set module 20 is configured to obtain a superordinate related word set of the keyword from the vocabulary database according to the lower related word set of the keyword, and determine each superordinate related word in the superordinate related word set Relevance to the keyword;
  • a related word set module 30 configured to use a union of a lower related word set and a superordinate related word set of the keyword as an output related word set of the keyword, and output each of the output related word sets according to the output The relevance of the related words, the related words provided to the user are selected in the output related word set.
  • FIG. 6 is a schematic structural diagram of an embodiment of a superordinate related word set module of the apparatus for providing related words provided by the present invention; the upper related word set module 30 specifically includes a lower word set obtaining unit 31, a threshold value determining unit 32, and a higher word set obtaining unit 33, wherein
  • the lower word set obtaining unit 31 is configured to update each input word with the lower related word for each lower related word in the lower related word set, and obtain the lower related word of the updated input word from the entry database set;
  • the threshold determining unit 32 is configured to determine whether the total number of the lower related word sets is greater than a preset threshold
  • the upper word set obtaining unit 33 is configured to: when determining that the total number of the lower related word sets is greater than a preset threshold, select a lower related word set including the keyword from the lower related word set, and use the upper related word set The input word corresponding to the lower related word set of the keyword is used as a superordinate related word to obtain a superordinate related word set of the keyword; wherein the keyword in the lower related word set including the keyword and the keyword Correlation degree of the input word corresponding to the lower related word set, as the relevance of the input word to the keyword when it is a superordinate related word;
  • the lower word set obtaining unit 31 is further configured to: when determining that the total number of the lower related word sets is less than a preset threshold, continue to perform the following operations: for each lower related word in the lower related word set of the updated input word, The input word is updated again by the lower related word, and the lower related word set of the newly updated input word is obtained from the entry database until the total number of the lower related word set is greater than a preset threshold.
  • FIG. 7 A schematic structural diagram of an embodiment of a unit for obtaining a lower-level related word set of a device for providing related words, specifically comprising:
  • the related word set unit 1 is configured to obtain, from the entry database, a word including the input word according to the input word And classifying and screening the terms to obtain a set of related words to be tested;
  • a comparison word set unit 2 configured to acquire, for each of the to-be-recognized related words in the to-be-tested related word set, an entry including the to-be-recognized related word from the entry database according to the inquiring related word And classifying and screening the terms of the related words to be inspected, and obtaining a comparison word set of the related words to be tested;
  • a determining obtaining unit 3 configured to: when determining that an absolute value of an intersection of the comparison word set of the to-be-tested related word and the to-be-tested related word set is greater than a screening threshold, the inquiring related word is a lower position of the input word a related word, obtaining a lower related word set; wherein the absolute value is used as a relevance of the lower related word to the keyword.
  • FIG. 8 is a schematic structural diagram of an embodiment of a to-be-recognized related word set unit of the apparatus for providing related words according to the present invention.
  • a first lexical sub-unit 11 configured to obtain, from the vocabulary database, an entry that includes the input word and is sorted before the Mth position according to the input word;
  • the first adjusting sub-unit 12 is configured to perform format adjustment on the obtained entry according to the standard entry format
  • a first word segment sub-unit 14 configured to perform word segmentation on the format-adjusted term by using the word segmentation tool to obtain a first word set
  • a first extracting sub-unit 15 configured to extract a word belonging to a core word in the user word from the first word set as a related word to be tested, and obtain a related word set to be tested; wherein the user dictionary is Provided by the word segmentation tool;
  • FIG. 9 is a schematic structural diagram of an embodiment of a control word set unit of the apparatus for providing related words according to the present invention.
  • the control word set unit 2 specifically includes:
  • a second lexical sub-unit 21 configured to obtain, according to the to-be-tested related words, an entry that includes the to-be-tested related words and is sorted before the Mth position;
  • a second adjustment sub-unit 22 configured to perform format adjustment on the term that includes the to-be-recognized related word and is sorted before the Mth position according to the standard entry format;
  • a second calling subunit 23 configured to invoke the word segmentation tool
  • a second word segment sub-unit 24 configured to use the word segmentation tool to perform segmentation on the format-adjusted term containing the to-be-tested related words and sorted before the Mth position, to obtain a second word set;
  • the second extracting sub-unit 25 is configured to obtain, from the second word set, a word belonging to the core word in the user dictionary as a control word, and obtain a control word set.
  • the apparatus for providing related words further includes a normalization module 40:
  • the normalization module is configured to subtract the relevance of each of the lower related words in the lower related word set of the keyword from the keyword by the screening threshold; and to use the keyword
  • the correlation between each of the superordinate related words in the epistem-related word set and the keyword is subtracted from the screening threshold, and the normalization of the correlation is completed.
  • the device for providing related words can filter out the influence of the noise word and improve the quality of the obtained related word by using the related words after the obtained lower-order related words to be verified as the lower related words. In other words, the accuracy of the relevant words provided to the user can be ensured.
  • the upper-level related words of the keyword are reversely obtained when the lower-level related word set is continued, and the number of related words provided by the user can be expanded to a large extent, and the upper-level related words can be confirmed. The quality of related words.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Landscapes

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

Abstract

一种提供相关词的方法和装置,该方法包括:以用户输入的关键词作为输入词,从词条数据库中获取所述关键词的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度(S1);根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度(S2);将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词(S3)。采用该方法,能够提供数量更多且更准确的相关词。

Description

提供相关词的方法和装置 技术领域
本发明涉及计算机技术领域,尤其涉及一种提供相关词的方法和装置。
背景技术
目前,购物网站以及搜索引擎服务网站都提供的关键词搜索的功能,即用户输入想要搜索的商品或技术的关键词,服务器则根据该关键词搜索出相应的结果并返回给用户。服务器为了提供准确的搜索结果,服务器一般会对关键词进行扩展,即根据用户输入的关键词,查找出关键词对应的相关词,并提供查找到的相关词给用户,在用户通过关键词搜索而未能得到满意的搜索结果时,就根据相关词进行搜索。但现有的相关词扩展是通过已有词典进行扩展,例如WordNet、《同义词林》,而这种方式所获得的相关词在数量上相当有限,而且所获得的相关词有可能跟不上语言的发展变化,不能满足相关词对时效性的要求。
发明内容
本发明实施例提出一种提供相关词的方法和装置,能够提供数量更多且更准确的相关词。
本发明实施例提出的一种提供相关词的方法,包括:
以用户输入的关键词作为输入词,从词条数据库中获取所述关键词的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度;
根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度;
将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词。
作为本发明实施例的进一步改进,所述根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度,具体为:
针对所述下位相关词集中的每一个下位相关词,以该下位相关词来更新输入词,从词条数据库中获取更新后的输入词的下位相关词集;
判断下位相关词集的总数量是否大于预设阈值;
若是,则从下位相关词集中筛选出包含所述关键词的下位相关词集,并将所述包含所述关键词的下位相关词集对应的输入词作为上位相关词,获得所述关键词的上位相关词集;其中,在所述包含所述关键词的下位相关词集中的所述关键词与该下位相关词集对应的输入词的相关度,作为该输入词在作为上位相关词时与所述关键词的相关度;
若否,则继续执行以下操作:针对更新后的输入词的下位相关词集中的每一个下位相关词,以该下位相关词再次更新输入词,从词条数据库中获取再次更新后的输入词的下位相关词集,直至下位相关词集的总数量大于预设阈值。
进一步地,上述从词条数据库中获取下位相关词集的方式具体包括:
根据所述输入词,从词条数据库中获取包含所述输入词的词条,并对所述词条进行分词和筛选,获得待验相关词集;
对于所述待验相关词集中的每一个待验相关词,根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集;
当判定所述待验相关词的对照词集与所述待验相关词集的交集的绝对值大于筛选阈值时,所述待验相关词为所述输入词的下位相关词,获得下位相关词集;其中,所述绝对值作为所述下位相关词与所述关键词的相关度。
作为本发明的进一步改进,所述根据所述输入词,从词条数据库中获取包含所述输入词的词条,并对所述词条进行分词和筛选,获得待验相关词集,具体包括:
根据所述输入词,从词条数据库中获取包含所述输入词且排序在第M位前的词条;
根据标准词条格式,对获取的词条进行格式调整;
调用分词工具;
利用所述分词工具对格式调整后的词条进行分词,获得第一词语集;
从所述第一词语集中提取属于用户词典中的核心词的词语作为待验相关词,获得待验相关词集;其中,所述用户词典是由所述分词工具提供的;
以及,所述根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集,具体包括:
根据所述待验相关词,从词条数据库中获取包含所述待验相关词且排序在第M位前的词条;
根据所述标准词条格式,对所述包含所述待验相关词且排序在第M位前的词条进行格式调整;
调用所述分词工具;
利用所述分词工具对格式调整后的包含所述待验相关词且排序在第M位前的词条进行分词,获得第二词语集;
从所述第二词语集中提取属于用户词典中的核心词的词语作为对照词,获得对照词集。
具体地,所述关键词的下位相关词集和所述上位相关词集的交集包含在所述关键词的输出相关词集中,则包含在所述交集中的每一个输出相关词的相关度为T,T=(T1+T2)/2;其中,T1为在该输出相关词作为下位相关词时与所述关键词的相关度,T2作为在该输出相关词作为上位相关词时与所述关键词的相关度。
作为本发明的进一步改,所述获取方法还包括:
将所述关键词的下位相关词集中的每一个下位相关词与所述关键词的相关度均减去所述筛选阈值;
将所述关键词的上位相关词集中的每一个上位相关词与所述关键词的相关度均减去所述筛选阈值,完成相关度的归一化。
相应地,本发明实施还提供一种提供相关词的装置,包括:
下位相关词集模块,用于以用户输入的关键词作为输入词,从词条数据库中获取所述关键词的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度;
上位相关词集模块,用于根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度;
输出相关词集模块,用于将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词。
作为本发明实施例的进一步改进,所述上位相关词集模块具体包括:下位词集获取单元、阈值判断单元和上位词集获取单元,其中,
所述下位词集获取单元,用于针对所述下位相关词集中的每一个下位相关词,以该下位相关词来更新输入词,从词条数据库中获取更新后的输入词的下位相关词集;
所述阈值判断单元,用于判断下位相关词集的总数量是否大于预设阈值;
所述上位词集获取单元,用于当判断下位相关词集的总数量大于预设阈值时,从下位相关词集中筛选出包含所述关键词的下位相关词集,并将所述包含所述关键词的下位相关词集 对应的输入词作为上位相关词,获得所述关键词的上位相关词集;其中,在所述包含所述关键词的下位相关词集中的所述关键词与该下位相关词集对应的输入词的相关度,作为该输入词在作为上位相关词时与所述关键词的相关度;
所述下位词获取单元,还用于当判断下位相关词集的总数量小于预设阈值时,继续执行以下操作:针对更新后的输入词的下位相关词集中的每一个下位相关词,以该下位相关词再次更新输入词,从词条数据库中获取再次更新后的输入词的下位相关词集,直至下位相关词集的总数量大于预设阈值。
进一步地,所述下位相关词集模块和所述下位词集获取单元还包括用于从词条数据库中获取下位相关词集的单元,具体为:
待验相关词集单元,用于根据所述输入词,从词条数据库中获取包含所述输入词的词条,并对所述词条进行分词和筛选,获得待验相关词集;
对照词集单元,用于对于所述待验相关词集中的每一个待验相关词,根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集;和
判断获取单元,用于当判定所述待验相关词的对照词集与所述待验相关词集的交集的绝对值大于筛选阈值时,所述待验相关词为所述输入词的下位相关词,获得下位相关词集;其中,所述绝对值作为所述下位相关词与所述关键词的相关度。
进一步地,所述待验相关词集单元,具体包括:
第一词条子单元,用于根据所述输入词,从词条数据库中获取包含所述输入词且排序在第M位前的词条;
第一调整子单元,用于根据标准词条格式,对获取的词条进行格式调整;
第一调用子单元,用于调用分词工具;
第一分词子单元,用于利用所述分词工具对格式调整后的词条进行分词,获得第一词语集;和,
第一提取子单元,用于从所述第一词语集中提取属于用户词中的核心词的词语作为待验相关词,获得待验相关词集;其中,所述用户词典是由所述分词工具提供的;
以及,所述对照词集单元具体包括:
第二词条子单元,用于根据所述待验相关词,从词条数据库中获取包含所述待验相关词且排序在第M位前的词条;
第二调整子单元,用于根据所述标准词条格式,对所述包含所述待验相关词且排序在第M位前的词条进行格式调整;
第二调用子单元,用于调用所述分词工具;
第二分词子单元,用于利用所述分词工具对格式调整后的包含所述待验相关词且排序在第M位前的词条进行分词,获得第二词语集;和,
第二提取子单元,用于根据从所述第二词语集中提取属于用户词典中的核心词的词语作为对照词,获得对照词集。
进一步地,所述提供相关词的装置还包括归一化模块:
所述归一化模块,用于将所述关键词的下位相关词集中的每一个下位相关词与所述关键词的相关度均减去所述筛选阈值;以及用于将所述关键词的上位相关词集中的每一个上位相关词与所述关键词的相关度均减去所述筛选阈值,完成相关度的归一化。
实施本发明实施例,具有如下有益效果:
本发明实施例提供的提供相关词的方法和装置,通过用户提供的关键词从词条数据库中获取所述关键词的下位相关词集,然后再根据该下位相关词集,求取出关键词的上位相关词集,最后该下位相关词集和该上位相关词集的并集作为所述关键词的输出相关词集,能扩展出大量的相关词提供给用户选择,另外,通过确定相关词的相关度,能准确地描述为相关词与关键词之间的相关程度,后续可依据相关词的相关度选择提供给所述用户的相关词,能通过相关词的相关度描述,准确地为用户提供相关词。
附图说明
图1是本发明提供的提供相关词的方法的一个实施例的流程示意图;
图2是图1提供的提供相关词的方法的步骤S2的一个实施例的流程示意图;
图3是图1提供的提供相关词的方法的步骤S3的一个实施的流程示意图;
图4是本发明提供的提供相关词的方法的另一个实施例的流程示意图;
图5是本发明提供的提供相关词的装置的一个实施例的结构示意图;
图6是本发明提供的提供相关词的装置的上位相关词集模块的一个实施例的结构示意图;
图7是本发明提供的提供相关词的装置的用于获取下位相关词集的单元的一个实施例的结构示意图;
图8是本发明提供的提供相关词的装置的待验相关词集单元的一个实施例的结构示意图;
图9是本发明提供的提供相关词的装置的对照词集单元的一个实施例的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
参见图1、图2和图3,图1是本发明提供的提供相关词的方法的一个实施例的流程示意图,图2是图1提供的提供相关词的方法的步骤S2的一个实施例的流程示意图,图3是图1提供的提供相关词的方法的步骤S3的一个实施的流程示意图。下面将结合这三个流程图,以论文数据库(例如中国知网)作为词条数据库,从中获取关键词Java的相关词为例,详细说明本实施例的提供相关词的方法,该方法包括以下步骤:
S1,以用户输入的关键词Java为输入词,从词条数据库中获取关键词Java的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度。步骤S1包括步骤S11至S13,具体如下:
S11,根据所述输入词Java从论文数据库中获取包含所述输入词Java的词条,并对所述词条进行分词和筛选,获得待验相关词集A={a1,…,an};此步骤的具体实施过程如下:
利用搜索引擎根据所述输入词Java从论文数据库中获取包含所述输入词Java且排序在第M位前的词条,例如,前50页论文摘要作为词条,或者,在维基中搜索关键词Java的前500条摘要;
根据标准词条格式对所述词条进行格式调整;例如,将词条中的小写统一成大写、对词条中多余的空格删除、统一词条中的标点符号、将词条的全角格式或半角格式统一为一种等。
调用分词工具;优选地,所述分词工具为jieba分词工具,但不限于为此分词工具。
利用所述分词工具对格式调整后的词条进行分词,获得第一词语集;
根据关键词提取算法,从所述第一词语集中提取与所述输入词相关的词语作为待验相关词{a1,…,an},获得待验相关词集A={a1,…,an}。需要说明的是,可通过分词工具或通过本提供相关词的装置添加词典,利用词典提供的核心词,从所述第一词语集中提取核心词作为待验相关词。
S12,对于所述待验相关词集A={a1,…,an}中的每一个待验相关词,根据所述待验相关词从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集。需要说明的是,此步骤S22与上一个步骤S21的具体实施过程相同,只是区别在于步骤S21中的输入词变为待验相关词{a1,…,an},然后将所获得待验相关词ai的待验相关词集Bai={bi1,…,bin}作为待验相关词ai的对照词集,因而在此不 再赘述。
S13,当判定所述待验相关词ai的对照词集Bai={bi1,…,bin}与所述待验相关词集A={a1,…,an}的交集的绝对值r大于筛选阈值p时,即Bai集合与A集合中相同元素的数量大于筛选阈值p时,所述待验相关词ai为所述输入词Java的下位相关词,获得所述关键词的下位相关词集A′={aj},且j∈{1,…,n}、|A′|≤n、|A⌒Baj|>p;其中,所述交集的绝对值r为所述下位相关词在所述下位相关词集中的相关度。需要说明的是,所述相关度表示为相关词集中的相关词与该相关词集的输入词之间的相关程度。
通过上述步骤S11、S12和S13来获取输入词的下位相关词集,能滤除噪音词,提高获取下位相关词的效率。
根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度
S2,根据所述关键词的下位相关词集A′={aj},从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度。该步骤的具体包括如下步骤S21至S24:
S21,针对所述下位相关词集A′={aj}中的每一个下位相关词,以该下位相关词aj来更新输入词,即作为输入词,从论文数据库中获取更新后的输入词aj的下位相关词集A″;需要说明的,在本实施例中,优选地,步骤S31中获取下位相关词集的方式与上述步骤S2中获取下位相关词集的方式一致,在此不再赘述。
S22,判断当前下位相关词集的总数量N是否大于预设阈值S;
S23,若是,则从下位相关词集中筛选出所有包含所述关键词的下位相关词集,并将所述包含所述关键词的下位相关词集对应的输入词作为上位相关词,获得所述关键词的上位相关词集C;其中,在所述包含所述关键词的下位相关词集中的所述关键词与该下位相关词集对应的输入词的相关度,作为该输入词在作为上位相关词时与所述关键词的相关度
S24,若否,则继续执行以下操作:针对更新后的输入词的下位相关词集中的每一个下位相关词,以该下位相关词再次更新输入词,从词条数据库中获取再次更新后的输入词的下位相关词集,直至下位相关词集的总数量N大于预设阈值S;需要说明的是,在步骤S21和S23中获取下位相关词集的方式与在上述步骤S1中获取下位相关词集的方式也是一致的,在此不再赘述。
也就是说,例如对于关键词Java来说,Java的上位相关词集是一个集合中的元素为输入词的集合,即该集合中的每一个元素的下位相关词集中都有相同的元素为Java。通过采用与获取下位相关词集相同的方式逆求取关键词的上位相关词集,能从多个维度为用户提供相关 词。
S3,将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词。
具体地所述关键词的下位相关词集和所述上位相关词集的交集包含在所述关键词的输出相关词集中,则包含在所述交集中的每一个输出相关词的相关度为T,T=(T1+T2)/2;其中,T1为在该输出相关词作为下位相关词时与所述关键词的相关度,T2作为在该输出相关词作为上位相关词时与所述关键词的相关度。也就是说,并集后,上位相关词集和下位相关词集中相同的相关词的相关度的取值为该相关词在这两个集合中的相关度的均值。
作为本发明的进一步改进,所述获取方法还包括对相关度进行归一化:
将所述关键词的下位相关词集中的每一个下位相关词与所述关键词的相关度均减去所述筛选阈值;
将所述关键词的上位相关词集中的每一个上位相关词与所述关键词的相关度均减去所述筛选阈值,完成相关度的归一化。
需要说明的是,归一化的目的是让关键词的输出相关词集中的相关词与该关键词的相关程度的相关度的数值能以0为基准,数值越高,相关词与关键词的相关程度就越高,方便在步骤S4中在输出相关词集中选择提供给用户的相关词。
实施本发明实施例的提供相关词的方法,通过对获取的待验下位相关词进行对照验证后的相关词作为下位相关词,能滤除噪声词的影响,提高获取到的相关词的质量,也就是说,能确保提供给用户的相关词的准确性。另一方面,在获取到关键词的下位相关词集后,继续通过下位相关词集时进行逆求取关键词的上位相关词,能大量扩展为用户提供的相关词的数量,并能确上位相关词的质量。
参见图4,是本发明提供的提供相关词的方法的另一个实施例的流程示意图;本实施例的提供相关词的方法为:分别以论文数据库和维基百科数据库作为词条数据库,从中获取相应的第一输出相关词集和第二输出相关词集,然后将第一输出相关词集和第二输出相关词集的并集作为关键词的最终的输出相关词集;其中,在维基百科数据库中获取第二输出相关词集的方式与上一实施例中在论文数据库中获取输出相关词集的方式相同。本实施例采用两种不同的词条数据库且词条数据库为论文数据库和维基百科数据库,来进行相关词的挖掘,一方面对于相关词的扩展针对性强,且能避免语料单一,而导致的为用户提供的相关词获取过于片面。
相应地,参见图5,是本发明提供的提供相关词的装置的一个实施例的结构示意图,能实现上述两种实施例的全部流程,该提供相关词的装置包括:
下位相关词集模块10,用于以用户输入的关键词作为输入词,从词条数据库中获取所述关键词的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度;
上位相关词集模块20,用于根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度;
输出相关词集模块30,用于将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词。
作为本发明实施例的进一步改进,如图6所示,图6是本发明提供的提供相关词的装置的上位相关词集模块的一个实施例的结构示意图;该上位相关词集模块30具体包括:下位词集获取单元31、阈值判断单元32和上位词集获取单元33,其中,
所述下位词集获取单元31,用于针对所述下位相关词集中的每一个下位相关词,以该下位相关词来更新输入词,从词条数据库中获取更新后的输入词的下位相关词集;
所述阈值判断单元32,用于判断下位相关词集的总数量是否大于预设阈值;
所述上位词集获取单元33,用于当判断下位相关词集的总数量大于预设阈值时,从下位相关词集中筛选出包含所述关键词的下位相关词集,并将所述包含所述关键词的下位相关词集对应的输入词作为上位相关词,获得所述关键词的上位相关词集;其中,在所述包含所述关键词的下位相关词集中的所述关键词与该下位相关词集对应的输入词的相关度,作为该输入词在作为上位相关词时与所述关键词的相关度;
所述下位词集获取单元31,还用于当判断下位相关词集的总数量小于预设阈值时,继续执行以下操作:针对更新后的输入词的下位相关词集中的每一个下位相关词,以该下位相关词再次更新输入词,从词条数据库中获取再次更新后的输入词的下位相关词集,直至下位相关词集的总数量大于预设阈值。
进一步地,所述下位相关词集模块20和所述下位词集获取单元31均还包括用于从词条数据库中获取下位相关词集的单元,如图7所示,图7是本发明提供的提供相关词的装置的用于获取下位相关词集的单元的一个实施例的结构示意图,具体包括:
待验相关词集单元1,用于根据所述输入词,从词条数据库中获取包含所述输入词的词 条,并对所述词条进行分词和筛选,获得待验相关词集;
对照词集单元2,用于对于所述待验相关词集中的每一个待验相关词,根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集;和
判断获取单元3,用于当判定所述待验相关词的对照词集与所述待验相关词集的交集的绝对值大于筛选阈值时,所述待验相关词为所述输入词的下位相关词,获得下位相关词集;其中,所述绝对值作为所述下位相关词在与所述关键词的相关度。
进一步地,如图8所示,图8是本发明提供的提供相关词的装置的待验相关词集单元的一个实施例的结构示意图;所述待验相关词集单元1,具体包括:
第一词条子单元11,用于根据所述输入词,从词条数据库中获取包含所述输入词且排序在第M位前的词条;
第一调整子单元12,用于根据标准词条格式,对获取的词条进行格式调整;
第一调用子单元13,用于调用分词工具;
第一分词子单元14,用于利用所述分词工具对格式调整后的词条进行分词,获得第一词语集;和,
第一提取子单元15,用于根从所述第一词语集中提取属于用户词中的核心词的词语作为待验相关词,获得待验相关词集;其中,所述用户词典是由所述分词工具提供的;
以及,如图9所示,图9是本发明提供的提供相关词的装置的对照词集单元的一个实施例的结构示意图;所述对照词集单元2具体包括:
第二词条子单元21,用于根据所述待验相关词,从词条数据库中获取包含所述待验相关词且排序在第M位前的词条;
第二调整子单元22,用于根据所述标准词条格式,对所述包含所述待验相关词且排序在第M位前的词条进行格式调整;
第二调用子单元23,用于调用所述分词工具;
第二分词子单元24,用于利用所述分词工具对格式调整后的包含所述待验相关词且排序在第M位前的词条进行分词,获得第二词语集;和,
第二提取子单元25,用于从所述第二词语集中属于用户词典中的核心词的词语作为对照词,获得对照词集。
具体地,所述关键词的下位相关词集和所述上位相关词集的交集包含在所述关键词的输出相关词集中,则包含在所述交集中的每一个输出相关词的相关度为T,T=(T1+T2)/2;其中,T1为在该输出相关词作为下位相关词时与所述关键词的相关度,T2作为在该输出相关词作 为上位相关词时与所述关键词的相关度。
进一步地,如图5所示,所述提供相关词的装置还包括归一化模块40:
所述归一化模块,用于将所述关键词的下位相关词集中的每一个下位相关词与所述关键词的相关度均减去所述筛选阈值;以及用于将所述关键词的上位相关词集中的每一个上位相关词与所述关键词的相关度均减去所述筛选阈值,完成相关度的归一化。
本发明实施例提供的提供相关词的装置,通过对获取的待验下位相关词进行对照验证后的相关词作为下位相关词,能滤除噪声词的影响,提高获取到的相关词的质量,也就是说,能确保提供给用户的相关词的准确性。另一方面,在获取到关键词的下位相关词集后,继续通过下位相关词集时进行逆求取关键词的上位相关词,能大量扩展为用户提供的相关词的数量,并能确上位相关词的质量。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
以上所述是本发明的优选实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本发明原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也视为本发明的保护范围。

Claims (11)

  1. 一种提供相关词的方法,其特征在于,包括:
    以用户输入的关键词作为输入词,从词条数据库中获取所述关键词的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度;
    根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度;
    将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词。
  2. 如权利要求1所述的提供相关词的方法,其特征在于,所述根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度,具体为:
    针对所述下位相关词集中的每一个下位相关词,以该下位相关词来更新输入词,从词条数据库中获取更新后的输入词的下位相关词集;
    判断下位相关词集的总数量是否大于预设阈值;
    若是,则从下位相关词集中筛选出包含所述关键词的下位相关词集,并将所述包含所述关键词的下位相关词集对应的输入词作为上位相关词,获得所述关键词的上位相关词集;其中,在所述包含所述关键词的下位相关词集中的所述关键词与该下位相关词集对应的输入词的相关度,作为该输入词在作为上位相关词时与所述关键词的相关度;
    若否,则继续执行以下操作:针对更新后的输入词的下位相关词集中的每一个下位相关词,以该下位相关词再次更新输入词,从词条数据库中获取再次更新后的输入词的下位相关词集,直至下位相关词集的总数量大于预设阈值。
  3. 如权利要求2所述的提供相关词的方法,其特征在于,从词条数据库中获取下位相关词集的方式具体包括:
    根据所述输入词,从词条数据库中获取包含所述输入词的词条,并对所述词条进行分词和筛选,获得待验相关词集;
    对于所述待验相关词集中的每一个待验相关词,根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所 述待验相关词的对照词集;
    当判定所述待验相关词的对照词集与所述待验相关词集的交集的绝对值大于筛选阈值时,所述待验相关词为所述输入词的下位相关词,获得下位相关词集;其中,所述绝对值作为所述下位相关词与所述关键词的相关度。
  4. 如权利要求3所述的提供相关词的方法,其特征在于,所述根据所述输入词,从词条数据库中获取包含所述输入词的词条,并对所述词条进行分词和筛选,获得待验相关词集,具体包括:
    根据所述输入词,从词条数据库中获取包含所述输入词且排序在第M位前的词条;
    根据标准词条格式,对获取的词条进行格式调整;
    调用分词工具;
    利用所述分词工具对格式调整后的词条进行分词,获得第一词语集;
    从所述第一词语集中提取属于用户词典中的核心词的词语作为待验相关词,获得待验相关词集;其中,所述用户词典是由所述分词工具提供的;
    以及,所述根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集,具体包括:
    根据所述待验相关词,从词条数据库中获取包含所述待验相关词且排序在第M位前的词条;
    根据所述标准词条格式,对所述包含所述待验相关词且排序在第M位前的词条进行格式调整;
    调用所述分词工具;
    利用所述分词工具对格式调整后的包含所述待验相关词且排序在第M位前的词条进行分词,获得第二词语集;
    从所述第二词语集中提取属于用户词典中的核心词的词语作为对照词,获得对照词集。
  5. 如权利要求1所述的提供相关词的方法,其特征在于,所述关键词的下位相关词集和所述上位相关词集的交集包含在所述关键词的输出相关词集中,则包含在所述交集中的每一个输出相关词的相关度为T,T=(T1+T2)/2;其中,T1为在该输出相关词作为下位相关词时与所述关键词的相关度,T2作为在该输出相关词作为上位相关词时与所述关键词的相关度。
  6. 如权利要求3所述的提供相关词的方法,其特征在于,所述获取方法还包括:
    将所述关键词的下位相关词集中的每一个下位相关词与所述关键词的相关度均减去所述筛选阈值;
    将所述关键词的上位相关词集中的每一个上位相关词与所述关键词的相关度均减去所述筛选阈值,完成相关度的归一化。
  7. 一种提供相关词的装置,其特征在于,包括:
    下位相关词集模块,用于以用户输入的关键词作为输入词,从词条数据库中获取所述关键词的下位相关词集,以及确定所述下位相关词集中的每一个下位相关词与所述关键词的相关度;
    上位相关词集模块,用于根据所述关键词的下位相关词集,从词条数据库中获取所述关键词的上位相关词集,以及确定所述上位相关词集中的每一个上位相关词与所述关键词的相关度;
    输出相关词集模块,用于将所述关键词的下位相关词集和上位相关词集的并集作为所述关键词的输出相关词集,并依据所述输出相关词集中的每一个输出相关词的相关度,在所述输出相关词集中选择提供给所述用户的相关词。
  8. 如权利要求7所述的提供相关词的装置,其特征在于,所述上位相关词集模块具体包括:下位词集获取单元、阈值判断单元和上位词集获取单元,其中,
    所述下位词集获取单元,用于针对所述下位相关词集中的每一个下位相关词,以该下位相关词来更新输入词,从词条数据库中获取更新后的输入词的下位相关词集;
    所述阈值判断单元,用于判断下位相关词集的总数量是否大于预设阈值;
    所述上位词集获取单元,用于当判断下位相关词集的总数量大于预设阈值时,从下位相关词集中筛选出包含所述关键词的下位相关词集,并将所述包含所述关键词的下位相关词集对应的输入词作为上位相关词,获得所述关键词的上位相关词集;其中,在所述包含所述关键词的下位相关词集中的所述关键词与该下位相关词集对应的输入词的相关度,作为该输入词在作为上位相关词时与所述关键词的相关度;
    所述下位词集获取单元,还用于当判断下位相关词集的总数量小于预设阈值时,继续执行以下操作:针对更新后的输入词的下位相关词集中的每一个下位相关词,以该下位相关词再次更新输入词,从词条数据库中获取再次更新后的输入词的下位相关词集,直至下位相关词集的总数量大于预设阈值。
  9. 如权利要求8所述的提供相关词的装置,其特征在于,所述下位相关词集模块和所述下位词集获取单元还包括用于从词条数据库中获取下位相关词集的单元,具体为:
    待验相关词集单元,用于根据所述输入词,从词条数据库中获取包含所述输入词的词条,并对所述词条进行分词和筛选,获得待验相关词集;
    对照词集单元,用于对于所述待验相关词集中的每一个待验相关词,根据所述待验相关词,从所述词条数据库中获取包含所述待验相关词的词条,并对所述待验相关词的词条进行分词和筛选,获得所述待验相关词的对照词集;和
    判断获取单元,用于当判定所述待验相关词的对照词集与所述待验相关词集的交集的绝对值大于筛选阈值时,所述待验相关词为所述输入词的下位相关词,获得下位相关词集;其中,所述绝对值作为所述下位相关词与所述关键词的相关度。
  10. 如权利要求9所述的提供相关词的装置,其特征在于,所述待验相关词集单元,具体包括:
    第一词条子单元,用于根据所述输入词,从词条数据库中获取包含所述输入词且排序在第M位前的词条;
    第一调整子单元,用于根据标准词条格式,对获取的词条进行格式调整;
    第一调用子单元,用于调用分词工具;
    第一分词子单元,用于利用所述分词工具对格式调整后的词条进行分词,获得第一词语集;和,
    第一提取子单元,用于从所述第一词语集中提取属于用户词中的核心词的词语作为待验相关词,获得待验相关词集;其中,所述用户词典是由所述分词工具提供的;
    以及,所述对照词集单元具体包括:
    第二词条子单元,用于根据所述待验相关词,从词条数据库中获取包含所述待验相关词且排序在第M位前的词条;
    第二调整子单元,用于根据所述标准词条格式,对所述包含所述待验相关词且排序在第M位前的词条进行格式调整;
    第二调用子单元,用于调用所述分词工具;
    第二分词子单元,用于利用所述分词工具对格式调整后的包含所述待验相关词且排序在第M位前的词条进行分词,获得第二词语集;和,
    第二提取子单元,用于根据从所述第二词语集中提取属于用户词典中的核心词的词语作为对照词,获得对照词集。
  11. 如权利要求10所述的提供相关词的装置,其特征在于,所述提供相关词的装置还包括归一化模块:
    所述归一化模块,用于将所述关键词的下位相关词集中的每一个下位相关词与所述关键词的相关度均减去所述筛选阈值;以及用于将所述关键词的上位相关词集中的每一个上位相关词与所述关键词的相关度均减去所述筛选阈值,完成相关度的归一化。
PCT/CN2016/113175 2016-06-17 2016-12-29 提供相关词的方法和装置 Ceased WO2017215244A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610445489.2 2016-06-17
CN201610445489.2A CN106126588B (zh) 2016-06-17 2016-06-17 提供相关词的方法和装置

Publications (1)

Publication Number Publication Date
WO2017215244A1 true WO2017215244A1 (zh) 2017-12-21

Family

ID=57470913

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/113175 Ceased WO2017215244A1 (zh) 2016-06-17 2016-12-29 提供相关词的方法和装置

Country Status (2)

Country Link
CN (1) CN106126588B (zh)
WO (1) WO2017215244A1 (zh)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126588B (zh) * 2016-06-17 2019-09-20 广州视源电子科技股份有限公司 提供相关词的方法和装置
CN108304366B (zh) * 2017-03-21 2020-04-03 腾讯科技(深圳)有限公司 一种上位词检测方法及设备
CN108628832B (zh) * 2018-05-08 2022-03-18 中国联合网络通信集团有限公司 一种信息情报关键字获取方法及装置
CN109241525B (zh) * 2018-08-20 2022-05-06 深圳追一科技有限公司 关键词的提取方法、装置和系统
CN113918759A (zh) * 2021-09-28 2022-01-11 湖北美和易思教育科技有限公司 基于bs架构的音频数据识别结果显示方法、系统及介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251844A (zh) * 2007-02-21 2008-08-27 富士胶片株式会社 用于检索内容的设备和方法
US20120072443A1 (en) * 2010-09-21 2012-03-22 Inventec Corporation Data searching system and method for generating derivative keywords according to input keywords
CN103778262A (zh) * 2014-03-06 2014-05-07 北京林业大学 基于叙词表的信息检索方法及装置
CN104008097A (zh) * 2013-02-21 2014-08-27 日电(中国)有限公司 实现查询理解的方法及装置
CN106126588A (zh) * 2016-06-17 2016-11-16 广州视源电子科技股份有限公司 提供相关词的方法和装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810274B (zh) * 2014-02-12 2017-03-29 北京联合大学 基于WordNet语义相似度的多特征图像标签排序方法
CN104123351B (zh) * 2014-07-09 2017-08-25 百度在线网络技术(北京)有限公司 交互式搜索方法和装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251844A (zh) * 2007-02-21 2008-08-27 富士胶片株式会社 用于检索内容的设备和方法
US20120072443A1 (en) * 2010-09-21 2012-03-22 Inventec Corporation Data searching system and method for generating derivative keywords according to input keywords
CN104008097A (zh) * 2013-02-21 2014-08-27 日电(中国)有限公司 实现查询理解的方法及装置
CN103778262A (zh) * 2014-03-06 2014-05-07 北京林业大学 基于叙词表的信息检索方法及装置
CN106126588A (zh) * 2016-06-17 2016-11-16 广州视源电子科技股份有限公司 提供相关词的方法和装置

Also Published As

Publication number Publication date
CN106126588B (zh) 2019-09-20
CN106126588A (zh) 2016-11-16

Similar Documents

Publication Publication Date Title
CN112328891B (zh) 训练搜索模型的方法、搜索目标对象的方法及其装置
JP7211045B2 (ja) 要約文生成方法、要約文生成プログラム及び要約文生成装置
US8892420B2 (en) Text segmentation with multiple granularity levels
US11907659B2 (en) Item recall method and system, electronic device and readable storage medium
CN114036930A (zh) 文本纠错方法、装置、设备及计算机可读介质
CN103106287B (zh) 一种用户检索语句的处理方法及系统
CN106708929B (zh) 视频节目的搜索方法和装置
CN106844640B (zh) 一种网页数据分析处理方法
CN107463548B (zh) 短语挖掘方法及装置
WO2017215244A1 (zh) 提供相关词的方法和装置
CN109657137B (zh) 舆情新闻分类模型构建方法、装置、计算机设备和存储介质
CN107229627B (zh) 一种文本处理方法、装置及计算设备
CN106940702A (zh) 连接短文本中实体提及与语义知识库中实体的方法和设备
CN109101551B (zh) 一种问答知识库的构建方法及装置
CN102855263A (zh) 一种对双语语料库进行句子对齐的方法及装置
CN109933671A (zh) 构建个人知识图谱的方法、装置、计算机设备和存储介质
CN106095912B (zh) 用于生成扩展查询词的方法和装置
CN106570196A (zh) 视频节目的搜索方法和装置
CN110276079B (zh) 一种词库建立方法、信息检索方法及对应的系统
CN110888977B (zh) 文本分类方法、装置、计算机设备和存储介质
US10229105B1 (en) Mobile log data parsing
CN107368525B (zh) 搜索相关词的方法及装置、存储介质和终端设备
US20190213486A1 (en) Virtual Adaptive Learning of Financial Articles Utilizing Artificial Intelligence
CN109918661A (zh) 同义词获取方法及装置
CN117421421A (zh) 多源数据字典融合方法及装置、介质、设备

Legal Events

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

Ref document number: 16905351

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16905351

Country of ref document: EP

Kind code of ref document: A1