WO2019223103A1 - 文本相似度的获取方法、装置、终端设备及介质 - Google Patents

文本相似度的获取方法、装置、终端设备及介质 Download PDF

Info

Publication number
WO2019223103A1
WO2019223103A1 PCT/CN2018/097497 CN2018097497W WO2019223103A1 WO 2019223103 A1 WO2019223103 A1 WO 2019223103A1 CN 2018097497 W CN2018097497 W CN 2018097497W WO 2019223103 A1 WO2019223103 A1 WO 2019223103A1
Authority
WO
WIPO (PCT)
Prior art keywords
matrix
text
feature
decomposition
analyzed
Prior art date
Application number
PCT/CN2018/097497
Other languages
English (en)
French (fr)
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 WO2019223103A1 publication Critical patent/WO2019223103A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing

Definitions

  • the present application belongs to the technical field of data processing, and in particular, relates to a method, an apparatus, a terminal device, and a computer-readable storage medium for acquiring text similarity.
  • Text similarity is used to measure the similarity between text and text.
  • the text similarity can be determined by a manual judgment method.
  • judging a large number of similar texts manually is often a time-consuming and tedious task. Therefore, in order to solve this problem, with the continuous development of scientific research, vector space models such as word frequency statistics and simhash have been derived. These vector space models calculate the text similarity based on information such as the presence or absence of words and the frequency of each word by identifying words that coexist in the two articles. Therefore, the calculated text similarity is relatively high only when both articles have a large number of identical words.
  • words have ambiguity and synonymy, that is, words used to represent the same semantics may have different expressions, and words with the same expression may also express different semantics, so they are calculated based on the vector space model described above.
  • the text similarity is the same, two articles may actually express the same meaning (the text similarity should be very high), but the calculated text similarity is relatively low. Therefore, the existing text similarity calculation method has a problem of low calculation accuracy.
  • embodiments of the present application provide a method, an apparatus, a terminal device, and a computer-readable storage medium for acquiring text similarity, so as to solve the problem that the accuracy of calculating the text similarity in the prior art is relatively low.
  • a first aspect of the embodiments of the present application provides a method for acquiring text similarity, including:
  • the text set feature matrix includes a plurality of first feature vectors, and each of the first feature vectors matches a comparison text
  • a second aspect of the embodiments of the present application provides a device for acquiring text similarity, and the recognition device includes a unit for executing the method for acquiring text similarity according to the first aspect.
  • a third aspect of the embodiments of the present application provides a terminal device including a memory and a processor.
  • the memory stores computer-readable instructions executable on the processor, and the processor executes the computer-readable instructions.
  • the steps of the method for obtaining the text similarity according to the first aspect are implemented.
  • a fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions are implemented as described in the first aspect when executed by a processor. Steps of the method for obtaining text similarity.
  • the embodiment of the present application by generating a text vector associated with a reference text and generating a text set feature matrix commonly associated with multiple comparison texts, based on the singular value decomposition of the text set feature matrix, and calculating the decomposition to characterize each
  • the similarity between the feature vectors of the text to be analyzed ensures that the calculated text similarity can more accurately reflect the topic similarity between the texts, instead of relying only on words that coexist between the texts to calculate the similarity Therefore, the calculation accuracy of text similarity is improved.
  • the embodiments of the present application can simultaneously calculate the similarity between the reference text and multiple contrasted texts at the same time, so the text comparison efficiency is also improved.
  • FIG. 1 is an implementation flowchart of a method for acquiring text similarity provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of a feature set of a text set generated based on multiple compared texts according to an embodiment of the present application
  • FIG. 3 is an implementation flowchart of a method for acquiring text similarity provided by another embodiment of the present application.
  • FIG. 4 is a specific implementation flowchart of a method S109 for obtaining a text similarity provided by another embodiment of the present application.
  • FIG. 5 is a specific implementation flowchart of a method S1091 for obtaining a text similarity provided by another embodiment of the present application.
  • FIG. 6 is a detailed implementation flowchart of a method S102 for obtaining a text similarity according to an embodiment of the present application
  • FIG. 7 is a structural block diagram of a device for acquiring text similarity provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • FIG. 1 shows an implementation flow of an information input method provided by an embodiment of the present application, and the method flow includes steps S101 to S107.
  • the specific implementation principle of each step is as follows:
  • S101 Obtain a preset text to be analyzed, where the text to be analyzed includes reference text and multiple comparison texts.
  • the reference text is a text selected in advance.
  • any of the texts is a comparison text.
  • the match text can be one or more.
  • the reference text and the comparison text are collectively referred to as a text to be analyzed, and one preset reference text and more than one comparison text are obtained.
  • the texts to be analyzed include, but are not limited to, data texts collected from various news websites and public texts published by the enterprise itself.
  • the above public text may be, for example, a financial annual report, a financial quarterly report, and a prospectus.
  • S102 Perform word segmentation processing on the text to be analyzed to obtain a plurality of word segmentations corresponding to each of the text to be analyzed, and then store the word segmentation in a bag-of-words model.
  • the word analysis is performed on the text to be analyzed by a preset word segmentation algorithm. After obtaining the respective word segmentation corresponding to the text to be analyzed, the non-repeating word segmentation is filtered out, and these mutually The unique word segmentation is output to the bag of words model. Therefore, for any text to be analyzed obtained at the current moment, the bag-of-words model will include each participle existing in the text to be analyzed.
  • S104 Generate a text set feature matrix corresponding to the multiple compared texts and a text vector corresponding to the reference text based on the TF-IDF information associated with each of the texts to be analyzed; wherein, the The text set feature matrix includes a plurality of first feature vectors, and each of the first feature vectors matches one of the compared texts.
  • the above frequency is the word frequency inverse text frequency of the part-word in the bag-of-words model (TF-IDF, term frequency Inverse Document Frequency).
  • a first feature vector corresponding to each compared text is generated. Specifically, the TF-IDF information of each participle in the comparison text in the bag of words model is output as an element in the first feature vector corresponding to the comparison text. Therefore, the number of elements included in the first feature vector is the same as the number of word segmentations stored in the bag of words model. Similarly, a text vector corresponding to the reference text is generated, so that the TF-IDF information of each participle in the reference text in the bag of words model can be output as an element in the text vector.
  • the word bag model that does not contain repeated word segmentation is: ⁇ aarrived, damaged, delivery, fire, gold, shipping, silver, truck, etc.).
  • the TF-IDF information of each participle contained in the bag-of-words model in d1 is 1, 0, 1, 0, 1, 1, 1, 1, 1, 0, and 0, so d1 corresponds to
  • the first feature vector generated is [1,0,1,1,0,0];
  • the TF-IDF information of each participle contained in the bag-of-words model in q is 0, 0, 0, 0, 0, 1 , 0, 0, 0, 1, and 1, so the text vector generated by q is [0,0,0,0,0,0,0,1,1].
  • a set including a first feature vector corresponding to each comparison text is used as the text set feature matrix.
  • Each first feature vector represents a column of matrix elements in a feature set of a text set. Therefore, in the above example, the text set feature matrix A matched with the comparison texts d1, d2, and d3 can be seen in FIG. 2.
  • S105 Perform singular value decomposition on the text set feature matrix to obtain a word feature matrix, a document feature matrix, and a feature vector weight matrix.
  • a singular value decomposition process is performed on the text set feature matrix A through a preset singular value decomposition algorithm to obtain a word feature matrix U, a document feature matrix V, and a feature vector weight matrix S.
  • the text set feature matrix A can be split into multiple matrix orthogonal multiplication forms.
  • the word features obtained by its decomposition The matrix U, the document feature matrix V, and the feature vector weight matrix S are as follows:
  • S106 Perform inverse mapping processing on the text vector according to the word feature matrix and the feature vector weighting matrix to obtain a second feature vector matching the reference text.
  • S107 Calculate the similarity between each of the second feature vector and the first feature vector, and output the calculation result as a comparison between the reference text and the compared text matched by the second feature vector. Similarity.
  • each first feature vector in the feature set of the text set is read, and each comparison is determined based on the similarity between each read first feature vector and the second feature vector matched by the reference text.
  • the text similarity between the text and the reference text is determined based on the similarity between each read first feature vector and the second feature vector matched by the reference text.
  • the similarity between the first feature vector and the second feature vector is specifically a cosine similarity.
  • the calculation formula of the cosine similarity S is as follows:
  • x i represents the i-th element value of the first feature vector
  • y i represents the i-th element value of the second feature vector
  • n represents the total number of elements of the first feature vector or the second feature vector.
  • each first feature vector corresponds to a comparison text
  • the cosine similarity is output as the ratio corresponding to the first feature vector Text similarity between text and reference text.
  • the embodiment of the present application by generating a text vector associated with a reference text and generating a text set feature matrix commonly associated with multiple comparison texts, based on the singular value decomposition of the text set feature matrix, and calculating the decomposition to characterize each
  • the similarity between the feature vectors of the text to be analyzed ensures that the calculated text similarity can more accurately reflect the topic similarity between the texts, instead of relying only on words that coexist between the texts to calculate similarity Therefore, the calculation accuracy of text similarity is improved.
  • the embodiments of the present application can simultaneously calculate the similarity between the reference text and multiple contrasted texts at the same time, so the text comparison efficiency is also improved.
  • the method further includes:
  • S108 Obtain a hyperparameter value, where the hyperparameter value is determined according to a matrix target dimension preset by a user.
  • S109 Perform dimensionality reduction processing on each decomposition matrix based on the hyperparameter value, so that the feature dimension of each of the decomposition matrices is changed to the hyperparameter value; wherein the decomposition matrix includes the word A feature matrix, the document feature matrix, and the feature vector weight matrix.
  • deletion operations are performed on a plurality of matrix elements in the word feature matrix, the document feature matrix, and the feature vector weighting matrix, respectively, so as to implement the dimensionality reduction processing of each decomposition matrix.
  • a preset hyperparameter value the above-mentioned hyperparameter value represents a matrix target set in advance by the user
  • FIG. 4 shows a specific implementation process of the method S109 for obtaining a text similarity provided by an embodiment of the present application, which is detailed as follows:
  • each of the decomposition matrices sort the matrix elements included in the decomposition matrix according to the size order of the matrix elements, and read each matrix column existing in the decomposition matrix after the sorting. ;
  • Each matrix column includes a preset number of the matrix elements.
  • the matrix elements included in the word feature matrix, the document feature matrix, and the feature vector weight matrix are all different.
  • each matrix element included in the decomposition matrix is reordered according to the magnitude of each matrix element. Since the number of rows and columns of the decomposition matrix is determined by the number of word segmentation contained in the bag of words model and the number of compared texts, the number of rows and columns of the decomposition matrix and the number of matrix elements after the matrix elements are reordered remain unchanged.
  • S1092 extract a plurality of the matrix columns that are sorted first, and combine the extracted plurality of matrix columns into the updated decomposition matrix; wherein the number of extractions of the matrix columns and the hyperparameter value equal.
  • the first N matrix columns that are sorted are extracted from the above-mentioned re-sorted decomposition matrix.
  • N is a hyperparameter value obtained in advance, and N is an integer greater than zero.
  • the decomposition matrix that originally contained the N matrix columns is deleted, thereby realizing the update and dimension reduction processing of the decomposition matrix.
  • the decomposition matrix in the embodiment of the present application includes one or more of the above word feature matrix, document feature matrix, and feature vector weight matrix, which is not limited herein.
  • the above step S1091 specifically includes:
  • S10912 sequentially sort the matrix columns to which each of the singular values belong based on the magnitude of the singular value, and read each of the matrix columns obtained after sorting; each of the matrix columns includes a preset Number of said matrix elements.
  • each matrix column will contain a matrix element with a non-zero value, and the matrix element is the singular value of the feature vector ratio matrix.
  • the matrix column to which each singular value belongs is sorted according to the magnitude of each singular value, so that the matrix containing the singular value with a larger value is processed. Columns can be arranged in front of a matrix column containing singular values with smaller values.
  • the current feature vector ratio matrix is determined as the updated feature vector ratio matrix. At this time, based on the above step S1092, the N matrix columns ranked first in the current feature vector ratio matrix are extracted.
  • the eigenvector ratio matrix S illustrated in the previous embodiment is as follows:
  • the updated eigenvector ratio matrix S is unchanged, that is, the matrix to which 4.0989 belongs is changed.
  • the column arrangement is the first matrix column in the feature vector ratio matrix S
  • the matrix column to which 2.3616 belongs is arranged as the second matrix column in the feature vector ratio matrix S
  • the matrix column to which 1.2737 belongs is arranged as the feature vector ratio matrix S.
  • the ratio of the singular value ranked first to the singular value ranked next is calculated. If the ratio is greater than a preset threshold, the sequence number of the matrix column in which the sorting is earlier is obtained, and the sequence number is updated to the current hyperparameter value.
  • the singular value contained in the matrix column of the second column is 4.0989
  • the singular value contained in the matrix column of the third column is 0.0589
  • the preset threshold is 50
  • the ratio of the two singular values above 69.59 is greater than 50, so
  • the current hyperparameter value is determined as the sequence number of the matrix column that is sorted first, that is, the current hyperparameter value is determined to be 2, thereby automatically determining and updating the hyperparameter value.
  • each singular value is arranged along the diagonal of the eigenvector ratio matrix from large to small, and the value decreases usually faster. Because the singular value with a small value is difficult to reflect the theme of the compared text Therefore, by extracting the matrix columns where N singular values with larger values are located and deleting other matrix columns, while reducing the matrix dimension of the eigenvector ratio matrix, it is ensured that the updated eigenvector ratio matrix can The main features of the compared texts are maintained, so the accuracy of text similarity calculation is improved.
  • FIG. 6 shows a specific implementation process of the method S102 for obtaining a text similarity provided by an embodiment of the present application, which is detailed as follows:
  • S1021 Perform word segmentation processing on each text to be analyzed separately to obtain multiple word segmentations corresponding to each of the texts to be analyzed.
  • S1022 Detect whether a stop word exists in each of the segmented words according to a preset stop word list.
  • Stop words include, but are not limited to, mood particles, adverbs, prepositions, and connectives.
  • a plurality of preset words are acquired, and the total number of times each character appears in each webpage article is detected within a preset time window. For any character, if the total number of occurrences of the character in each webpage article is greater than the first threshold, and the probability of occurrence in each webpage article is greater than the second threshold, the character is determined to be a stop word. At this point, the character is added to the stopword list.
  • each stopword pre-stored in the stopword list is obtained.
  • For each participle corresponding to the analyzed text check whether it is the same as the stopword in the stopword list. If the detection result is yes, the segmentation is deleted to reduce the total number of segmentation corresponding to the text to be analyzed. Only when each participle corresponding to the text to be segmented is different from the stopword in the stopword list, each current participle is stored in the bag of words model.
  • the bag model by using a preset stopword list to detect stopwords in each participle, and deleting the stopwords in it, the remaining other participles are stored in the bag model, which can reduce the number of words.
  • the total number of word segmentation of the bag model guarantees that each word segmentation in the word bag model can represent the topical characteristics of the text to be analyzed, thus reducing the computational complexity of text similarity and improving the efficiency of obtaining text similarity.
  • FIG. 7 shows a structural block diagram of a device for acquiring text similarity provided in the embodiment of the present application. For convenience of explanation, only the parts related to this embodiment are shown.
  • the device includes:
  • the first obtaining unit 71 is configured to obtain a preset text to be analyzed, where the text to be analyzed includes a reference text and multiple comparison texts.
  • the word segmentation unit 72 is configured to perform word segmentation processing on the text to be analyzed to obtain a plurality of word segmentations corresponding to each of the text to be analyzed, and then store the word segmentation into a bag of words model.
  • a second obtaining unit 73 is configured to obtain, for each of the participles corresponding to each of the texts to be analyzed, the word frequency inverse text frequency TF-IDF information of the participle in the word bag model.
  • a generating unit 74 configured to generate a text set feature matrix corresponding to the multiple compared texts and a text vector corresponding to the reference text based on the TF-IDF information associated with each of the texts to be analyzed;
  • the text set feature matrix includes a plurality of first feature vectors, and each of the first feature vectors matches one of the compared texts.
  • the decomposition unit 75 is configured to perform singular value decomposition on the feature set of the text set to obtain a word feature matrix, a document feature matrix, and a feature vector weight matrix.
  • a mapping unit 76 is configured to perform inverse mapping processing on the text vector according to the word feature matrix and the feature vector weight matrix to obtain a second feature vector matching the reference text.
  • a calculation unit 77 is configured to calculate the similarity between each of the second feature vector and the first feature vector, and output the calculation result as the comparison between the reference text and the second feature vector. Similarity between texts.
  • the apparatus for acquiring text similarity further includes:
  • a third obtaining unit is configured to obtain a hyperparameter value, and the hyperparameter value is determined according to a matrix target dimension preset by a user.
  • a dimensionality reduction unit is configured to perform dimensionality reduction processing on each of the decomposition matrices based on the hyperparameter values, so that a feature dimension of each of the decomposition matrices is changed to the hyperparameter values.
  • the decomposition matrix includes the word feature matrix, the document feature matrix, and the feature vector weight matrix.
  • the dimension reduction unit includes:
  • a sorting subunit configured to perform a sorting process on each of the matrix elements included in the decomposition matrix according to the size order of the matrix elements in each of the decomposition matrices, and read the existence of the decomposition matrix after the sorting
  • An extraction subunit configured to extract a plurality of the matrix columns in a previous order, and combine the extracted plurality of matrix columns into an updated decomposition matrix; wherein the number of extractions of the matrix columns and the The hyperparameter values are equal.
  • the sorting subunit is specifically configured to:
  • the decomposition matrix is a eigenvector weight matrix, identifying each singular value in the eigenvector weight matrix, the singular value is a non-zero value matrix element in the eigenvector weight matrix;
  • each matrix column contains a preset number of The matrix element.
  • the word segmentation unit 72 includes:
  • the word segmentation subunit is configured to perform word segmentation processing on each text to be analyzed to obtain a plurality of word segmentation corresponding to each of the texts to be analyzed.
  • a detection subunit is configured to detect whether a stopword exists in each of the segmented words according to a preset stopword list.
  • a deleting subunit is configured to delete the participle if the participle matching the stopword exists, and store each remaining participle in a bag of words model.
  • FIG. 8 is a schematic diagram of a terminal device according to an embodiment of the present application.
  • the terminal device 8 of this embodiment includes a processor 80 and a memory 81.
  • the memory 81 stores computer-readable instructions 82 that can be run on the processor 80, such as text similarity Get the program.
  • the processor 80 executes the computer-readable instructions 82, the steps in the embodiment of the method for acquiring the similarity of texts are implemented, for example, steps 101 to 107 shown in FIG. 1.
  • the processor 80 executes the computer-readable instructions 82
  • the functions of the modules / units in the foregoing device embodiments are implemented, for example, the functions of the units 71 to 77 shown in FIG. 7.
  • the computer-readable instructions 82 may be divided into one or more modules / units, the one or more modules / units are stored in the memory 81 and executed by the processor 80, To complete this application.
  • the one or more modules / units may be a series of computer-readable instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer-readable instructions 82 in the terminal device 8.
  • the terminal device 8 may be a computing device such as a desktop computer, a notebook, a palmtop computer, and a cloud server.
  • the terminal device may include, but is not limited to, a processor 80 and a memory 81.
  • FIG. 8 is only an example of the terminal device 8 and does not constitute a limitation on the terminal device 8. It may include more or fewer components than shown in the figure, or combine some components or different components.
  • the terminal device may further include an input / output device, a network access device, a bus, and the like.
  • the so-called processor 80 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), Ready-made programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 81 may be an internal storage unit of the terminal device 8, such as a hard disk or a memory of the terminal device 8.
  • the memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a Smart Media Card (SMC), and a Secure Digital (SD) provided on the terminal device 8. Cards, flash cards, etc. Further, the memory 81 may further include both an internal storage unit of the terminal device 8 and an external storage device.
  • the memory 81 is configured to store the computer-readable instructions and other programs and data required by the terminal device.
  • the memory 81 may also be used to temporarily store data that has been output or is to be output.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium , Including a number of instructions to enable a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.
  • the foregoing storage media include: U disks, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks or compact discs and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本方案提供了一种文本相似度的获取方法、装置、终端设备及介质,适用于数据处理技术领域,该方法包括:获取每一待分析文本所分别对应的多个分词后,将分词存入词袋模型;获取每一分词在词袋模型中的TF-IDF信息;基于各个待分析文本所关联的TF-IDF信息,分别生成与多个比对文本对应的文本集特征矩阵以及与参照文本对应的文本向量;对文本集特征矩阵进行奇异值分解,并根据得到的单词特征矩阵以及特征向量比重矩阵,对文本向量进行反向映射处理,得到第二特征向量;分别计算每一第二特征向量与第一特征向量的相似度,并将计算结果输出为预设文本与该第二特征向量所匹配的比对文本之间的相似度。本方案提高了文本相似度的计算准确率以及文本比对效率。

Description

文本相似度的获取方法、装置、终端设备及介质
本申请要求于2018年05月22日提交中国专利局、申请号为201810495130.5、发明名称为“文本相似度的获取方法、终端设备及介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请属于数据处理技术领域,尤其涉及一种文本相似度的获取方法、装置、终端设备及计算机可读存储介质。
背景技术
文本相似度用于度量文本与文本之间的相似程度。传统方式中,可通过人工判断的方式来确定文本相似度。然而,人工判断大量相似文本常常是一个耗时且繁琐的工作,因此,为了解决这一问题,随着科学研究的不断发展,衍生出了词频统计以及simhash等向量空间模型。这些向量空间模型通过识别两篇文章所共同存在的单词,并基于单词的出现与否及各单词的词频等信息来计算文本相似度。因此,仅当两篇文章均存在数目较多且完全相同的单词时,计算得到的文本相似度才会相对较高。
然而,单词具有多义性和同义性,即,用于表示相同语义的单词在表达形式上可能不同,而相同表达形式的单词也可能表达出不同的语义,故基于上述向量空间模型来计算文本相似度时,可能会出现两篇文章实际表达的意思相同(文本相似度理应非常高),但计算得到的文本相似度却较为低下的情况。因此,现有的文本相似度计算方法存在计算准确率较低的问题。
技术问题
有鉴于此,本申请实施例提供了一种文本相似度的获取方法、装置、终端设备及计算机可读存储介质,以解决现有技术中文本相似度的计算准确率较为低下的问题。
技术解决方案
本申请实施例的第一方面提供了一种文本相似度的获取方法,包括:
获取预设的待分析文本,所述待分析文本包括参照文本以及多个比对文本;
对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型;
对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频逆文本频率TF-IDF信息;
基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对 应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配;
对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵;
根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量;
分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
本申请实施例的第二方面提供了一种文本相似度的获取装置,所述识别装置包括用于执行上述第一方面所述的文本相似度的获取方法的单元。
本申请实施例的第三方面提供了一种终端设备,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如第一方面所述的文本相似度的获取方法的步骤。
本申请实施例的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,所述计算机可读指令被处理器执行时实现如第一方面所述的文本相似度的获取方法的步骤。
有益效果
本申请实施例中,通过生成参照文本所关联的文本向量以及生成多个比对文本所共同关联的文本集特征矩阵,基于对文本集特征矩阵的奇异值分解,并计算分解后用于表征各待分析文本的特征向量之间的相似度,保证了计算得出的文本相似度能够较为准确地体现文本之间的主题相似性,而并非仅仅依赖于文本之间共同存在的单词来计算相似度,因此,提高了文本相似度的计算准确率。并且,在一次运算过程中,本申请实施例能够同时计算参照文本分别与多个对比文本之间的相似度,故也提高了文本的比对效率。
附图说明
图1是本申请实施例提供的文本相似度的获取方法的实现流程图;
图2是本申请实施例提供的基于多个比对文本所生成的文本集特征矩阵的示意图;
图3是本申请另一实施例提供的文本相似度的获取方法的实现流程图;
图4是本申请另一实施例提供的文本相似度的获取方法S109的具体实现流程图;
图5是本申请另一实施例提供的文本相似度的获取方法S1091的具体实现流程图;
图6是本申请实施例提供的文本相似度的获取方法S102的具体实现流程图;
图7是本申请实施例提供的文本相似度的获取装置的结构框图;
图8是本申请实施例提供的终端设备的示意图。
本发明的实施方式
为了说明本申请所述的技术方案,下面通过具体实施例来进行说明。
图1示出了本申请实施例提供的信息的输入方法的实现流程,该方法流程包括步骤S101至S107。各步骤的具体实现原理如下:
S101:获取预设的待分析文本,所述待分析文本包括参照文本以及多个比对文本。
本申请实施例中,参照文本为预先选定的一个文本。对用户而言,若其需要获取任一文本与参照文本之间的文本相似度,则所述的任一文本为比对文本。比对文本可以为一个,也可以为一个以上。优选地,将参照文本以及比对文本统称为待分析文本,且获取预设的一个参照文本以及一个以上的比对文本。
本申请实施例中,待分析文本包括但不限于从各类新闻网站中所收集得到的数据文本以及企业自身所发布的公开文本等。上述公开文本例如可以是财务年报、财务季报以及招股书。
S102:对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型。
对获取得到的每一待分析文本,通过预设的分词算法对该待分析文本进行分词处理,得到该待分析文本所对应的各个分词后,从中筛选出互不重复的分词,并将这些互不重复的分词输出至词袋模型。因此,对于当前时刻所获得的任一待分析文本,词袋模型中将包含有存在于该待分析文本中的各个分词。
S103:对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频逆文本频率TF-IDF信息。
S104:基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配。
对于词袋模型中的每一个分词,确定该分词在每一待分析文本中所出现的频率,则上述频率即为该分词在词袋模型中的词频逆文本频率(TF-IDF,term frequency Inverse Document Frequency)。
本申请实施例中,生成每一比对文本对应的一个第一特征向量。具体地,将词袋模型中每一分词在比对文本中的TF-IDF信息输出为该比对文本所对应的第一特征向量中的一个元素。因此,第一特征向量所包含的元素数量与词袋模型所存储的分词数量相同。同理,生成与参照文本对应的一个文本向量,使得词袋模型中每一分词在参照文本中的TF-IDF信息 能够输出为文本向量中的一个元素。
示例性地,假设有三个比对文本,分别为d1、d2和d3,参照文本为q,且各待分析文本所包含的单词如下:
d1:Shipment of gold damaged in fire.
d2:Delivery of silver arrived in a silver truck.
d3:Shipment of gold arrived in a truck.
q:Gold silver truck.
则对上述各个待分析文本进行分词处理后,得到的不包含重复分词的词袋模型为:{a arrived damaged delivery fire gold in of shipment silver truck}。以d1为例,词袋模型所包含的各个分词在d1中的TF-IDF信息分别为1、0、1、0、1、1、1、1、1、0以及0,因此,d1所对应生成的第一特征向量为[1 0 1 0 1 1 1 1 1 0 0];词袋模型所包含的各个分词在q中的TF-IDF信息分别为0、0、0、0、0、1、0、0、0、1以及1,因此,q所对应生成的文本向量为[0 0 0 0 0 1 0 0 0 1 1]。
本申请实施例中,将包含各个比对文本所对应的第一特征向量的集合作为上述文本集特征矩阵。其中,每一第一特征向量表示文本集特征矩阵中的一列矩阵元素。因此,上述示例中,与比对文本d1、d2以及d3所匹配的文本集特征矩阵A可参见图2。
S105:对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵。
本申请实施例中,通过预设的奇异值分解算法,对文本集特征矩阵A进行奇异值分解处理,以求解得到单词特征矩阵U、文档特征矩阵V和特征向量比重矩阵S。
示例性地,基于A=USV T,可将文本集特征矩阵A拆分为多个矩阵正交相乘的形式,则对于上述图2所示的文本集特征矩阵A,其分解得到的单词特征矩阵U、文档特征矩阵V和特征向量比重矩阵S具体如下:
Figure PCTCN2018097497-appb-000001
Figure PCTCN2018097497-appb-000002
S106:根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量。
本申请实施例中,为了比较参照文本与各个比对文本的文本相似度,在生成参照文本所对应的文本向量q后,将其映射到与文本集特征矩阵奇异值分解后相同的文档特征空间中。即,利用相应的单词特征矩阵U和特征向量比重矩阵S,反向映射回文档特征空间V q,使得V q=q TUS -1,从而得到与参照文本匹配的第二特征向量。
S107:分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
本申请实施例中,读取文本集特征矩阵中的各个第一特征向量,并基于读取得到的每一第一特征向量与参照文本所匹配的第二特征向量的相似度,确定各个比对文本分别与参照文本之间的文本相似度。
示例性地,第一特征向量与第二特征向量之间的相似度具体为余弦相似度。余弦相似度S的计算公式具体如下:
Figure PCTCN2018097497-appb-000003
其中,x i表示第一特征向量的第i个元素值;y i表示第二特征向量的第i个元素值;n表示第一特征向量或第二特征向量的元素总数。
由于每一个第一特征向量与一个比对文本对应,故在计算任一第一特征向量与第二特征向量的余弦相似度后,将该余弦相似度输出为该第一特征向量所对应的比对文本与参照文本之间的文本相似度。
本申请实施例中,通过生成参照文本所关联的文本向量以及生成多个比对文本所共同关联的文本集特征矩阵,基于对文本集特征矩阵的奇异值分解,并计算分解后用于表征各待分析文本的特征向量之间的相似度,保证了计算得出的文本相似度能够较为准确地体现文本之间的主题相似性,而并非仅仅依赖于文本之间所共同存在的单词来计算相似度,因此,提高了文本相似度的计算准确率。并且,在一次运算过程中,本申请实施例能够同时计算参照文本分别与多个对比文本之间的相似度,故也提高了文本的比对效率。
作为本申请另一实施例,如图3所示,在上述S104之后,还包括:
S108:获取超参数值,所述超参数值根据用户预设的矩阵目标维度来确定。
S109:基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值;其中,所述分解矩阵包括所述单词特征矩阵、所述文档特征矩阵以及所述特征向量比重矩阵。
本申请实施例中,在对文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵等多个分解矩阵后,由于各个分解矩阵的特征维度较大,故需要对其特征维度进行降维处理。
具体地,分别对单词特征矩阵、文档特征矩阵以及特征向量比重矩阵中的多个矩阵元素执行删除操作,以实现对各个分解矩阵的降维处理。在获取预设的超参数值(上述超参数值表示用户所预先设置的矩阵目标)后,判断降维后每一分解矩阵的特征维度与超参数值是否相同。若存在特征维度与超参数值不相同的分解矩阵,则将该分解矩阵执行进一步的降维处理,直至其特征维度与超参数值相同。
作为本申请的一个实施例,图4示出了本申请实施例提供的文本相似度的获取方法S109的具体实现流程,详述如下:
S1091:在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
本申请实施例中,单词特征矩阵、文档特征矩阵以及特征向量比重矩阵所包含的矩阵元素均不相同。在每一分解矩阵中,根据各个矩阵元素的数值大小,对该分解矩阵所包含的各个矩阵元素进行重新排序。由于分解矩阵的行列数由词袋模型所包含的分词数目以及比对文本的数目来确定,故矩阵元素重新排序后所得到的分解矩阵的行列数以及矩阵元素数目均保持不变。
S1092:提取排序在前的多个所述矩阵列,并将提取得到的多个所述矩阵列组合为更新后的所述分解矩阵;其中,所述矩阵列的提取数目与所述超参数值相等。
本申请实施例中,根据每一矩阵列的列序号,从上述重新排序后的分解矩阵中提取排序在前的N个矩阵列。其中,N为上述预先获取得到的超参数值,N为大于零的整数。
将提取得到的N个矩阵列进行依次排列,以组合得到另一分解矩阵后,删除原本包含该N个矩阵列的分解矩阵,由此实现分解矩阵的更新及降维处理。
值得注意的是,本申请实施例中的分解矩阵包括上述单词特征矩阵、文档特征矩阵以及特征向量比重矩阵中的一个或多个,在此不做限定。
特别地,当上述分解矩阵为特征向量比重矩阵时,如图5所示,上述步骤S1091具体 包括:
S10911:识别所述特征向量比重矩阵中的各个奇异值,所述奇异值为所述特征向量比重矩阵中的非零值矩阵元素。
S10912:基于所述奇异值的数值大小,依次对各个所述奇异值所属的所述矩阵列进行排序,并读取排序后所得到的各个所述矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
在对文本集特征矩阵进行奇异值分解后所得到的特征向量比重矩阵中,每一矩阵列将包含有一非零值的矩阵元素,则该矩阵元素为特征向量比值矩阵的奇异值。本申请实施例中,检测出特征向量比值矩阵中的各个奇异值后,依照各奇异值的数值大小,对各个奇异值所属的矩阵列进行排序处理,以使包含数值较大的奇异值的矩阵列能够排列于包含数值较小的奇异值的矩阵列之前。在对各个矩阵列的排序进行调整后,将当前的特征向量比值矩阵确定为更新后的特征向量比值矩阵。此时,再基于上述步骤S1092,提取当前特征向量比值矩阵中排序在前的N个矩阵列。
例如,上一实施例所示例的特征向量比值矩阵S如下:
Figure PCTCN2018097497-appb-000004
由于该特征向量比值矩阵所包含的奇异值分别为4.0989、2.3616以及1.2737,且每一奇异值的数值依序递减,因此,更新后的特征向量比值矩阵S不变,即:将4.0989所属的矩阵列排列作为特征向量比值矩阵S中的第一个矩阵列,将2.3616所属的矩阵列排列作为特征向量比值矩阵S中的第二个矩阵列,将1.2737所属的矩阵列排列作为特征向量比值矩阵S中的第三个矩阵列。
优选地,在更新后的特征向量比值矩阵S中,对每相邻的两个矩阵列,计算排序在前的奇异值与排序在后的奇异值的比值。若该比值大于预设阈值,则获取其中排序较前的矩阵列的序列号,并将该序列号更新为当前时刻的超参数值。
例如,若第二列矩阵列所包含的奇异值为4.0989,第三列矩阵列所包含的奇异值为0.0589,且预设阈值为50,则上述两个奇异值的比值69.59大于50,故将当前的超参数值确定为排序在前的矩阵列的序列号,即,将当前的超参数值确定为2,由此实现了超参数值的自动确定及更新。
本申请实施例中,各个奇异值沿着特征向量比值矩阵的对角线由大到小依次排列,且数值下降速度通常较快,由于数值较小的奇异值较难体现比对文本的主题特征,因此,通过将数值较大的N个奇异值所在的矩阵列进行提取,将其他矩阵列进行删除,在降低了特征向 量比值矩阵的矩阵维度的同时,保证了更新后的特征向量比值矩阵能够维持比对文本的主题特征,故提高了文本相似度的计算准确性。
作为本申请的一个实施例,图6示出了本申请实施例提供的文本相似度的获取方法S102的具体实现流程,详述如下:
S1021:分别对每一待分析文本进行分词处理,以得到每一所述待分析文本所对应的多个分词。
S1022:根据预设的停用词列表,检测各个所述分词中是否存在停用词。
S1023:若存在与所述停用词匹配的所述分词,则将该分词进行删除,并将剩余的各个所述分词存入词袋模型。
在待分析文本中,不具备实际语义的字符或词组为上述停用词,即,对待分析文本所表达主题特征的影响程度相对较小的词语为停用词。停用词包括但不限于语气助词、副词、介词以及连接词等。
本申请实施例中,在加载停用词列表之前,获取多个预设的字词,并在预设的时间窗口内,检测每一字符在各网页文章中所出现的总次数。对任一字符,若该字符在各网页文章中所出现的总次数大于第一阈值,且在每一网页文章中的出现概率大于第二阈值,则判断该字符为停用词。此时,将该字符添加至停用词列表。
通过加载停用词列表,获取预存储于停用词列表中的各个停用词。对待分析文本所对应的每一分词,检测其与停用词列表中的停用词是否相同。若检测结果为是,则将该分词进行删除处理,以减少待分析文本所对应的分词的总数。仅当待分词文本所对应的每一分词均与停用词列表中的停用词不相同时,才将当前的各个分词存入词袋模型。
本申请实施例中,通过利用预设的停用词列表来检测各个分词中所存在停用词,并将其中的停用词删除后,将剩余的其他分词存入词袋模型,能够减少词袋模型的分词总数,保证了词袋模型中的各个分词均能够表征待分析文本的主题特征,因而降低了文本相似度的计算复杂度,提高了文本相似度的获取效率。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
对应于本申请实施例所提供的文本相似度的获取方法,图7示出了本申请实施例提供的文本相似度的获取装置的结构框图。为了便于说明,仅示出了与本实施例相关的部分。
参照图7,该装置包括:
第一获取单元71,用于获取预设的待分析文本,所述待分析文本包括参照文本以及多 个比对文本。
分词单元72,用于对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型。
第二获取单元73,用于对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频逆文本频率TF-IDF信息。
生成单元74,用于基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配。
分解单元75,用于对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵。
映射单元76,用于根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量。
计算单元77,用于分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
可选地,上述文本相似度的获取装置还包括:
第三获取单元,用于获取超参数值,所述超参数值根据用户预设的矩阵目标维度来确。
降维单元,用于基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值。
其中,所述分解矩阵包括所述单词特征矩阵、所述文档特征矩阵以及所述特征向量比重矩阵。
可选地,所述降维单元包括:
排序子单元,用于在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
提取子单元,用于提取排序在前的多个所述矩阵列,并将提取得到的多个所述矩阵列组合为更新后的所述分解矩阵;其中,所述矩阵列的提取数目与所述超参数值相等。
可选地,所述排序子单元具体用于:
若所述分解矩阵为特征向量比重矩阵,则识别所述特征向量比重矩阵中的各个奇异值,所述奇异值为所述特征向量比重矩阵中的非零值矩阵元素;
基于所述奇异值的数值大小,依次对各个所述奇异值所属的所述矩阵列进行排序,并读取排序后所得到的各个所述矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
可选地,所述分词单元72包括:
分词子单元,用于分别对每一待分析文本进行分词处理,以得到每一所述待分析文本所对应的多个分词。
检测子单元,用于根据预设的停用词列表,检测各个所述分词中是否存在停用词。
删除子单元,用于若存在与所述停用词匹配的所述分词,则将该分词进行删除,并将剩余的各个所述分词存入词袋模型。
图8是本申请一实施例提供的终端设备的示意图。如图8所示,该实施例的终端设备8包括:处理器80以及存储器81,所述存储器81中存储有可在所述处理器80上运行的计算机可读指令82,例如文本相似度的获取程序。所述处理器80执行所述计算机可读指令82时实现上述各个文本相似度的获取方法实施例中的步骤,例如图1所示的步骤101至107。或者,所述处理器80执行所述计算机可读指令82时实现上述各装置实施例中各模块/单元的功能,例如图7所示单元71至77的功能。
示例性的,所述计算机可读指令82可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器81中,并由所述处理器80执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机可读指令段,该指令段用于描述所述计算机可读指令82在所述终端设备8中的执行过程。
所述终端设备8可以是桌上型计算机、笔记本、掌上电脑及云端服务器等计算设备。所述终端设备可包括,但不仅限于处理器80和存储器81。本领域技术人员可以理解,图8仅仅是终端设备8的示例,并不构成对终端设备8的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述终端设备还可以包括输入输出设备、网络接入设备、总线等。
所称处理器80可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器81可以是所述终端设备8的内部存储单元,例如终端设备8的硬盘或内存。所述存储器81也可以是所述终端设备8的外部存储设备,例如所述终端设备8上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器81还可以既包括所述终端设备8的内部存储单元也包括外部存储设备。所述存储器81用于存储所述计算机可读指令以及所述终端设 备所需的其他程序和数据。所述存储器81还可以用于暂时地存储已经输出或者将要输出的数据。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (20)

  1. 一种文本相似度的获取方法,其特征在于,包括:
    获取预设的待分析文本,所述待分析文本包括参照文本以及多个比对文本;
    对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型;
    对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频逆文本频率TF-IDF信息;
    基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配;
    对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵;
    根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量;
    分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
  2. 如权利要求1所述的文本相似度的获取方法,其特征在于,在所述对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵之后,还包括:
    获取超参数值,所述超参数值根据用户预设的矩阵目标维度来确定;
    基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值;
    其中,所述分解矩阵包括所述单词特征矩阵、所述文档特征矩阵以及所述特征向量比重矩阵。
  3. 如权利要求2所述的文本相似度的获取方法,其特征在于,所述基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值,包括:
    在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素;
    提取排序在前的多个所述矩阵列,并将提取得到的多个所述矩阵列组合为更新后的所述分解矩阵;其中,所述矩阵列的提取数目与所述超参数值相等。
  4. 如权利要求3所述的文本相似度的获取方法,其特征在于,所述在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列,包括:
    若所述分解矩阵为特征向量比重矩阵,则识别所述特征向量比重矩阵中的各个奇异值,所述奇异值为所述特征向量比重矩阵中的非零值矩阵元素;
    基于所述奇异值的数值大小,依次对各个所述奇异值所属的所述矩阵列进行排序,并读取排序后所得到的各个所述矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
  5. 如权利要求1所述的文本相似度的获取方法,其特征在于,所述对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型,包括:
    分别对每一待分析文本进行分词处理,以得到每一所述待分析文本所对应的多个分词;
    根据预设的停用词列表,检测各个所述分词中是否存在停用词;
    若存在与所述停用词匹配的所述分词,则将该分词进行删除,并将剩余的各个所述分词存入词袋模型。
  6. 一种文本相似度的获取装置,其特征在于,包括:
    第一获取单元,用于获取预设的待分析文本,所述待分析文本包括参照文本以及多个比对文本;
    分词单元,用于对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型;
    第二获取单元,用于对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频逆文本频率TF-IDF信息;
    生成单元,用于基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配;
    分解单元,用于对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵;
    映射单元,用于根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量;
    计算单元,用于分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将 计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
  7. 根据权利要求6所述的文本相似度的获取装置,其特征在于,还包括:
    第三获取单元,用于获取超参数值,所述超参数值根据用户预设的矩阵目标维度来确;
    降维单元,用于基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值;
    其中,所述分解矩阵包括所述单词特征矩阵、所述文档特征矩阵以及所述特征向量比重矩阵。
  8. 根据权利要求7所述的文本相似度的获取装置,其特征在于,所述降维单元包括:
    排序子单元,用于在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素;
    提取子单元,用于提取排序在前的多个所述矩阵列,并将提取得到的多个所述矩阵列组合为更新后的所述分解矩阵;其中,所述矩阵列的提取数目与所述超参数值相等。
  9. 根据权利要求8所述的文本相似度的获取装置,其特征在于,所述排序子单元具体用于:
    若所述分解矩阵为特征向量比重矩阵,则识别所述特征向量比重矩阵中的各个奇异值,所述奇异值为所述特征向量比重矩阵中的非零值矩阵元素;
    基于所述奇异值的数值大小,依次对各个所述奇异值所属的所述矩阵列进行排序,并读取排序后所得到的各个所述矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
  10. 根据权利要求6所述的文本相似度的获取装置,其特征在于,所述分词单元包括:
    分词子单元,用于分别对每一待分析文本进行分词处理,以得到每一所述待分析文本所对应的多个分词;
    检测子单元,用于根据预设的停用词列表,检测各个所述分词中是否存在停用词;
    删除子单元,用于若存在与所述停用词匹配的所述分词,则将该分词进行删除,并将剩余的各个所述分词存入词袋模型。
  11. 一种终端设备,其特征在于,包括存储器以及处理器,所述存储器中存储有可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取预设的待分析文本,所述待分析文本包括参照文本以及多个比对文本;
    对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型;
    对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频 逆文本频率TF-IDF信息;
    基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配;
    对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵;
    根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量;
    分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
  12. 根据权利要求11所述的终端设备,其特征在于,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取超参数值,所述超参数值根据用户预设的矩阵目标维度来确定;
    基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值;
    其中,所述分解矩阵包括所述单词特征矩阵、所述文档特征矩阵以及所述特征向量比重矩阵。
  13. 根据权利要求12所述的终端设备,其特征在于,所述基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值,包括:
    在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素;
    提取排序在前的多个所述矩阵列,并将提取得到的多个所述矩阵列组合为更新后的所述分解矩阵;其中,所述矩阵列的提取数目与所述超参数值相等。
  14. 根据权利要求13所述的终端设备,其特征在于,所述在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列,包括:
    若所述分解矩阵为特征向量比重矩阵,则识别所述特征向量比重矩阵中的各个奇异值,所述奇异值为所述特征向量比重矩阵中的非零值矩阵元素;
    基于所述奇异值的数值大小,依次对各个所述奇异值所属的所述矩阵列进行排序,并 读取排序后所得到的各个所述矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
  15. 根据权利要求11所述的终端设备,其特征在于,所述对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型,包括:
    分别对每一待分析文本进行分词处理,以得到每一所述待分析文本所对应的多个分词;
    根据预设的停用词列表,检测各个所述分词中是否存在停用词;
    若存在与所述停用词匹配的所述分词,则将该分词进行删除,并将剩余的各个所述分词存入词袋模型。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机可读指令,其特征在于,所述计算机可读指令被至少一个处理器执行时实现如下步骤:
    获取预设的待分析文本,所述待分析文本包括参照文本以及多个比对文本;
    对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型;
    对每一所述待分析文本所对应的每一所述分词,获取该分词在所述词袋模型中的词频逆文本频率TF-IDF信息;
    基于各个所述待分析文本所关联的所述TF-IDF信息,分别生成与所述多个比对文本对应的文本集特征矩阵以及与所述参照文本对应的文本向量;其中,所述文本集特征矩阵包含多个第一特征向量,每一所述第一特征向量与一所述比对文本匹配;
    对所述文本集特征矩阵进行奇异值分解,得到单词特征矩阵、文档特征矩阵和特征向量比重矩阵;
    根据所述单词特征矩阵以及所述特征向量比重矩阵,对所述文本向量进行反向映射处理,得到与所述参照文本匹配的第二特征向量;
    分别计算每一所述第二特征向量与所述第一特征向量的相似度,并将计算结果输出为所述参照文本与该第二特征向量所匹配的所述比对文本之间的相似度。
  17. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述计算机可读指令被至少一个处理器执行时还实现如下步骤:
    获取超参数值,所述超参数值根据用户预设的矩阵目标维度来确定;
    基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值;
    其中,所述分解矩阵包括所述单词特征矩阵、所述文档特征矩阵以及所述特征向量比重矩阵。
  18. 根据权利要求17所述的计算机可读存储介质,其特征在于,所述基于所述超参数值,分别对各个分解矩阵进行降维处理,以使所述每一所述分解矩阵的特征维度变更为所述超参数值,包括:
    在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素;
    提取排序在前的多个所述矩阵列,并将提取得到的多个所述矩阵列组合为更新后的所述分解矩阵;其中,所述矩阵列的提取数目与所述超参数值相等。
  19. 根据权利要求18所述的计算机可读存储介质,其特征在于,所述在每一所述分解矩阵中,根据矩阵元素的大小顺序,对该分解矩阵所包含的各个所述矩阵元素进行排序处理,并读取排序后所述分解矩阵中所存在的各个矩阵列,包括:
    若所述分解矩阵为特征向量比重矩阵,则识别所述特征向量比重矩阵中的各个奇异值,所述奇异值为所述特征向量比重矩阵中的非零值矩阵元素;
    基于所述奇异值的数值大小,依次对各个所述奇异值所属的所述矩阵列进行排序,并读取排序后所得到的各个所述矩阵列;每一所述矩阵列包含预设数量的所述矩阵元素。
  20. 根据权利要求16所述的计算机可读存储介质,其特征在于,所述对所述待分析文本进行分词处理,以得到每一所述待分析文本所分别对应的多个分词后,将所述分词存入词袋模型,包括:
    分别对每一待分析文本进行分词处理,以得到每一所述待分析文本所对应的多个分词;
    根据预设的停用词列表,检测各个所述分词中是否存在停用词;
    若存在与所述停用词匹配的所述分词,则将该分词进行删除,并将剩余的各个所述分词存入词袋模型。
PCT/CN2018/097497 2018-05-22 2018-07-27 文本相似度的获取方法、装置、终端设备及介质 WO2019223103A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810495130.5 2018-05-22
CN201810495130.5A CN108710613B (zh) 2018-05-22 2018-05-22 文本相似度的获取方法、终端设备及介质

Publications (1)

Publication Number Publication Date
WO2019223103A1 true WO2019223103A1 (zh) 2019-11-28

Family

ID=63868585

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/097497 WO2019223103A1 (zh) 2018-05-22 2018-07-27 文本相似度的获取方法、装置、终端设备及介质

Country Status (2)

Country Link
CN (1) CN108710613B (zh)
WO (1) WO2019223103A1 (zh)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941961A (zh) * 2019-11-29 2020-03-31 秒针信息技术有限公司 一种信息聚类方法、装置、电子设备及存储介质
CN111159977A (zh) * 2020-04-07 2020-05-15 深圳华大基因科技服务有限公司 一种人类表型标准用语确定方法及装置
CN111443897A (zh) * 2020-03-30 2020-07-24 腾讯科技(深圳)有限公司 一种数据处理方法、装置及存储介质
CN111523140A (zh) * 2020-04-23 2020-08-11 周婷 签名文档的加密方法、装置、训练方法、存储介质及设备
CN111581092A (zh) * 2020-05-07 2020-08-25 安徽星环人工智能科技有限公司 仿真测试数据的生成方法、计算机设备及存储介质
CN111708875A (zh) * 2020-06-02 2020-09-25 北京北大软件工程股份有限公司 一种基于处罚特征的行政执法类案推荐方法
CN111859901A (zh) * 2020-07-15 2020-10-30 大连理工大学 一种英文重复文本检测方法、***、终端及存储介质
CN112131348A (zh) * 2020-09-29 2020-12-25 四川财经职业学院 基于文本和图像相似度防止项目重复申报的方法
CN112883730A (zh) * 2021-03-25 2021-06-01 平安国际智慧城市科技股份有限公司 相似文本匹配方法、装置、电子设备及存储介质
CN113806486A (zh) * 2021-09-23 2021-12-17 深圳市北科瑞声科技股份有限公司 长文本相似度的计算方法及装置、存储介质、电子装置
CN114139523A (zh) * 2021-11-25 2022-03-04 北京中交兴路信息科技有限公司 名称比对的方法、装置、电子设备及介质
CN115878759A (zh) * 2023-01-05 2023-03-31 京华信息科技股份有限公司 一种文本查找方法、装置及存储介质
CN116522911A (zh) * 2023-06-29 2023-08-01 恒生电子股份有限公司 实体对齐方法及装置
CN117743838A (zh) * 2024-02-20 2024-03-22 卓世智星(成都)科技有限公司 用于大语言模型的数据知识提取方法

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111259656A (zh) * 2018-11-15 2020-06-09 武汉斗鱼网络科技有限公司 短语相似度计算方法、存储介质、电子设备及***
CN109740042A (zh) * 2018-11-27 2019-05-10 平安科技(深圳)有限公司 舆论信息的监控方法、装置及存储介质、计算机设备
CN109710898B (zh) * 2018-12-07 2023-02-03 网智天元科技集团股份有限公司 文本的查重方法、装置、电子设备及存储介质
CN109783778B (zh) * 2018-12-20 2020-10-23 北京中科闻歌科技股份有限公司 文本溯源方法、设备及存储介质
CN111382246B (zh) * 2018-12-29 2023-03-14 深圳市优必选科技有限公司 文本的匹配方法、匹配装置、终端及计算机可读存储介质
CN110110295B (zh) * 2019-04-04 2023-10-20 平安科技(深圳)有限公司 大样本研报信息提取方法、装置、设备及存储介质
CN110188352B (zh) * 2019-05-28 2023-05-26 北京金山数字娱乐科技有限公司 一种文本主题确定方法、装置、计算设备及存储介质
CN110597971B (zh) * 2019-08-22 2022-04-29 卓尔智联(武汉)研究院有限公司 基于神经网络的自动问答装置、方法及可读存储介质
CN110688472A (zh) * 2019-10-09 2020-01-14 厦门今立方科技有限公司 一种自动筛选问题答案的方法、终端设备及存储介质
CN110737768B (zh) * 2019-10-16 2022-04-08 信雅达科技股份有限公司 基于深度学习的文本摘要自动生成方法及装置、存储介质
CN112910674B (zh) * 2019-12-04 2023-04-18 ***通信集团设计院有限公司 物理站点筛选方法、装置、电子设备及存储介质
CN111177321B (zh) * 2019-12-27 2023-10-20 东软集团股份有限公司 一种确定语料的方法、装置、设备及存储介质
CN112597281A (zh) * 2020-12-28 2021-04-02 中国农业银行股份有限公司 一种信息获取方法及装置
CN112749256A (zh) * 2020-12-30 2021-05-04 北京知因智慧科技有限公司 文本处理方法、装置、设备及存储介质
CN113642310B (zh) * 2021-07-14 2022-04-19 广州市玄武无线科技股份有限公司 一种终端数据相似度度量方法
CN113688954A (zh) * 2021-10-25 2021-11-23 苏州浪潮智能科技有限公司 一种计算文本相似度的方法、***、设备和存储介质
CN114297501A (zh) * 2021-12-29 2022-04-08 中国建设银行股份有限公司 文本推荐方法、装置、设备及介质
CN114428836A (zh) * 2021-12-30 2022-05-03 沈阳东软智能医疗科技研究院有限公司 信息处理方法、装置、可读存储介质及电子设备
CN114331766B (zh) * 2022-01-05 2022-07-08 中国科学技术信息研究所 专利技术核心度的确定方法、装置、电子设备及存储介质
CN117875262B (zh) * 2024-03-12 2024-06-04 青岛天一红旗软控科技有限公司 基于管理平台的数据处理方法

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251841A (zh) * 2007-05-17 2008-08-27 华东师范大学 基于语义的Web文档的特征矩阵的建立和检索方法
CN104102626A (zh) * 2014-07-07 2014-10-15 厦门推特信息科技有限公司 一种用于短文本语义相似度计算的方法
CN107391727A (zh) * 2017-08-01 2017-11-24 北京航空航天大学 设备故障序列模式的挖掘方法及装置

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008023470A1 (fr) * 2006-08-21 2008-02-28 Kyoto University Procédé de recherche de phrase, moteur de recherche de phrase, programme informatique, support d'enregistrement et stockage de document
CN102012985B (zh) * 2010-11-19 2013-12-25 国网电力科学研究院 一种基于数据挖掘的敏感数据动态识别方法
CN103207899B (zh) * 2013-03-19 2016-12-07 新浪网技术(中国)有限公司 文本文件推荐方法及***
CN106951422B (zh) * 2016-01-07 2021-05-28 腾讯科技(深圳)有限公司 网页训练的方法和装置、搜索意图识别的方法和装置
CN107291686B (zh) * 2016-04-13 2020-10-16 北京大学 情感标识的辨识方法和情感标识的辨识***
CN106570708B (zh) * 2016-10-31 2020-09-11 厦门快商通科技股份有限公司 一种智能客服知识库的管理方法及***
CN107992542A (zh) * 2017-11-27 2018-05-04 中山大学 一种基于主题模型的相似文章推荐方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101251841A (zh) * 2007-05-17 2008-08-27 华东师范大学 基于语义的Web文档的特征矩阵的建立和检索方法
CN104102626A (zh) * 2014-07-07 2014-10-15 厦门推特信息科技有限公司 一种用于短文本语义相似度计算的方法
CN107391727A (zh) * 2017-08-01 2017-11-24 北京航空航天大学 设备故障序列模式的挖掘方法及装置

Cited By (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110941961A (zh) * 2019-11-29 2020-03-31 秒针信息技术有限公司 一种信息聚类方法、装置、电子设备及存储介质
CN110941961B (zh) * 2019-11-29 2023-08-25 秒针信息技术有限公司 一种信息聚类方法、装置、电子设备及存储介质
CN111443897A (zh) * 2020-03-30 2020-07-24 腾讯科技(深圳)有限公司 一种数据处理方法、装置及存储介质
CN111159977A (zh) * 2020-04-07 2020-05-15 深圳华大基因科技服务有限公司 一种人类表型标准用语确定方法及装置
CN111159977B (zh) * 2020-04-07 2020-09-08 深圳华大基因科技服务有限公司 一种人类表型标准用语确定方法及装置
CN111523140A (zh) * 2020-04-23 2020-08-11 周婷 签名文档的加密方法、装置、训练方法、存储介质及设备
CN111523140B (zh) * 2020-04-23 2024-02-23 国网浙江省电力有限公司物资分公司 签名文档的加密方法、装置、训练方法、存储介质及设备
CN111581092B (zh) * 2020-05-07 2023-05-30 安徽星环人工智能科技有限公司 仿真测试数据的生成方法、计算机设备及存储介质
CN111581092A (zh) * 2020-05-07 2020-08-25 安徽星环人工智能科技有限公司 仿真测试数据的生成方法、计算机设备及存储介质
CN111708875A (zh) * 2020-06-02 2020-09-25 北京北大软件工程股份有限公司 一种基于处罚特征的行政执法类案推荐方法
CN111708875B (zh) * 2020-06-02 2023-11-03 北京北大软件工程股份有限公司 一种基于处罚特征的行政执法类案推荐方法
CN111859901A (zh) * 2020-07-15 2020-10-30 大连理工大学 一种英文重复文本检测方法、***、终端及存储介质
CN112131348A (zh) * 2020-09-29 2020-12-25 四川财经职业学院 基于文本和图像相似度防止项目重复申报的方法
CN112131348B (zh) * 2020-09-29 2022-08-09 四川财经职业学院 基于文本和图像相似度防止项目重复申报的方法
CN112883730A (zh) * 2021-03-25 2021-06-01 平安国际智慧城市科技股份有限公司 相似文本匹配方法、装置、电子设备及存储介质
CN112883730B (zh) * 2021-03-25 2023-01-17 平安国际智慧城市科技股份有限公司 相似文本匹配方法、装置、电子设备及存储介质
CN113806486A (zh) * 2021-09-23 2021-12-17 深圳市北科瑞声科技股份有限公司 长文本相似度的计算方法及装置、存储介质、电子装置
CN113806486B (zh) * 2021-09-23 2024-05-10 深圳市北科瑞声科技股份有限公司 长文本相似度的计算方法及装置、存储介质、电子装置
CN114139523A (zh) * 2021-11-25 2022-03-04 北京中交兴路信息科技有限公司 名称比对的方法、装置、电子设备及介质
CN115878759B (zh) * 2023-01-05 2023-05-26 京华信息科技股份有限公司 一种文本查找方法、装置及存储介质
CN115878759A (zh) * 2023-01-05 2023-03-31 京华信息科技股份有限公司 一种文本查找方法、装置及存储介质
CN116522911A (zh) * 2023-06-29 2023-08-01 恒生电子股份有限公司 实体对齐方法及装置
CN116522911B (zh) * 2023-06-29 2023-10-03 恒生电子股份有限公司 实体对齐方法及装置
CN117743838A (zh) * 2024-02-20 2024-03-22 卓世智星(成都)科技有限公司 用于大语言模型的数据知识提取方法
CN117743838B (zh) * 2024-02-20 2024-04-30 卓世智星(成都)科技有限公司 用于大语言模型的数据知识提取方法

Also Published As

Publication number Publication date
CN108710613B (zh) 2022-04-08
CN108710613A (zh) 2018-10-26

Similar Documents

Publication Publication Date Title
WO2019223103A1 (zh) 文本相似度的获取方法、装置、终端设备及介质
US11138250B2 (en) Method and device for extracting core word of commodity short text
WO2019200806A1 (zh) 文本分类模型的生成装置、方法及计算机可读存储介质
US11544459B2 (en) Method and apparatus for determining feature words and server
WO2019091026A1 (zh) 知识库文档快速检索方法、应用服务器及计算机可读存储介质
CN109471933B (zh) 一种文本摘要的生成方法、存储介质和服务器
WO2019174132A1 (zh) 数据处理方法、服务器及计算机存储介质
US10579661B2 (en) System and method for machine learning and classifying data
US9323794B2 (en) Method and system for high performance pattern indexing
US20160283583A1 (en) Method, apparatus, and storage medium for text information processing
US20220012231A1 (en) Automatic content-based append detection
JP5544602B2 (ja) 単語意味関係抽出装置及び単語意味関係抽出方法
US20110078152A1 (en) Method and system for processing text
WO2022121163A1 (zh) 用户行为倾向识别方法、装置、设备及存储介质
CN110110332B (zh) 文本摘要生成方法及设备
CN111831804A (zh) 一种关键短语的提取方法、装置、终端设备及存储介质
CN109947903B (zh) 一种成语查询方法及装置
CN106372640A (zh) 一种字频文本分类方法
WO2022105178A1 (zh) 一种关键词提取的方法及相关装置
JP2020521408A (ja) データの圧縮および分析のコンピュータ化された方法
US20150039290A1 (en) Knowledge-rich automatic term disambiguation
CN109753646B (zh) 一种文章属性识别方法以及电子设备
CN108628875B (zh) 一种文本标签的提取方法、装置及服务器
CN110489759B (zh) 基于词频的文本特征加权及短文本相似性计算方法、***和介质
EP3425531A1 (en) System, method, electronic device, and storage medium for identifying risk event based on social information

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: 18919483

Country of ref document: EP

Kind code of ref document: A1

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 26.03.2021)

122 Ep: pct application non-entry in european phase

Ref document number: 18919483

Country of ref document: EP

Kind code of ref document: A1