Keyword extraction method and device, electronic equipment, storage medium and program product

Keywords in speech-transcribed text are identified through dependency parsing, and the accuracy of keyword extraction is improved by utilizing the weights of direct and indirect dependency relationships. This solves the problems of insufficient real-time performance and accuracy in existing technologies and achieves efficient keyword extraction.

CN120805893APending Publication Date: 2025-10-17HANVON CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510912855.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-02
Publication Date
2025-10-17

AI Technical Summary

Technical Problem

Existing methods for extracting keywords from speech-transcribed text have shortcomings in terms of real-time performance and accuracy. In particular, the TextRank algorithm based on graph structures cannot effectively capture the semantic dependencies between long-distance words, resulting in low keyword recall accuracy and failing to meet the requirements for high real-time performance and precision.

Method used

By using dependency parsing to identify words with direct and indirect dependencies in the text and their weights, the importance scores of keywords are improved by using the weights of indirect dependencies, and words with importance scores higher than the preset value are extracted as keywords, thus overcoming the limitations of the sliding window approach.

Benefits of technology

It improves the accuracy of keyword recall, solves the problem of insufficient accuracy in speech transcription scenarios, and meets the application requirements of high real-time performance and controllability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120805893A_ABST
    Figure CN120805893A_ABST
Patent Text Reader

Abstract

The invention provides a keyword extraction method and device, electronic equipment, a storage medium and a program product, and relates to the technical field of natural language processing. The method comprises the steps that dependency syntactic analysis is conducted on a text, words with the syntactic dependency relationship in the text and the direct dependency relationship between the words are obtained, the direct dependency relationship weight is mapped for the direct dependency relationship, and the direct dependency relationship weight represents the importance degree of the words with the direct dependency relationship; words with indirect dependency relationships are determined, and indirect dependency relationship weights are determined based on direct dependency relationship weights included among the words with the indirect dependency relationships; based on the indirect dependency relationship weight, determining importance scores of words with syntactic dependency relationships in the text; and extracting the words of which the importance scores are greater than a preset value, and taking the extracted words as keywords. According to the method and the device, the recall quality of the keywords is improved, and the problem of insufficient accuracy in a speech transcription scene in the prior art is solved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure generally relates to the technical field of speech transcription text processing, and particularly relates to a keyword extraction method and device, electronic equipment, storage medium and program product. BACKGROUND

[0002] Speech transcription is the process of converting spoken content in audio or video into editable and searchable text form.

[0003] In the process of real-time speech transcription, users generally need to extract keywords in the transcription text in order to quickly locate the core content through the keywords. At present, the keyword extraction methods include extraction method and generation method. Among them, the extraction method includes unsupervised statistical method and supervised learning method. The unsupervised statistical method, such as Term Frequency-Inverse Document Frequency (TF-IDF) algorithm or TextRank algorithm, can determine the keywords by calculating the importance of words through word frequency or co-occurrence network. The supervised learning method, such as Bidirectional LSTM with Conditional Random Fields (BiLSTM-CRF) model, determines the keywords by sequence labeling. The generation method, such as sequence-to-sequence model (Seq2Seq model) architecture or Large Language Model (LLM), generates new words (such as GPT-4.0, GLM4-9B-Chat).

[0004] However, the generation method requires large computing resources and high cost, which cannot meet the high real-time requirement of speech transcription text. Among the computing resources, real-time and accuracy, the TextRank algorithm based on graph structure performs outstandingly, and the keyword extraction of 20,000 words of text only takes 400ms, which fully meets the real-time requirement of users in the use process. However, when the TextRank algorithm is used for keyword extraction of speech transcription text, the average accuracy of keyword recall is low, which cannot meet the use requirement of quickly locating the core content according to the extracted keywords. SUMMARY

[0005] In order to solve the above problems existing in the prior art, the present disclosure provides a keyword extraction method, device, electronic equipment, storage medium and program product.

[0006] The first aspect of the present disclosure provides a keyword extraction method, comprising: obtaining a text to be subjected to keyword extraction; performing dependency syntax analysis on the text to obtain words having a syntax dependency relationship in the text and direct dependency relationships between the words, and mapping a direct dependency relationship weight to the direct dependency relationship, the direct dependency relationship being a dependency relationship between words having a minimum syntax distance, and the direct dependency relationship weight representing the importance of the words having the direct dependency relationship; determining words having an indirect dependency relationship and determining an indirect dependency relationship weight, wherein the indirect dependency relationship is a dependency relationship between words having at least two consecutive minimum syntax distances, and the indirect dependency relationship weight is determined based on the direct dependency relationship weights included between the words having the indirect dependency relationship; determining the importance scores of the words having the syntax dependency relationship in the text based on the indirect dependency relationship weight; extracting words having an importance score greater than a preset value, and taking the extracted words as keywords.

[0007] In some embodiments, the indirect dependency relationship weight is determined based on the direct dependency relationship weights included between the words having the indirect dependency relationship in the following manner: based on the words having the syntax dependency relationship, all target words in the text are determined, the target words being words in the text that are the same but have different indirect dependency relationships; in response to the number of target words being N, the N being a positive integer, the indirect dependency relationship weight is determined based on the respective direct dependency relationship weight for each target word in the N target words, N indirect dependency relationship weights are obtained, and the sum of the N indirect dependency relationship weights is taken as the indirect dependency relationship weight of the target words.

[0008] In some embodiments, the method further comprises: determining the number of times that the words having the indirect dependency relationship appear in a sliding window, and determining a co-occurrence relationship weight based on the number of times, the sliding window being a window that slides from front to back in the text according to a set step size, and the co-occurrence relationship weight representing how many times the number of times is; fusing the indirect dependency relationship weight and the co-occurrence relationship weight to obtain a fused indirect dependency relationship weight; and determining the importance scores of the words having the syntax dependency relationship in the text based on the indirect dependency relationship weight comprises: determining the importance scores of the words having the syntax dependency relationship in the text based on the fused indirect dependency relationship weight.

[0009] In some embodiments, the fusing the indirect dependency relation weight and the co-occurrence relation weight to obtain a fused indirect dependency relation weight comprises: traversing all words with dependency relations in the text, and determining a co-occurrence relation weight of each word among the all words with dependency relations, and determining a minimum weight and a maximum weight among all co-occurrence relation weights; determining a first difference value between a current co-occurrence relation weight of the word with the indirect dependency relation and the minimum weight, and determining a second difference value between the maximum weight and the minimum weight, and determining a ratio between the first difference value and the second difference value as a normalized co-occurrence relation weight; and taking a sum of the normalized co-occurrence relation weight and the indirect dependency relation weight as the fused indirect dependency relation weight.

[0010] In some embodiments, a syntactic distance between the words used to calculate the indirect dependency relation weight is less than or equal to a preset syntactic distance threshold.

[0011] In some embodiments, the method further comprises, before the dependency syntactic analysis of the text, performing semantic integrity segmentation on the text to obtain text blocks; wherein the text subjected to the dependency syntactic analysis is the segmented text blocks; and the N indirect dependency relation weights are determined in parallel in units of text blocks.

[0012] In some embodiments, the determining the word with the indirect dependency relation and determining the indirect dependency relation weight comprises: constructing a bidirectional graph based on the words with syntactic dependency relations in the text and the direct dependency relations between the words, wherein a node in the bidirectional graph is a word with a syntactic dependency relation, an edge between adjacent word nodes in the bidirectional graph represents a direct dependency relation between the words, and the edge corresponds to a weight, which is a weight of the direct dependency relation; determining a first and a last word sequentially connected by at least two adjacent edges in the bidirectional graph as the word with the indirect dependency relation, and determining an indirect dependency relation weight of the word with the indirect dependency relation based on the weight of each edge between the first and the last word.

[0013] In some embodiments, the mapping the direct dependency relation weight for the direct dependency relation comprises: determining a weight matching the direct dependency relation based on a correspondence between syntactic dependency relations and weights, and mapping the matching weight as the direct dependency relation weight.

[0014] In some embodiments, before the semantic integrity segmentation of the text, the method further comprises performing at least one of the following preprocessing on the text: deleting repetitive words; normalizing punctuation marks, numbers and special characters; segmenting words, and annotating the segmented words with parts of speech; and filtering stop words.

[0015] In some embodiments, the text is a spoken language speech transcription text.

[0016] A second aspect of the present disclosure provides a keyword extraction device, comprising: an acquisition module configured to acquire a text to be subjected to keyword extraction; and a processing module configured to perform dependency syntax analysis on the text to obtain words having a syntactic dependency relationship in the text and direct dependency relationships between the words, map a direct dependency relationship weight to the direct dependency relationships, the direct dependency relationship being a dependency relationship between words having a minimum syntactic distance, the direct dependency relationship weight representing an importance degree of the words having the direct dependency relationship and being used to determine words having an indirect dependency relationship and determine an indirect dependency relationship weight, the indirect dependency relationship being a dependency relationship between words having at least two consecutive minimum syntactic distances, the indirect dependency relationship weight being determined based on the direct dependency relationship weights included between the words having the indirect dependency relationship, and the processing module being further configured to determine an importance score of the words having the syntactic dependency relationship in the text based on the indirect dependency relationship weight, extract words having an importance score greater than a preset value, and take the extracted words as keywords.

[0017] In some embodiments, the processing module determines the indirect dependency relationship weight based on the direct dependency relationship weights included between the words having the indirect dependency relationship in the following manner: based on the words having the syntactic dependency relationship, all target words in the text are determined, the target words being words in the text that are identical in terms of words but different in terms of indirect dependency relationships; in response to the number of the target words being N, the N being a positive integer, an indirect dependency relationship weight is determined for each of the N target words based on the respective corresponding direct dependency relationship weight, N indirect dependency relationship weights are obtained, and a sum of the N indirect dependency relationship weights is taken as the indirect dependency relationship weight of the target words.

[0018] In some embodiments, the processing module is further configured to: determine a number of times that the words having the indirect dependency relationship appear in a sliding window, the sliding window being a window that slides from front to back in the text according to a set step size, and determine a co-occurrence relationship weight based on the number of times, the co-occurrence relationship weight representing how many the number of times is; fuse the indirect dependency relationship weight and the co-occurrence relationship weight to obtain a fused indirect dependency relationship weight; and determine the importance score of the words having the syntactic dependency relationship in the text based on the fused indirect dependency relationship weight.

[0019] In some embodiments, the processing module fuses the indirect dependency relation weight and the co-occurrence relation weight in the following manner to obtain a fused indirect dependency relation weight: traversing all dependency relation having words in the text, determining the co-occurrence relation weight of each word among the all dependency relation having words, and determining the minimum weight and the maximum weight among all co-occurrence relation weights; determining a first difference value between the current co-occurrence relation weight of the indirect dependency relation having word and the minimum weight, and determining a second difference value between the maximum weight and the minimum weight, determining the ratio between the first difference value and the second difference value as a normalized co-occurrence relation weight; taking the sum of the normalized co-occurrence relation weight and the indirect dependency relation weight as the fused indirect dependency relation weight.

[0020] In some embodiments, the syntactic distance between the words used to calculate the indirect dependency relation weight is less than or equal to a preset syntactic distance threshold.

[0021] In some embodiments, the processing module is further configured to perform semantic integrity blocking on the text to obtain text blocks before performing dependency syntactic analysis on the text; wherein the text subjected to dependency syntactic analysis is the blocked text blocks; and the N indirect dependency relation weights are determined in parallel in units of text blocks.

[0022] In some embodiments, the processing module determines the indirect dependency relation having words and the indirect dependency relation weight in the following manner: based on the words having syntactic dependency relation in the text and the direct dependency relation between the words, a bidirectional directed graph is constructed, wherein the nodes in the bidirectional directed graph are the words having syntactic dependency relation, the edges between adjacent word nodes in the bidirectional directed graph represent the direct dependency relation between the words, and the edges correspond to weights, and the weights are the weights of the direct dependency relation; the first and last words sequentially connected by at least two adjacent edges in the bidirectional directed graph are determined as the indirect dependency relation having words, and the indirect dependency relation weight of the indirect dependency relation having words is determined based on the weights of the edges between the first and last words.

[0023] In some embodiments, the processing module maps the direct dependency relation weight to the direct dependency relation in the following manner: based on the correspondence between the syntactic dependency relation and the weight, the weight matching the direct dependency relation is determined, and the matching weight is mapped as the direct dependency relation weight.

[0024] In some embodiments, the processing module is further configured to, before performing semantic integrity segmentation on the text, perform at least one of the following preprocessing on the text: deleting repetitive words; normalizing punctuation marks, numbers and special characters; segmenting the text and tagging the segmented words with parts of speech; and filtering stop words.

[0025] In some embodiments, the text is a spoken language speech transcription text.

[0026] A third aspect of the present disclosure provides an electronic device, comprising: a memory configured to store instructions; and a processor configured to invoke the instructions stored in the memory to perform the keyword extraction method according to the first aspect.

[0027] A fourth aspect of the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and the instructions are executed by a processor to perform the keyword extraction method according to the first aspect.

[0028] A fifth aspect of the present disclosure provides a computer program product, comprising a computer program, wherein the computer program is executed by a processor to implement the keyword extraction method according to the first aspect.

[0029] The keyword extraction method provided by the present disclosure determines the words with indirect dependency relationships in the text and the weights of the indirect dependency relationships by introducing dependency syntax analysis, and determines the importance scores of the words with syntactic dependency relationships in the text based on the weights of the indirect dependency relationships; and extracts the words with importance scores greater than a preset value as keywords. Since the semantic dependency between long-distance words in the text is effectively captured, and the limitation of using a sliding window in the TextRank algorithm based on a graph structure is broken, the keyword extraction method provided by the present disclosure can improve the recall quality of keywords, and solves the problem of insufficient precision of the extraction method in the speech transcription scene in the related art, while meeting the application requirements of high real-time performance and controllability. BRIEF DESCRIPTION OF DRAWINGS

[0030] The above and other objects, features and advantages of the embodiments of the present disclosure will be readily understood through reading the detailed description of the embodiments of the present disclosure below in conjunction with the accompanying drawings. In the drawings, several embodiments of the present disclosure are illustrated in an exemplary and non-limiting manner, in which:

[0031] Figure 1 A flowchart of the keyword extraction method provided by an embodiment of the present disclosure is shown.

[0032] Figure 2 An example result diagram of dependency syntax analysis provided by an embodiment of the present disclosure is shown.

[0033] Figure 3A flowchart of a method for determining an indirect dependency relationship weight is shown.

[0034] Figure 4 A flowchart of a method for determining an indirect dependency relationship weight is shown.

[0035] Figure 5 A flowchart of a method for determining an indirect dependency relationship weight is shown. Figure 2 A bidirectional directed graph is constructed.

[0036] Figure 6 A flowchart of a method for determining an indirect dependency relationship weight is shown.

[0037] Figure 7 A flowchart of a method for determining an indirect dependency relationship weight is shown.

[0038] Figure 8 A block diagram of a keyword extraction device is shown.

[0039] Figure 9 An electronic device is shown.

[0040] In the drawings, identical or corresponding reference signs indicate identical or corresponding parts. DETAILED DESCRIPTION

[0041] The principles and spirits of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are given only to enable those skilled in the art to better understand and implement the present disclosure, and do not limit the scope of the present disclosure in any way.

[0042] It should be noted that although the terms "first", "second", and the like are used herein to describe different modules, steps, and data of the embodiments of the present disclosure, the terms "first", "second", and the like are only used to distinguish between different modules, steps, and data, and do not indicate a specific order or importance. In fact, the terms "first", "second", and the like can be used interchangeably.

[0043] The keyword extraction method provided by the present disclosure can be provided to users as a mature product rather than a research and development project. Specifically, it can be applied to scenarios of obtaining keywords from real-time transcription of voice text to quickly obtain the core content of the transcription text. For example, when recording the content of a meeting on site, the method provided by the present disclosure can be applied to extract keywords from the text after transcribing the speech of the speaker into text, quickly locate the core content of the speech, and record and organize it. Due to the keyword extraction method provided by the present disclosure, the recall accuracy of the keywords is high, and it can meet the real-time requirements of meeting recording. Therefore, it can accurately record the content of the meeting and convey the spirit of the meeting, and can also record the meeting in real time and comprehensively without missing anything. The present disclosure does not limit the specific application scenarios.

[0044] In related technologies, common keyword extraction methods include extraction methods and generation methods. However, the generation method relies on a large language model to freely generate keywords, which has the following fundamental defects:

[0045] 1. Limitation of compliance and controllability. First, the voice transcription text itself has a word error rate of 1.5%-2%, and the generation method further introduces the "hallucination" problem (the problem of generating incorrect words) on this basis, leading to the transmission of errors and the accumulation of errors. Second, the generation method cannot provide a clear mapping of the source of the keywords, making the results untraceable to the original text, and thus unable to meet the requirements of auditable manuscripts in the fields of finance, medicine and law. In addition, in specific vertical fields (such as medical terminology and legal provisions), the generation method lacks a reliable domain constraint mechanism, resulting in a high error rate of professional terms.

[0046] 2. Limitation of real-time and computing resources. First, the generation method has an exponential growth in computational complexity when processing long text. For a 20,000-word text, the mainstream open-source LLM inference time is 7-9 seconds, far exceeding the real-time requirement of 2 seconds, so it cannot meet the real-time requirement. In addition, the generation method is difficult to effectively utilize the parallel computing capability of GPU for batch processing, and in high-concurrency scenarios (such as enterprise-level meeting systems), the resource utilization rate is low, and the processing capacity per unit time is limited.

[0047] 3. Cost and sustainability limitations. First, high-quality keyword extraction (90+%) requires reliance on large parameter models (100B+), which are costly to deploy locally and privately. Small parameter models (<10B) significantly decrease accuracy on colloquial text (by 30-40 percentage points) and generate too many new words, making it impossible to balance parameter size and effectiveness. Second, generative methods based on third-party service interfaces (API) calls introduce external dependencies, increasing the risk of service disruptions and data privacy leaks, which do not meet the rigid requirements of enterprise-level applications for stability and data security.

[0048] Therefore, generative methods are subject to three constraints: product compliance and controllability, real-time and computing resource limitations, cost and sustainability limitations, making them unsuitable for direct application in keyword extraction scenarios for voice transcription text.

[0049] The TextRank algorithm in the extractive method can meet the real-time requirement, but it has the following two defects:

[0050] 1. Window-dependent limitations: TextRank algorithm uses a fixed-size sliding window (e.g., 5 by default in jieba, a widely used Chinese word segmentation tool in Python) to calculate word co-occurrence relationships. This mechanical near-neighbor statistical mechanism artificially cuts off semantic associations between long-distance words in the text, leading to incorrect keywords and, ultimately, incorrect key information. In strongly colloquial transcription text, key information is often separated by filler words and repetitive expressions, resulting in high-frequency but unimportant repetitive colloquial expressions being identified as key words, which prevents the extraction of key information. Additionally, the sliding window size parameter is difficult to balance: too small may result in insufficient word associations, while too large may introduce noise and computational redundancy.

[0051] 2. Lack of semantic structure awareness: Graph structure algorithms treat text as a flat word sequence, lacking the ability to understand language structure and unable to identify differences in the importance of syntactic components. They treat core components such as subject, predicate, and object equally with modifying components, lack sensitivity to low-frequency professional terms, often ignoring core concepts in professional conference scenarios, and lack semantic-level abstract understanding, making it difficult to induce conceptual keywords and only extracting surface words.

[0052] Therefore, in view of the three characteristics of the speech real-time transcription text: strong colloquialization (such as "Hmm, this idea is not quite right, try putting the rule of the third step in front of it, yes, adjust it to the front of the second step..."), high frequency repetition of meetings (such as "But now the comparison is more prominent estimate after a long time..."), and logical breakage (such as "This is what we are passing on to you. If strong and prohibited are compared..."). The TextRank algorithm based on the graph structure is used for keyword extraction of the speech transcription text, and the average accuracy of keyword recall is about 20% lower than the optimal generative method (closed API call), which is not suitable for keyword extraction scenarios of speech transcription text.

[0053] In view of the above problems, the present disclosure provides a keyword extraction method, the core idea of which is to obtain words with direct dependency and direct dependency weight through dependency syntax analysis of the text. Then, based on the direct dependency, words with indirect dependency and indirect dependency weight are determined. Then, the indirect dependency weight between words is used to effectively capture the semantic dependency between long-distance words in the text, thereby breaking through the limitation of using a sliding window in the TextRank algorithm based on the graph structure, and improving the recall quality of the keywords. The keyword extraction method provided by the present disclosure solves the problem of insufficient accuracy of traditional extraction methods in the speech transcription scene, while maintaining high real-time performance and controllability.

[0054] As shown in Figure 1 One embodiment of the present disclosure provides a keyword extraction method which can be executed in the form of a computer program (such as an APP). Figure 1 A flowchart of the keyword extraction method provided by an embodiment of the present disclosure is shown.

[0055] Referring to Figure 1 The keyword extraction method provided by one embodiment of the present disclosure can include the following steps S101 to S105.

[0056] In step S101, the text to be subjected to keyword extraction is obtained.

[0057] The text can be a speech transcription text or a written text. The speech transcription text can be a part of the speech real-time transcription text or a complete speech real-time transcription text. The speech transcription text can be a written language speech transcription text or a spoken language speech transcription text.

[0058] In this step, the text to be subjected to keyword extraction is obtained, which can be understood as that the computer program receives the text to be subjected to keyword extraction as input.

[0059] In step S102, dependency syntactic analysis is performed on the text to obtain words with syntactic dependency relationships in the text and direct dependency relationships between the words, and direct dependency weights are mapped to the direct dependency relationships.

[0060] The direct dependency is the dependency between words with the minimum syntactic distance, and the direct dependency weight represents the importance of words with direct dependency.

[0061] Through dependency parsing, linear text sequences can be transformed into structured representations (which can also be represented in a tree format, forming a dependency syntactic tree). This structured representation clearly reveals the grammatical dominance relationships and semantic associations between words, thereby excavating the underlying grammatical structure of the text. Dependency parsing of text reveals the following information: which word is the core word of the sentence (usually the predicate verb), which words directly modify this core word (usually the subject, object, adverbial, etc.), how the modifiers are organized internally (which head word does the attributive modify, which verb does the adverbial modify, etc.), what the specific grammatical roles are between words (who is the agent and who is the patient, how time and place relate to the action, etc.). This structured representation is the cornerstone for understanding sentence meaning and conducting deeper semantic analysis (such as semantic role labeling, relationship extraction, and sentiment analysis).

[0062] In the embodiment of the present disclosure, a dependency syntax analysis tool (for example, one that has advantages in terms of the characteristics of the Chinese language and supports multiple syntactic relationship annotations) can be used to perform dependency syntax analysis on the text. The analysis process can be as follows: the text to be subjected to dependency syntax analysis is input into the dependency syntax analysis tool. The analysis tool performs word segmentation, part-of-speech tagging, and dependency syntax parsing. The output includes a triple (word A, word B, syntactic dependency relationship type) of word nodes and syntactic dependency relationships between word nodes.

[0063] like Figure 2 As shown, Figure 2 FIG1 shows an example result diagram of dependency syntactic analysis provided by an embodiment of the present disclosure. Figure 2 In the example above, the result of dependency parsing on the sentence "Deep learning models require a large amount of labeled data and powerful computing power" can be seen as follows: Figure 2 As shown. Figure 2It can be directly seen that each word in the text has a syntactic dependency relationship with at least one other word. For example, the dependency relationship between the words "depth" and "learning" is ADV (adverbial relationship), the dependency relationship between "learning" and "model" is ATT (attributive relationship), the dependency relationship between "a large amount" and "data" is ATT, and the dependency relationship between "data" and "need" is VOB (verb-object relationship). That is, through dependency syntactic analysis, we can get the words with syntactic dependencies in the text, as well as the direct dependencies between words ( Figure 2 , also includes SBV (subject-verb relationship), LAD (left-additive relationship), COO (coordinate relationship), and HED (core predicate of the whole sentence). Among them, direct dependency can be understood as the dependency relationship between words with the minimum syntactic distance. Syntactic distance can be understood as the shortest path length between nodes calculated based on syntactic relationships. That is, the two words used to calculate syntactic distance do not include intermediate nodes.

[0064] In an embodiment of the present disclosure, after the words with direct dependency are determined, direct dependency weights may be mapped to the direct dependency, and the importance of the words with direct dependency may be represented by the direct dependency weights.

[0065] In step S103, words with indirect dependency relationships are determined, and indirect dependency weights are determined.

[0066] The indirect dependency relationship is a dependency relationship between words with at least two consecutive minimum syntactic distances, and the indirect dependency relationship weight is determined based on the direct dependency relationship weight included between the words with the indirect dependency relationship.

[0067] In one embodiment of the present disclosure, the indirect dependency relationship between words can be understood as including at least two consecutive direct dependencies between words, or can be understood as being composed of at least two consecutive direct dependencies, each direct dependency involving two words. Therefore, in addition to the first and last two words, the indirect dependency relationship also includes at least one intermediate word. Figure 2 It can be found that there is a direct dependency relationship between "depth" and "learning", and between "learning" and "model", and these two direct dependencies are continuous. Therefore, these two continuous direct dependencies constitute an indirect dependency relationship between "depth" and "model". The two terms "depth" and "model" are terms with an indirect dependency relationship. In the embodiments of the present disclosure, after determining the terms with an indirect dependency relationship, the indirect dependency weight can be determined, and the indirect dependency weight can be used to represent the importance of the terms with an indirect dependency relationship.

[0068] In step S104, the importance score of the word with the syntactic dependency relationship in the text is determined based on the indirect dependency relationship weight.

[0069] In the embodiment of the present disclosure, by determining the importance score of the word based on the indirect dependency relationship weight, the importance of the word can be more intuitively and clearly represented in a numerical manner.

[0070] In step S105, the word with the importance score greater than the preset value is extracted, and the extracted word is taken as the keyword.

[0071] The importance score of the word can intuitively and clearly represent the importance of the word. Therefore, the importance score of the word can be taken as an index to determine whether the word is a keyword. In the embodiment of the present disclosure, a preset value can be set, and when the importance score of the word is greater than the preset value, the word is extracted as a keyword.

[0072] The keyword extraction method provided by the embodiment of the present disclosure can mine the grammatical domination relationship and semantic association between words by performing dependency syntax analysis on the text, and further determine the importance of the word in the whole text in terms of grammatical domination relationship and semantic association by determining the indirect dependency relationship and the indirect dependency relationship weight. The method can effectively capture long-distance associated words and ensure the integrity of the text in terms of grammar and semantic association logic after keyword extraction. The method not only breaks through the limitation of using a sliding window in the TextRank algorithm based on a graph structure in related technologies, but also improves the recall quality of keywords and solves the problem of insufficient logical precision of extracted text content caused by strong spoken language and logical break in the spoken language transcription scene.

[0073] In an embodiment of the present disclosure, since the text can include multiple direct dependency relationships, and some direct dependency relationships are not very important or have relatively small relevance to the core content when mining the core content of the text, in order to quickly extract the core content of the sentence and reduce the processing time and cost of the program, the direct dependency relationship can be filtered in the embodiment of the present disclosure to retain core dependency relationship types, such as SBV, VOB, ATT, and COO, and delete redundancies, such as PUNC (punctuation relationship). The retained direct dependency relationship types can be dynamically adjusted according to different application scenarios, and the present disclosure does not make specific limitations.

[0074] In an embodiment of the present disclosure, a strategy for mapping the direct dependency relationship weight can be formulated according to different scenarios and requirements, and the part of speech that is focused on, and the direct dependency relationship weight is mapped based on the strategy. For example, in a certain scenario, if it is believed that nouns, verbs and adjectives in the text are more important, then a higher weight can be mapped for the direct dependency relationship corresponding to the word pairs with these part of speech. Conversely, a lower weight is mapped for the direct dependency relationship corresponding to the rest of the word pairs. For example, the weight of the attributive relationship can be mapped as 1.0, the weight of the parataxis relationship can be mapped as 0.8, the weight of the left adjunct relationship can be mapped as 0.1, the weight of the right adjunct relationship can be mapped as 0.1, and the weight of the punctuation relationship can be mapped as 0. In an embodiment of the present disclosure, some corpus can be selected to verify and optimize the correspondence between the set or existing syntactic dependency relationship and the weight. Then, the correspondence between the syntactic dependency relationship and the weight that is set according to the language law and optimized through a large number of experiments is used to determine the weight matched with each direct dependency relationship in the text, and the matched weight is mapped as the direct dependency relationship weight. For example, Figure 3 If the direct dependency relationship between the "learning" and the "model" shown in the figure is the attributive relationship, then the weight matched with the direct dependency relationship between the "learning" and the "model" is 1.0, and the direct dependency relationship weight between the "learning" and the "model" is mapped as 1.0 according to the matched weight, obtaining the direct dependency relationship weight 1.0 between the "learning" and the "model".

[0075] In an embodiment of the present disclosure, after the indirect dependency relationship and the word with the indirect dependency relationship are determined, the indirect dependency relationship weight can be determined. The indirect dependency relationship is associated with the direct dependency relationship, so the indirect dependency relationship weight can be determined by the direct dependency relationship weight. The indirect dependency relationship weight can be understood as a weight used to represent the importance of the word with the indirect dependency relationship. Therefore, the indirect dependency relationship weight is determined to determine the importance of the word with the indirect dependency relationship, so as to ensure that important but long-distance words can be extracted as keywords in keyword extraction, and the recall accuracy of the keywords is improved.

[0076] As shown in Figure 3 As shown in Figure 4 A flowchart of the method for determining the indirect dependency relationship weight provided by an embodiment of the present disclosure is shown.

[0077] In an embodiment of the present disclosure, the indirect dependency relationship weight can be determined based on the direct dependency relationship weight included between the words with the indirect dependency relationship in the following manner:

[0078] In step S301, all target words in the text are determined based on the words with the syntactic dependency relationship.

[0079] The target word is a word in the text that has the same word but different indirect dependency relationships.

[0080] In step S302, in response to the number of target words being N, the indirect dependency relationship weight is determined for each target word in the N target words based on the respective corresponding direct dependency relationship weight, N indirect dependency relationship weights are obtained, and the sum of the N indirect dependency relationship weights is taken as the indirect dependency relationship weight of the target word.

[0081] Wherein, N is a positive integer.

[0082] The same two words in different text segments can form different indirect dependency relationships. Therefore, there can be multiple indirect dependency relationships in the entire text. That is, the same two words correspond to multiple indirect dependency relationships. Each indirect dependency relationship corresponds to at least two direct dependency relationships. Since the weight of each indirect dependency relationship can represent the importance of the word, the weight of multiple indirect dependency relationships is the superposition of the weight of each indirect dependency relationship. Therefore, the more indirect dependency relationships a word has, the higher its indirect dependency relationship weight, and the more important it is in the text. Therefore, it can be determined that the word is a core syntactic component of the text. Therefore, the above method of the present disclosure can better represent the importance of the word in the entire text, better ensure that the word as a core syntactic component is identified during keyword extraction, and improve the indirect dependency relationship weight of the core syntactic component, thereby ensuring that the word as a core syntactic component can be extracted as a keyword. Avoiding ignoring long-distance but important words, improving the recall accuracy of keywords. Experiments show that the keyword extraction method provided by the present disclosure can improve the accuracy of keyword recall by ≥15% compared with the TextRank algorithm based on the graph structure in the related art, close to the level of the generative method.

[0083] In another embodiment of the present disclosure, before step S102, the text can also be subjected to semantic integrity blocking to obtain text blocks; then the blocked text blocks are subjected to dependency syntax analysis respectively; then the determination of N indirect dependency relationship weights can be performed in parallel in units of text blocks to obtain N indirect dependency relationship weights.

[0084] For long texts, the above parallel computing architecture can be used to fully utilize the multi-core processing capability. Not only can the speed of dependency syntax analysis be improved to ensure that the time cost of dependency syntax analysis is controllable, but also the determination speed of indirect dependency relationship weight can be improved. Thus, the time required by the entire program is relatively short, and the total time consumption can be controlled within 2s, meeting the requirement of high real-time response of keyword extraction for speech transcription text.

[0085] In the embodiments of the present disclosure, the semantic integrity segmentation can be performed by the following method:

[0086] In the case that the dependency syntactic analyzer starts the backtracking mechanism (when the length of the text block exceeds 1024 characters (the upper limit of the text length of some syntactic dependency analysis tools), the syntactic dependency analysis tool starts the intelligent backtracking mechanism to find the nearest sentence boundary symbol as the segmentation point from the 1024th character), the segmentation is performed by presetting the forced maximum backtracking distance (which can be preset as 224 characters). Otherwise, the segmentation is performed in the following manner: the text is segmented by the first boundary symbol (such as the sentence boundary symbols of period, question mark, and exclamation mark) to obtain primary segmentation. In the case that the number of characters in the primary segmentation exceeds the preset number, the primary segmentation is segmented by the second boundary symbol (such as semicolon and comma) to obtain secondary segmentation. Or when the first boundary symbol cannot be found in a long sentence, the first boundary symbol cannot be used for segmentation, and the second boundary symbol can be used for segmentation. If there is no punctuation in the long sentence (neither the first boundary symbol nor the second boundary symbol can be found), forced segmentation can be performed.

[0087] In all the obtained segmentation blocks, the repeated text at the connection between the front and rear blocks is retained.

[0088] Since the semantic integrity segmentation is adopted in the present disclosure, and a certain length (such as about 100 characters) of repeated text is retained at the connection between the front and rear blocks. Therefore, the segmentation method adopted in the present disclosure can ensure the semantic association in each segmentation block, and also ensure the semantic association between the segmentation blocks, thereby avoiding the situation that the semantic is incomplete or fragmented due to the loss of context when the syntactic dependency analysis is performed on each segmentation block.

[0089] In an embodiment of the present disclosure, the syntactic distance between words for calculating the weight of the indirect dependency relationship is less than or equal to a preset syntactic distance threshold. In addition to the weight of the direct dependency relationship included in the indirect dependency relationship, a path attenuation factor can be added when determining the weight of the indirect dependency relationship. The path attenuation factor can be set as an empirical value, such as a default value of 0.7. The path can be understood as the syntactic distance between the words having the indirect dependency relationship. By setting the path attenuation factor and using the path attenuation factor in the calculation of the weight of the indirect dependency relationship between the words, the obtained weight of the indirect dependency relationship can be more accurate, thereby making the importance score of the word determined based on the weight of the indirect dependency relationship more accurate, and finally the quality of the extracted keywords higher.

[0090] In the embodiments of the present disclosure, the syntactic distance threshold is set to 3, the indirect dependency relationship between words with a syntactic distance less than or equal to 3 is selected and the weight thereof is determined. The syntactic distance between words with a direct dependency relationship is 1, which is also the minimum syntactic distance between words. If the indirect dependency relationship includes three words, that is, the indirect dependency relationship includes two continuous direct dependency relationships, the syntactic distance between words with an indirect dependency relationship is 2. If the indirect dependency relationship includes four words, that is, the indirect dependency relationship includes three continuous direct dependency relationships, the syntactic distance between words with an indirect dependency relationship is 3. If the syntactic distance between words is less than or equal to 3, the length of the indirect dependency relationship chain is moderate, and will not be too long or too short. If it is too long, the probability of introducing noise is relatively large, and if it is too short, it will lead to long distance fragmentation, which is not conducive to the extraction of semantically related words. The syntactic distance threshold in the embodiments of the present disclosure is set to 3, and other appropriate syntactic distance thresholds can also be set according to the needs of the use scene. For this, the present disclosure does not make specific limitations.

[0091] In an embodiment of the present disclosure, the determination method of the weight of the indirect dependency relationship is described by taking the determination process of the weight of the indirect dependency relationship between word i and word j as an example. The syntactic distance between word i and word j is 2.

[0092] The weight of the indirect dependency relationship between word i and word j can be calculated by the following formula:

[0093]

[0094] Wherein, N is the number of blocks obtained after the text is subjected to semantic integrity blocking; n is the serial number of the block; is the weight of the direct dependency relationship between word i and word k; is the weight of the direct dependency relationship between word k and word j; γ is a path attenuation factor, and the path is the syntactic distance between word i and word j; is the weight of the indirect dependency relationship between word i and word j; is the weight of the indirect dependency relationship between word j and word i.

[0095] In an embodiment of the present disclosure, the words with an indirect dependency relationship and the weight of the indirect dependency relationship can also be determined by constructing a bidirectional directed graph.

[0096] Figure 4 A flowchart of the method for determining the weight of the indirect dependency relationship provided by another embodiment of the present disclosure is shown.

[0097] As Figure 2 shown, the following steps can be implemented:

[0098] In step S401 , a bidirectional directed graph is constructed based on the words with syntactic dependency and the direct dependency between the words in the text.

[0099] Among them, the nodes in the bidirectional directed graph are words with syntactic dependencies, and the edges between adjacent word nodes in the bidirectional directed graph represent the direct dependencies between the words, and the edges have corresponding weights, which are the weights of the direct dependencies.

[0100] In step S402, the first and last two words sequentially connected by at least two adjacent edges in the bidirectional directed graph are determined as words with an indirect dependency relationship, and the indirect dependency weights of the words with an indirect dependency relationship are determined based on the weights of each edge between the first and last two words.

[0101] For example, after performing dependency syntax analysis on the sentence "Deep learning models require a large amount of labeled data and powerful computing power support", we can Figure 5 Construct the corresponding bidirectional directed graph, such as Figure 5 shown. Figure 2 An embodiment of the present disclosure provides a Figure 5 Constructed bidirectional directed graph.

[0102] In a bidirectional directed graph, not only can the direct dependencies and weights be determined intuitively ( Figure 5 (not shown), it is also possible to intuitively determine indirect dependencies and all other node words pointing to the word, so as to be applied in the subsequent calculation of the importance score of the word. Figure 5 For example, taking the word "model" as an example, we can determine that there are indirect dependencies between "model" and "depth", "model" and "data", "model" and "annotation", "model" and "large amount", "model" and "support", "model" and "computing power", "model" and "powerful", and "model" and "and". Taking the word "data" as an example, all node words pointing to it include "annotation", "need", and "support".

[0103] Among them, the direction of the positive edge of the bidirectional directed graph ( Figure 5 The direction of the solid arrow in the middle is the modification direction of the direct dependency relationship. The weight of the positive edge is the weight of the direct dependency relationship (between 0 and 1), which indicates the direct influence of the modifier on the central word. The direction of the reverse edge of the bidirectional directed graph ( Figure 6 The direction indicated by the dashed arrow in the figure is the opposite direction of the forward edge, and the reverse edge weight is 1 minus the forward edge weight, representing the indirect feedback influence of the central word on the modifier. Therefore, constructing a bidirectional directed graph can more accurately model the asymmetric bidirectional influence between words in syntactic dependencies. In a bidirectional directed graph, the direction and weight of the forward edge, as well as the direction and weight of the reverse edge, can be annotated on the corresponding edge.

[0104] Moreover, in the embodiment of the present application, the indirect dependency relationship weight and the co-occurrence relationship weight are fused. Since the co-occurrence relationship between words is naturally symmetrical, for example, word A and word B have a co-occurrence relationship, word B and word A must have a co-occurrence relationship, and there is no directional difference. Therefore, the graph structure constructed based on the co-occurrence relationship between words is a directed graph. Therefore, in order to make the bidirectional directed graph based on the syntactic dependency relationship consistent with the undirected graph based on the co-occurrence relationship in the graph structure, the embodiment of the present application adopts a bidirectional directed graph. Through the bidirectional directed graph, the directional feature of the syntactic dependency relationship can be exhibited, and the interaction between words in language can be embodied.

[0105] Figure 6 A flowchart of a method for determining a fused indirect dependency relationship weight is shown.

[0106] As shown in Figure 7 In one embodiment of the present disclosure, the key word extraction method can further include the following steps between S103 and S104:

[0107] In step S601, the number of times that a word with an indirect dependency relationship appears in a sliding window is determined, and the co-occurrence relationship weight is determined based on the number of times.

[0108] The sliding window is a window that slides from front to back in the text according to a set step size, and the co-occurrence relationship weight represents the number of times.

[0109] In step S602, the indirect dependency relationship weight and the co-occurrence relationship weight are fused to obtain a fused indirect dependency relationship weight.

[0110] In step S104, based on the indirect dependency relationship weight, the importance score of the word with the syntactic dependency relationship in the text is determined, which can include: based on the fused indirect dependency relationship weight, the importance score of the word with the syntactic dependency relationship in the text is determined.

[0111] For frequently occurring words in the text, in addition to some scene-based non-information words and repeatedly appearing adjacent words, they are usually considered as words with relatively high importance in the text. Therefore, in the embodiment of the present disclosure, in addition to determining the indirect dependency relationship weight between words and determining the importance of the word based on the indirect dependency relationship weight, the co-occurrence relationship weight of the word in the sliding window is also determined, so that the fused indirect dependency relationship weight can better reflect the importance of the word.

[0112] However, in the oral speech transcription text, some words similar to the idiom will appear frequently, such as "this", "that", "think", "may" and the like. Although the words are not related to the core content of the text, the frequency of occurrence is relatively high. If the importance of the words is judged only by the co-occurrence relationship weight, the semantic association and grammatical hierarchy between the words will be neglected, and some words that are not important in the semantic grammar and logic level will be extracted as key words due to the frequent occurrence. Therefore, in the embodiment of the present disclosure, the importance of the words is judged by using the fused indirect dependency relationship weight, and the importance of the words is judged more accurately by considering multiple dimensions (indirect dependency relationship weight and co-occurrence relationship weight), so that the quality of the extracted key words is higher.

[0113] Figure 7 A flowchart of a method for determining a fused indirect dependency relationship weight provided by another embodiment of the present disclosure is shown.

[0114] As shown in Figure 8 In one embodiment of the present disclosure, the normalized co-occurrence relationship weight and the indirect dependency relationship weight can be fused to obtain the fused indirect dependency relationship weight. Specifically, the following steps can be included:

[0115] In step S701, all words with dependency relationship in the text are traversed, and the co-occurrence relationship weight of each word in all words with dependency relationship is determined, and the minimum weight and the maximum weight of all co-occurrence relationship weights are determined.

[0116] In step S702, a first difference between the current co-occurrence relationship weight of the word with indirect dependency relationship and the minimum weight is determined, and a second difference between the maximum weight and the minimum weight is determined. The ratio between the first difference and the second difference is determined as the normalized co-occurrence relationship weight.

[0117] In step S703, the sum of the normalized co-occurrence relationship weight and the indirect dependency relationship weight is taken as the fused indirect dependency relationship weight.

[0118] The normalized co-occurrence relationship weight can ensure that it and the indirect dependency relationship weight belong to the same dimension (the weight value is between 0 and 1), which is convenient for comparison and calculation, and can make the obtained fused indirect dependency relationship weight directly used in the calculation of the word importance score.

[0119] Taking the example of determining the indirect dependency relationship weight as described above, the determination process of the sum of the normalized co-occurrence relationship weight and the indirect dependency relationship weight of the word i to the word j as the fused indirect dependency relationship weight is taken as an example to illustrate the determination method of the fused indirect dependency relationship weight.

[0120] The normalized co-occurrence relation weight of word i to word j can be calculated by the following formula:

[0121]

[0122] The fused indirect dependency relation weight of word i to word j can be calculated by the following formula:

[0123]

[0124] wherein, is the normalized co-occurrence relation weight of word i to word j; is the current co-occurrence relation weight of word i and word j; min is the minimum weight; max is the maximum weight; is the fused indirect dependency relation weight of word i to word j.

[0125] In an embodiment of the present disclosure, at least one of the following pre-processing can be performed on the text before the semantic integrity blocking of the text:

[0126] Delete repetitive words. For example, some stuttering repetitive expressions can be deleted based on the adjacent word repetition detection algorithm, so as to avoid the interference of word segmentation (such as "after after") to the maximum extent. In subsequent steps, the co-occurrence relation weight can be determined without the interference of these repetitive words.

[0127] Standardize punctuation marks, numbers and special characters. Thus, the correct punctuation relationship can be obtained when performing dependency syntax analysis, and the correct delimiter can be found when performing semantic integrity blocking of the text, so as to avoid the occurrence of semantic error blocking.

[0128] Segment words and tag the word classes of the segmented words. For example, a high-performance Chinese word segmentation engine can be used for word segmentation (the jieba word segmentation has the best inclusiveness for oral speech transcription text according to the word segmentation experiment results), and preliminary word class tagging can be performed.

[0129] Filter stop words. For example, the stop word table customized according to the scene can be used to filter informationless words.

[0130] In an embodiment of the present disclosure, the importance score of a word can be represented by the Pagerank value of the word. Thus, the importance score of the word can be obtained by calculating the Pagerank value of the word.

[0131] wherein, the Pagerank value can be iteratively calculated by the following method:

[0132] If there is an indirect dependency relationship between the first word and the second word, wherein the direction of the indirect dependency relationship can be the first word pointing to the second word, or the second word pointing to the first word, all words having a syntactic dependency relationship are traversed to determine all second words pointing to the first word.

[0133] The product of the Pagerank value of each second word and the fusion indirect dependency relationship weight between the two words is determined, and then the quotient of the product and the out-degree of the second word is taken as the first result; finally, the product of the sum of all first results and the damping coefficient is taken as the second result.

[0134] The difference between the sum of the second result and 1 and the damping coefficient is taken as the Pagerank value of the first word.

[0135] All first words are traversed to obtain the Pagerank value of each word in the text.

[0136] In the above example of determining the indirect dependency relationship weight, taking word i as the first word and word j as the second word, the Pagerank value of the first word i can be calculated by the following formula:

[0137]

[0138] wherein PR i is the Pagerank value of the word i; PR j is the Pagerank value of the word j; d is the damping coefficient, which can take a default value of 0.85; In(i) is a set of all words pointing to word i in the indirect dependency relationship; j is a word in In(i); o j is the out-degree of the word j; is the fusion indirect dependency relationship weight of the word j to the word i.

[0139] In the embodiments of the present disclosure, the Pagerank value is used to represent the importance of the word, and the importance of the word is derived from the weight of all other important words in the text that have semantic association with the word. Therefore, this method can measure the importance of the word in the entire text, and the extracted keywords will be more accurate.

[0140] The keyword extraction method provided by the present disclosure can further include the following steps after extracting the word with an importance score greater than a preset value as a keyword:

[0141] The keywords with direct dependency relationship are merged to obtain a phrase with complete semantics. For example, the keywords "deep learning" and "model" have a direct dependency relationship (modifying relationship), and the phrase "deep learning model" obtained after merging has more complete semantics and can more accurately express the semantics that the text intends to express. The problem of logical breakage commonly existing in spoken language speech transcription text is overcome.

[0142] According to the word vector similarity algorithm, a plurality of synonyms of the current keyword are identified, and based on the direct dependency relationship weight corresponding to the current keyword, one synonym with the highest weight is retained to eliminate redundant keywords. Through this method, repetitive expressions can be further deleted, and the extracted text is more in line with language rules.

[0143] The position information of each keyword and the phrase with complete semantics in the text is recorded, and a mapping relationship of the keyword and the phrase with complete semantics to the text paragraph is established. Therefore, the original text can be traced and marked.

[0144] The keyword extraction method provided by the present disclosure determines the indirect dependency relationship weight and determines the importance score of the word by using the indirect dependency relationship weight, thereby solving the problem that the long-distance semantic association relationship words cannot be captured in the related technology, and improving the accuracy of keyword extraction. Further, by fusing the indirect dependency relationship weight and the co-occurrence relationship weight, the importance judgment of high-frequency general words and low-frequency professional terms is balanced, which improves the importance score of low-frequency professional terms and reduces the importance score of high-frequency general words, thereby realizing accurate extraction of low-frequency professional terms and ignoring of high-frequency general words.

[0145] As shown in Figure 8 , a block diagram of a keyword extraction device provided by an embodiment of the present disclosure is shown. Figure 9

[0146] An embodiment of the present disclosure provides a keyword extraction device 800, which comprises:

[0147] The acquisition module 801 is configured to acquire a text to be subjected to keyword extraction.

[0148] ​The processing module 802 is configured to perform dependency syntax analysis on the text to obtain words with a syntax dependency relationship in the text and direct dependency relationships between the words, and map a direct dependency relationship weight to the direct dependency relationship. The direct dependency relationship is a dependency relationship between words with a minimum syntax distance. The direct dependency relationship weight represents the importance of the words with the direct dependency relationship, and is used to determine words with an indirect dependency relationship and determine an indirect dependency relationship weight. The indirect dependency relationship is a dependency relationship between words with at least two consecutive minimum syntax distances. The indirect dependency relationship weight is determined based on the direct dependency relationship weights included between the words with the indirect dependency relationship. The processing module 802 is further configured to determine an importance score of the words with the syntax dependency relationship in the text based on the indirect dependency relationship weight, extract words with an importance score greater than a preset value, and take the extracted words as keywords.

[0149] In some embodiments, the processing module 802 determines the indirect dependency relationship weight based on the direct dependency relationship weights included between the words with the indirect dependency relationship in the following manner: based on the words with the syntax dependency relationship, all target words in the text are determined. The target word is a word in the text that has the same word but different indirect dependency relationships. In response to the number of target words being N, where N is a positive integer, the indirect dependency relationship weight is determined for each target word in the N target words based on the respective corresponding direct dependency relationship weight, N indirect dependency relationship weights are obtained, and the sum of the N indirect dependency relationship weights is taken as the indirect dependency relationship weight of the target word.

[0150] In some embodiments, the processing module 802 is further configured to determine the number of times that the words with the indirect dependency relationship appear in a sliding window, and determine a co-occurrence relationship weight based on the number of times. The sliding window is a window that slides from front to back in the text according to a set step size. The co-occurrence relationship weight represents how many times the number is. The processing module 802 is further configured to fuse the indirect dependency relationship weight and the co-occurrence relationship weight to obtain a fused indirect dependency relationship weight, and determine the importance score of the words with the syntax dependency relationship in the text based on the indirect dependency relationship weight, including determining the importance score of the words with the syntax dependency relationship in the text based on the fused indirect dependency relationship weight.

[0151] In some embodiments, the processing module 802 fuses the indirect dependency relationship weight and the co-occurrence relationship weight in the following manner to obtain a fused indirect dependency relationship weight: traversing all words having dependency relationships in the text, determining the co-occurrence relationship weight of each word among all words having dependency relationships, and determining the minimum weight and the maximum weight among all co-occurrence relationship weights; determining a first difference value between the current co-occurrence relationship weight of the word of the indirect dependency relationship and the minimum weight, and determining a second difference value between the maximum weight and the minimum weight, determining the ratio between the first difference value and the second difference value as a normalized co-occurrence relationship weight; and taking the sum of the normalized co-occurrence relationship weight and the indirect dependency relationship weight as the fused indirect dependency relationship weight.

[0152] In some embodiments, in order to avoid that an excessively long dependency relationship chain introduces noise and improve the accuracy of keyword extraction, the syntactic distance between the words used to calculate the indirect dependency relationship weight is less than or equal to a preset syntactic distance threshold.

[0153] The keyword extraction apparatus provided by the embodiments of the present disclosure is also used for performing semantic integrity blocking on the text before performing dependency syntax analysis on the text to obtain a text block; wherein the text subjected to the dependency syntax analysis is the text block after blocking; and the N indirect dependency relationship weights are determined in parallel in units of text blocks.

[0154] In some embodiments, the processing module 802 can determine the words having indirect dependency relationships and determine the indirect dependency relationship weight in the following manner: based on the words having syntactic dependency relationships in the text and the direct dependency relationships between the words, a bidirectional graph is constructed, wherein the nodes in the bidirectional graph are the words having syntactic dependency relationships, the edges between adjacent word nodes in the bidirectional graph represent the direct dependency relationships between the words, and the edges correspond to weights, and the weights are the weights of the direct dependency relationships; the first and last two words sequentially connected by at least two adjacent edges in the bidirectional graph are determined as the words having indirect dependency relationships, and the indirect dependency relationship weight of the words having indirect dependency relationships is determined based on the weights of the edges between the first and last two words.

[0155] In some embodiments, the processing module 802 can map the direct dependency relationship weight for the direct dependency relationship in the following manner: based on the correspondence between the syntactic dependency relationship and the weight, the weight matching the direct dependency relationship is determined, and the matching weight is mapped as the direct dependency relationship weight.

[0156] In some embodiments, the processing module 802 is also used for, before performing semantic integrity blocking on the text, performing at least one of the following preprocessing on the text: deleting repetitive words; normalizing punctuation marks, numbers and special characters; segmenting words, and annotating the part of speech of the segmented words; and filtering stop words.

[0157] In some embodiments, the text acquired by the acquisition module can be a spoken language speech transcription text.

[0158] The keyword extraction device provided by the embodiments of the present disclosure can refer to the related descriptions in the keyword extraction method provided by the present disclosure for specific implementation processes, which will not be described here.

[0159] Figure 9 is a schematic diagram of an electronic device provided by an embodiment of the present disclosure. As shown in ​ An embodiment of the present disclosure provides an electronic device 300. The electronic device 300 includes a memory 301, a processor 302, and an input / output (I / O) interface 303. The memory 301 is configured to store instructions. The processor 302 is configured to invoke the instructions stored in the memory 301 to execute the keyword extraction method of the embodiments of the present disclosure. The processor 302 is connected to the memory 301 and the I / O interface 303, for example, through a bus system and / or other forms of connection mechanism (not shown). The memory 301 can be used to store programs and data, including the programs of the keyword extraction method involved in the embodiments of the present disclosure. The processor 302 executes various functions of the electronic device 300 and data processing by running the programs stored in the memory 301.

[0160] The processor 302 in the embodiments of the present disclosure can be implemented in at least one of a hardware form of a digital signal processor (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 302 can be a combination of one or several of a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities.

[0161] The memory 301 in the embodiments of the present disclosure can include one or more computer program products, which can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may, for example, include random access memory (RAM), cache memory, and / or the like. The non-volatile memory may, for example, include read-only memory (ROM), flash memory, hard disk drive (HDD), or solid-state drive (SSD), and / or the like.

[0162] In the embodiments of the present disclosure, the I / O interface 303 can be used to receive input instructions (such as digital or character information, and generate key signal inputs related to user settings and function control of the electronic device 300, etc.), and can also output various information to the outside (such as images or sounds, etc.). In the embodiments of the present disclosure, the I / O interface 303 can include one or more of a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), a mouse, a joystick, a trackball, a microphone, a speaker, and a touch panel, etc.

[0163] It can be understood that, in the embodiments of the present disclosure, although the operations are described in a particular order in the accompanying drawings, it should not be understood as requiring the operations to be performed in the particular order shown or in a serial order, or requiring all of the operations to be performed to obtain the desired results. In a particular environment, multi-tasking and parallel processing can be advantageous.

[0164] The methods and apparatuses involved in the embodiments of the present disclosure can be completed by using standard programming techniques, and various method steps can be implemented by using rule-based logic or other logic. It should also be noted that the words "apparatus" and "module" used herein and in the claims are intended to include implementations using one or more lines of software code and / or hardware implementations and / or devices for receiving input.

[0165] Any of the steps, operations, or procedures described herein can be performed or implemented using one or more hardware or software modules, alone or in combination with other devices. In one embodiment, a software module is implemented using a computer program product including a computer readable medium containing computer program code, which can be executed by a computer processor for performing any or all of the steps, operations, or procedures described.

[0166] The foregoing description of implementations of the present disclosure has been presented for the purposes of illustration and description. It is not intended to be exhaustive or to be limited to the precise form disclosed. Various modifications and variations are possible in light of the above teachings or can be acquired from practice of the present disclosure. Other embodiments and realizations can be made within the scope and equivalency of the disclosure. It is intended that the scope of the present disclosure not be limited to the described embodiments, but extend as well to any of the clearly implied variations and modifications.

Claims

1. A keyword extraction method, characterized in that: include: Get the text to be extracted for keywords; Performing dependency syntactic analysis on the text to obtain words in the text that have syntactic dependency relationships and direct dependency relationships between the words, and mapping direct dependency weights to the direct dependency relationships, wherein the direct dependency relationships are dependency relationships between the words when they have a minimum syntactic distance, and the direct dependency weights represent the importance of the words that have the direct dependency relationships; Determining words with indirect dependency relationships and determining indirect dependency weights, wherein the indirect dependency relationships are dependency relationships between words with at least two consecutive minimum syntactic distances, and the indirect dependency weights are determined based on direct dependency weights between the words with the indirect dependency relationships; Determining importance scores of words with syntactic dependency relationships in the text based on the indirect dependency weights; Extract words whose importance scores are greater than a preset value and use the extracted words as keywords.

2. The keyword extraction method according to claim 1, characterized in that: The indirect dependency weight is determined based on the direct dependency weights between the words with the indirect dependency in the following manner: Based on the words with syntactic dependencies, all target words in the text are determined, where the target words are the same words in the text but have different indirect dependencies; In response to the number of target words being N, where N is a positive integer, an indirect dependency weight is determined for each of the N target words based on its corresponding direct dependency weight to obtain N indirect dependency weights, and the sum of the N indirect dependency weights is used as the indirect dependency weight of the target word.

3. The keyword extraction method according to claim 1 or 2, characterized in that: The method further comprises: Determining the number of times the words having the indirect dependency relationship appear in a sliding window, and determining a co-occurrence relationship weight based on the number of times, wherein the sliding window is a window that slides from front to back in the text according to a set step size, and the co-occurrence relationship weight represents the number of times; fusing the indirect dependency weight and the co-occurrence weight to obtain a fused indirect dependency weight; Determining the importance scores of words with syntactic dependency relationships in the text based on the indirect dependency weights includes: Based on the fused indirect dependency weights, the importance scores of words with syntactic dependencies in the text are determined.

4. The keyword extraction method according to claim 3, wherein: The fusing the indirect dependency weight and the co-occurrence weight to obtain a fused indirect dependency weight includes: Traversing all words with dependency relationships in the text, and determining the co-occurrence weight of each word in all the words with dependency relationships, and determining the minimum weight and the maximum weight among all the co-occurrence weights; Determining a first difference between a current co-occurrence relationship weight of the words in the indirect dependency relationship and the minimum weight, and determining a second difference between the maximum weight and the minimum weight, and determining a ratio between the first difference and the second difference as a normalized co-occurrence relationship weight; The sum of the normalized co-occurrence relationship weight and the indirect dependency relationship weight is used as the fused indirect dependency relationship weight.

5. The keyword extraction method according to any one of claims 1 to 4, characterized in that: The syntactic distance between the words used to calculate the indirect dependency weight is less than or equal to a preset syntactic distance threshold.

6. The keyword extraction method according to claim 2, characterized in that: Before performing dependency syntax analysis on the text, the method further includes: performing semantic integrity segmentation on the text to obtain text blocks; The text to be subjected to dependency syntax analysis is the text block after segmentation; The N indirect dependency weights are determined in parallel using text blocks as units.

7. The keyword extraction method according to claim 1, wherein: The step of determining the words having indirect dependency relationships and determining the weights of the indirect dependency relationships includes: Constructing a bidirectional directed graph based on the words with syntactic dependency in the text and the direct dependency between the words, wherein the nodes in the bidirectional directed graph are the words with syntactic dependency, the edges between adjacent word nodes in the bidirectional directed graph represent the direct dependency between the words, and the edges have corresponding weights, and the weights are the weights of the direct dependency; The first and last two words sequentially connected by at least two adjacent edges in the bidirectional directed graph are determined as words with an indirect dependency relationship, and the indirect dependency weights of the words with an indirect dependency relationship are determined based on the weights of each edge between the first and last two words.

8. The keyword extraction method according to claim 1, wherein: Mapping the direct dependency relationship weights for the direct dependency relationship includes: Based on the correspondence between the syntactic dependency relationship and the weight, a weight matching the direct dependency relationship is determined, and the matching weight is mapped to the direct dependency relationship weight.

9. The keyword extraction method according to claim 6, characterized in that: Before the semantic integrity segmentation of the text, the text is also pre-processed by performing at least one of the following steps: Remove repetitive words; Normalize punctuation, numbers, and special characters; Participle, and mark the part of speech of the words after participle; Filter stop words.

10. The keyword extraction method according to claim 1, wherein: The text is a transcript of spoken speech.

11. A keyword extraction device, characterized in that: include: The acquisition module is used to obtain the text to be extracted for keywords; A processing module is used to perform dependency syntactic analysis on the text, obtain words with syntactic dependencies in the text and direct dependencies between the words, and map direct dependency weights for the direct dependencies, wherein the direct dependencies are dependencies between words when they have a minimum syntactic distance, and the direct dependency weights represent the importance of the words with direct dependencies, and is used to determine words with indirect dependencies and determine indirect dependency weights, wherein the indirect dependencies are dependencies between words when they have at least two consecutive minimum syntactic distances, and the indirect dependency weights are determined based on the direct dependency weights included between the words with the indirect dependencies, and is used to determine the importance scores of words with syntactic dependencies in the text based on the indirect dependency weights, and is used to extract words with importance scores greater than a preset value, and use the extracted words as keywords.

12. An electronic device, characterized in that: The electronic device comprises: a memory for storing instructions; and A processor, configured to call the instructions stored in the memory to execute the keyword extraction method according to any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that The method comprises storing instructions, wherein when the instructions are executed by a processor, the keyword extraction method according to any one of claims 1 to 10 is executed.

14. A computer program product, characterized in that The invention comprises a computer program, which implements the keyword extraction method according to any one of claims 1 to 10 when executed by a processor.