A method, device, equipment and storage medium for constructing a construction keyword library

By constructing a construction keyword library through constituent syntactic analysis and word vector modeling, the problem of existing tools being unable to accurately extract construction keywords has been solved, achieving efficient and accurate keyword library construction and digital management.

CN115455962BActive Publication Date: 2025-11-07GLODON CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211219318.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-30
Publication Date
2025-11-07
Estimated Expiration
2042-09-30

AI Technical Summary

Technical Problem

Existing word segmentation tools cannot accurately extract keywords related to construction, resulting in low efficiency in building a construction keyword database, reliance on manual intervention, and difficulty in updating and updating construction keywords.

Method used

Keyword entries are extracted using a constituent syntactic analysis model, and word segments similar to preset construction core words are selected using a word vector model to construct a construction keyword library.

Benefits of technology

It improves word segmentation efficiency and accuracy, reduces manual intervention, and builds a well-categorized and rich vocabulary of construction keywords to support the digital management of construction projects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115455962B_ABST
    Figure CN115455962B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and equipment for constructing a construction keyword library and a storage medium, and comprises the following steps: performing word segmentation on a construction corpus to be processed to obtain a word segmentation result containing multiple segmented words; obtaining a preset construction core word and screening a first-level segmented word containing the construction core word from the word segmentation result; calculating the similarity between other segmented words in the word segmentation result except the first-level segmented word and the construction core word, and setting the segmented words with a similarity greater than a preset threshold as second-level segmented words; and adding the first-level segmented words and the second-level segmented words as construction keywords to a preset construction keyword library.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer data processing, and in particular relates to a method and device for constructing a construction keyword library, equipment and a storage medium. BACKGROUND

[0002] A large amount of construction corpus is generated in the process of building construction. When a construction keyword library for building construction is to be constructed, keyword extraction and keyword library construction can be performed based on the construction corpus. However, the construction keywords of building construction are different from the keywords of other types in terms of composition. A construction keyword is often composed of multiple words related to building construction, such as "reinforced concrete wall". However, the existing word library carried by the existing word segmentation tool has few keywords related to building construction. Therefore, the existing word segmentation tool cannot accurately extract complete construction keywords. Therefore, in the existing process of constructing a construction keyword library, the construction keyword library is constructed by manually summarizing and extracting construction keywords based on the experience and related technical materials of building experts. This method makes the construction process unable to keep pace with the updating speed of construction keywords, and requires high skills of building experts. Therefore, the construction of a construction keyword library using the existing technology not only requires a large amount of time and resources, but also is difficult to cover the diversified expressions of construction keywords in a large amount of construction text.

[0003] Therefore, how to efficiently and accurately construct a construction keyword library has become a technical problem to be solved by those skilled in the art. SUMMARY

[0004] The present application aims to provide a method and device for constructing a construction keyword library, equipment and a storage medium, which can efficiently and accurately construct a construction keyword library.

[0005] According to one aspect of the present application, a method for constructing a construction keyword library is provided, the method comprising:

[0006] performing word segmentation on the construction corpus to be processed to obtain a word segmentation result comprising a plurality of words;

[0007] obtaining a preset construction core word and screening a first word from the word segmentation result, the first word comprising the construction core word;

[0008] calculating the similarity between the words other than the first word in the word segmentation result and the construction core word, and setting the words with a similarity greater than a preset threshold as second words;

[0009] adding the first words and the second words to a preset construction keyword library as construction keywords.

[0010] Optionally, before the construction corpus to be processed is segmented to obtain a segmentation result comprising a plurality of segmented words, the method further comprises:

[0011] obtaining a construction corpus sample and performing constituent syntax analysis on the construction corpus sample by using a constituent syntax analysis model to obtain each sample phrase contained in the construction corpus sample and a phrase type of each sample phrase;

[0012] determining whether the phrase length of the sample phrase is less than a maximum length corresponding to the phrase type, and if so, taking the sample phrase as a candidate entry, and if not, determining a candidate entry from the sample phrase according to the maximum length;

[0013] calculating the word frequency, cohesiveness and freedom of the candidate entry in the construction corpus sample, and setting the candidate entry as a key entry when the word frequency, cohesiveness and freedom meet preset conditions.

[0014] Optionally, the construction corpus to be processed is segmented to obtain a segmentation result comprising a plurality of segmented words, comprising:

[0015] determining whether the key entry exists in the construction corpus to be processed, and if so, taking the existing key entry as a long segmented word;

[0016] segmenting the corpus in the construction corpus to be processed except the long segmented word to obtain a short segmented word;

[0017] forming the long segmented word and the short segmented word into the segmentation result.

[0018] Optionally, the preset construction core word is obtained, and a first-level segmented word containing the construction core word is screened from the segmentation result, comprising:

[0019] obtaining a plurality of regular expressions preset; wherein one regular expression corresponds to one construction core word;

[0020] iterating each regular expression in turn, and determining whether a target segmented word satisfying the currently iterated regular expression exists in the segmentation result, if so, setting the target segmented word as a first-level segmented word, and if not, iterating the next regular expression.

[0021] Optionally, the similarity between the other segmented words in the segmentation result except the first-level segmented word and the construction core word is calculated, and the second-level segmented word is set when the similarity is greater than a preset threshold, comprising:

[0022] converting the construction core word into a core word vector by using a preset word vector model, and converting the other segmented words in the segmentation result except the first-level segmented word into segmented word vectors;

[0023] The cosine distances between each segmented word vector and the current core word vector are calculated in sequence, and the segmented word corresponding to the segmented word vector with a cosine distance greater than the preset threshold is set as a secondary segmented word.

[0024] Optionally, the adding of the primary segmented word and the secondary segmented word as construction keywords into the preset construction keyword library comprises:

[0025] A primary construction group to which the primary segmented word corresponds is obtained, and a construction group label corresponding to the primary construction group is added to the primary segmented word;

[0026] A secondary construction group to which the secondary segmented word corresponds is obtained, and a construction group label corresponding to the secondary construction group is added to the secondary segmented word;

[0027] The primary segmented word and the secondary segmented word are added into the construction group corresponding to the construction keyword library according to the construction group label.

[0028] Optionally, after the adding of the primary segmented word and the secondary segmented word as construction keywords into the preset construction keyword library, the method further comprises:

[0029] A construction text is obtained, and a target keyword is identified from the construction text by using the construction keyword library; wherein the target keyword is contained in the construction keyword library;

[0030] A plurality of paragraphs are determined from the construction text, and a keyword feature of each paragraph is counted respectively; wherein the keyword feature comprises a keyword quantity and a keyword frequency;

[0031] An importance value of each paragraph is calculated by using a preset algorithm according to the text quantity and the keyword feature of each paragraph;

[0032] The paragraph with the highest importance value is marked as a construction key paragraph.

[0033] In order to achieve the above purpose, the application further provides a device for constructing a construction keyword library, the device comprising:

[0034] A segmentation module is configured to segment a to-be-processed construction corpus to obtain a segmentation result comprising a plurality of segmented words;

[0035] A containing module is configured to obtain a preset construction core word and filter a primary segmented word containing the construction core word from the segmentation result;

[0036] A similarity module is configured to calculate the similarity between the other word segmentation results in the word segmentation result and the construction core word, and set the word segmentation result with a similarity greater than a preset threshold as a secondary word segmentation result.

[0037] An adding module is configured to add the primary word segmentation result and the secondary word segmentation result to a preset construction keyword library as construction keywords.

[0038] To achieve the above object, the present application further provides a computer device, which specifically comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the method for constructing a construction keyword library when executing the computer program.

[0039] To achieve the above object, the present application further provides a computer storage medium, which stores a computer program, and the computer program implements the steps of the method for constructing a construction keyword library when executed by a processor.

[0040] The method, device, equipment and storage medium for constructing a construction keyword library provided by the present application can extract construction-related keyword items by using a component syntax analysis model, perform word segmentation on the construction corpus to be processed based on the keyword items, and select the word segmentation results related to the preset construction core word to form a construction keyword library. Since the extracted construction-related keyword items can assist in word segmentation, the word segmentation efficiency and accuracy are greatly improved, so that the construction-related keywords can be accurately selected from the word segmentation results, and the construction keyword library with clear classification and large vocabulary can be constructed together with the preset construction core word, thereby reducing the workload of manually selecting construction keywords, improving the accuracy of selecting construction keywords, and laying an important foundation for the digital management of construction projects. BRIEF DESCRIPTION OF DRAWINGS

[0041] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments and are not intended to limit the scope of the application. In the drawings:

[0042] Figure 1 An optional flowchart of the method for constructing a construction keyword library provided for example one;

[0043] Figure 2 A schematic diagram of analyzing a construction corpus sample by using a component syntax analysis model provided for example one;

[0044] Figure 3 A schematic diagram of a sample phrase in a construction corpus sample provided for example one;

[0045] Figure 4 An optional component structure diagram of the construction keyword library construction method provided for Embodiment Two is shown in the figure;

[0046] Figure 5 An optional hardware architecture diagram of the computer device provided for Embodiment Three is shown in the figure. DETAILED DESCRIPTION

[0047] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the scope of the present application.

[0048] Embodiment One

[0049] The embodiment of the present application provides a construction keyword library construction method, as shown in the figure, the method specifically comprises the following steps: Figure 1

[0050] Step S101: performing word segmentation on the to-be-processed construction corpus to obtain a word segmentation result comprising a plurality of word segments.

[0051] The to-be-processed construction corpus is a document comprising construction-related vocabulary, for example, an engineering cost calculation list, a door and window type document, a construction material list, etc. Before performing word segmentation on the to-be-processed construction corpus, the to-be-processed construction corpus needs to be preprocessed, including: performing cutting according to punctuation marks on the to-be-processed construction corpus, removing invalid characters and chapter prefixes of the cut construction corpus, etc.

[0052] Preferably, the Jieba word segmentation tool is used to perform word segmentation on the to-be-processed construction corpus.

[0053] Specifically, before the step S101, the method further comprises:

[0054] Step A1: obtaining a construction corpus sample and performing constituent syntax analysis on the construction corpus sample by using a constituent syntax analysis model to obtain each sample phrase contained in the construction corpus sample and the phrase type of each sample phrase.

[0055] The constituent syntax analysis model (Constituency Parsing model) is used to analyze the recursive composition of a sentence in syntax, and as shown in the figure, the constituent syntax analysis model comprises a constituent syntax analysis engine and a constituent syntax analysis dictionary. Figure 2 ​The analysis results of the construction corpus sample are represented as a tree structure task. The construction corpus sample is a document corpus containing vocabulary related to construction, used to extract keyword entries related to construction. The sample phrases in the construction corpus sample are obtained by recursively combining the segmented words in the construction corpus sample, such as... Figure 3 The sample phrases in the phrase structure syntax tree shown include the following parts of speech for word segmentation: V (verb), P (preposition), N (noun), ADJ (adjective), ADV (adverb), etc. The phrase types of the sample phrases include: NP (noun phrase), VP (verb phrase), ADVP (adverb phrase), etc.

[0056] Specifically, step A101 includes:

[0057] Step A101: Obtain the construction corpus sample, and perform word segmentation on the construction corpus sample to obtain multiple word segments.

[0058] Step A102: Perform part-of-speech tagging on multiple word segments of the construction corpus sample.

[0059] Step A103: Perform syntactic analysis on the construction corpus sample based on the part-of-speech tagging results to obtain the phrase structure syntactic tree in the construction corpus sample.

[0060] The phrase structure syntax tree is as follows: Figure 3 The recursive structure shown above uses a phrase structure syntax tree to identify the set of all sample phrases that make it up. Figure 3 The construction corpus sample shown contains 13 sample phrases.

[0061] Step A104: Recursively extract sample phrases from the outside to the inside according to the phrase structure syntax tree, and obtain the phrase type of the sample phrases.

[0062] Step A2: Determine whether the length of the sample phrase is less than the maximum length corresponding to the phrase type. If yes, then the sample phrase is used as a candidate term. If no, then candidate terms are determined from the sample phrases based on the maximum length.

[0063] Among these, the maximum length corresponding to each phrase type is preset for the constituent syntactic analysis model, and the order of judging sample phrases is based on the position of the sample phrase in the phrase structure syntactic tree corresponding to the construction corpus sample, such as... Figure 3 From ① to The sequence is traversed sequentially. When the target sample phrase is encountered, the phrase type of the target sample phrase is determined. The target sample phrases that meet the condition of being less than or equal to the maximum degree corresponding to the phrase type are extracted as candidate terms, and other sample phrases contained in the candidate terms are no longer judged.

[0064] Step A3: calculate the word frequency, coagulation degree and freedom degree of the candidate entry in the construction corpus sample, and set the candidate entry as a key entry when the word frequency, coagulation degree and freedom degree meet the preset conditions.

[0065] Wherein, the word frequency is the frequency of the candidate entry in all construction corpus samples; the coagulation degree is the closeness between words in a candidate entry, and the higher the coagulation degree of the candidate entry, the higher the probability of using the candidate entry as an independent entry; the freedom degree is the degree of independent use of a candidate entry, and the freedom degree is used to measure the instability of the relationship between the candidate entry and the left and right adjacent words, and the higher the freedom degree of a candidate entry, the higher the probability of using the candidate entry as an independent entry. In order to screen whether the candidate entry extracted from the construction corpus sample belongs to the field of building construction, it is necessary to calculate the three dimensions of word frequency, coagulation degree and freedom degree of each candidate entry, and screen out the key entries related to building construction according to the preset conditions from all candidate entries.

[0066] Further, the step S101 specifically comprises the following steps:

[0067] Step B1: judging whether the key entry exists in the construction corpus to be processed, if yes, the existing key entry is taken as a long segmented word.

[0068] Step B2: segmenting the corpus in the construction corpus to be processed except the long segmented word to obtain a short segmented word.

[0069] Step B3: forming the segmented word result by the long segmented word and the short segmented word.

[0070] Further, the step S101 can also use the following way to segment: importing the key entry into the dictionary of the segmentation tool to update the segmentation tool, and segmenting the construction corpus to be processed by the updated segmentation tool.

[0071] Wherein, customizing and adding the key entry to the dictionary of the segmentation tool can make the key entry in the construction corpus to be processed be completely segmented in the segmentation process, avoiding the conventional segmentation tool from separating a complete word related to building construction, for example, mistakenly segmenting "steel reinforced concrete shear wall" into "steel", "concrete" and "shear wall".

[0072] In the embodiment, the difference between the construction of the construction-related keyword library and the construction of the general keyword library is that the construction-related part of the keyword is composed of multiple construction-related words, such as “reinforced concrete shear wall”, “combination window frame type”, “overhead insulation layer” and the like. The general word segmentation tool cannot accurately identify the complete construction keyword, and thus cannot construct a pure and complete construction keyword library. However, the extraction of the keyword from the construction corpus sample by the component syntax analysis model is a high-cost keyword extraction method, so the embodiment only extracts the construction-related keyword from the construction corpus sample, so that the construction-related keyword can be accurately segmented when a large number of construction samples to be processed are segmented by using the above keyword, the machine processing cost is saved, and the segmentation efficiency is improved.

[0073] Step S102: obtaining a preset construction core word, and screening a first-level segmentation containing the construction core word from the segmentation result.

[0074] The core keyword is a seed word related to building construction. According to the business requirements related to building construction, the construction-related keywords are sorted according to “component”, “material”, “action” and the like. Each category is split according to the construction level, for example, “component” can be split into “wall”, “beam”, “plate”, “column” and the like, and “wall” can be split into “load-bearing wall”, “counterweight wall”, “shear wall”, “non-load-bearing wall” and the like. Until each category is split to a granularity that can meet the business requirements, a construction group is established for each level of the split category, and a small number of seed words are added to each construction group as a construction core word.

[0075] Specifically, the step S102 includes the following steps:

[0076] Step C1: obtaining a plurality of preset regular expressions; wherein one regular expression corresponds to one construction core word.

[0077] The regular expression is an expression artificially set to select the construction core word from the segmentation result.

[0078] Step C2: sequentially traversing each regular expression, and determining whether there is a target segmentation satisfying the currently traversed regular expression in the segmentation result, if yes, setting the target segmentation as a first-level segmentation, if not, traversing the next regular expression.

[0079] The first-level segmentation is a target segmentation containing the construction core word selected from all segmentation results. For example, the segmentation “load-bearing wall” contains the construction core word “wall”, and the segmentation “load-bearing wall” is the first-level segmentation of the construction core word “wall”.

[0080] Step S103: Calculate the similarity between the other divisions in the division result except the first division and the construction core word, and set the similarity greater than the preset threshold as the second division.

[0081] Among them, since the first division has been screened and can be used as a keyword to constitute a construction keyword library, when selecting similar divisions to the construction core word from the division result, the similarity between the first division and the construction core word does not need to be considered.

[0082] Specifically, the step S103 comprises the following steps:

[0083] Step D1: Convert the construction core word into a core word vector and convert the other divisions in the division result except the first division into a division vector through a preset word vector model.

[0084] Preferably, the word vector model is a word2vec model.

[0085] Among them, the word vector model is used to convert the division in text form into a vector in vector space, and the cosine distance between two vectors in vector space is calculated to identify the semantic similarity between the division and the construction core word.

[0086] Step D2: Traverse each core word vector in turn, calculate the cosine distance between each division vector and the core word vector currently traversed, and set the division corresponding to the division vector with a cosine distance greater than the preset threshold as the second division.

[0087] Among them, the greater the cosine distance between the division vector and the core word vector, the higher the semantic similarity between the corresponding division and the construction core word.

[0088] Step S104: Add the first division and the second division to the preset construction keyword library as construction keywords.

[0089] Among them, the preset construction keyword library contains all construction core words divided according to construction groups, and each construction group also contains a first construction group and a second construction group, wherein the first construction group is used to store the first division containing the construction core word corresponding to the construction group, and the second construction group is used to store the second division similar to the construction core word corresponding to the construction group.

[0090] Specifically, the step S104 comprises the following steps:

[0091] Step E1: Obtain the first construction group to which the construction core word corresponding to the first division belongs, and add the construction group label corresponding to the first construction group to the first division.

[0092] Step E2: Obtain the secondary construction group to which the construction core word corresponding to the secondary word segmentation belongs, and add a construction group label corresponding to the secondary construction group to the secondary word segmentation.

[0093] Step E3: Add the primary word segmentation and the secondary word segmentation in the construction group corresponding to the construction keyword library according to the construction group label.

[0094] Among them, the primary word segmentation and the secondary word segmentation obtained from the massive construction text to be processed after word segmentation and screening are stored according to the construction group in which the core construction word corresponding to the primary word segmentation and the secondary word segmentation is located, so as to obtain a construction keyword library with complete levels and rich categories.

[0095] Further, after the construction keyword library is constructed, the construction keyword library can be used for the following applications:

[0096] Step F1: Obtain a construction text, and identify a target keyword from the construction text by using the construction keyword library; wherein the target keyword is contained in the construction keyword library.

[0097] Among them, the construction group in the construction keyword library to which the target keyword identified from the construction text belongs can be freely set, for example: the construction keyword in the "member" construction group in the construction keyword library is taken as a sentence identified from the construction text, so that the content contained in the construction text can be identified in a targeted manner, so that the identified paragraph can more accurately reflect the degree of relevance to the construction group, and the construction keyword paragraph corresponding to the construction group can be accurately and quickly determined.

[0098] Step F2: Determine a plurality of paragraphs from the construction text, and respectively count the keyword features of each paragraph; wherein the keyword features include: the number of keywords and the keyword frequency.

[0099] Step F3: According to the number of characters and the keyword features of each paragraph, the importance value of each paragraph is calculated by using a preset algorithm.

[0100] Among them, according to the number of characters and the keyword features of each paragraph, each paragraph is scored, and the scoring results of each paragraph are output in descending order, so as to select the paragraph meeting the requirements.

[0101] Specifically, the step F3 includes the following steps:

[0102] Step F301: Obtain the frequency of each construction keyword in the construction keyword library in the construction text to be processed.

[0103] Step F302: According to the frequency of the construction keyword, the weight of each construction keyword in the corresponding construction group is calculated by using a preset entropy weight method.

[0104] In the above process, the user can flexibly set the relative weight of the construction keyword, so that the paragraph meeting the user's demand can be screened in the process of calculating the importance value of the paragraph.

[0105] Step F303: determining the keyword weight of each target keyword in the construction text according to the weight of the construction keyword.

[0106] Step F304: accumulating the keyword weight of all target keywords in each paragraph to obtain the total weight value of the paragraph.

[0107] Step F305: dividing the number of words in each paragraph by the total weight value of the paragraph to obtain the importance value of the paragraph.

[0108] In the process of calculating the importance value of each paragraph, the number of words in each paragraph and the weight of the target keyword contained in each paragraph need to be considered.

[0109] Step F4: marking the paragraph with the highest importance value as the construction key paragraph.

[0110] It should be noted that the above steps F1-F4 provide an extraction logic for extracting key paragraphs from a text. The user can freely set the keyword library of different fields, and perform keyword recognition on the text according to the keywords in the keyword library. The score of each paragraph in the text is calculated according to the word frequency of the keyword and the number of words in the paragraph, and the score of each paragraph is output in descending order, so that the user can learn the paragraph most related to the corresponding field in the text in time.

[0111] In the present embodiment, the keyword of the construction field is extracted by using the component syntax analysis model, and then the keyword is used to perform word segmentation on the construction corpus to be processed. The keyword related to the preset construction core word is screened from the word segmentation result to form the construction keyword library. Since the extracted keyword of the construction field can assist in word segmentation, the efficiency and accuracy of word segmentation are greatly improved, so that the keyword of the construction field can be accurately screened from the word segmentation result, and the classification is clear and the vocabulary is large. The construction keyword library is constructed together with the preset construction core word, which reduces the workload of manually selecting the construction keyword and improves the accuracy of screening the construction keyword, laying an important foundation for the digital management of the construction project. In addition, the constructed construction keyword library is used to score the paragraphs in the construction text to obtain the paragraph most related to the construction from the construction text, thereby helping the user to quickly obtain the key paragraph of the construction text and understand the core content of the construction text, reducing the time of the user reading the long construction text, speeding up the user's acquisition speed of the key information, and improving the reading efficiency.

[0112] Embodiment two

[0113] The embodiment of the present application provides a device for constructing a construction keyword library, as shown in the figure, the device specifically comprises the following components: Figure 4

[0114] The word segmentation module 501 is used for performing word segmentation on the construction corpus to be processed to obtain a word segmentation result comprising a plurality of word segments;

[0115] The containing module 502 is used for acquiring a preset construction core word and screening a first-level word segment containing the construction core word from the word segmentation result;

[0116] The similarity module 503 is used for calculating the similarity of other word segments in the word segmentation result except the first-level word segment to the construction core word and setting a word segment with a similarity greater than a preset threshold as a second-level word segment;

[0117] The adding module 504 is used for adding the first-level word segment and the second-level word segment as construction keywords to a preset construction keyword library.

[0118] The word segmentation module 501 comprises:

[0119] The acquisition unit is used for acquiring a construction corpus sample and performing a constituent syntax analysis on the construction corpus sample by using a constituent syntax analysis model to obtain each sample phrase contained in the construction corpus sample and a phrase type of each sample phrase;

[0120] The judgment unit is used for judging whether the phrase length of the sample phrase is less than a maximum length corresponding to the phrase type, if yes, the sample phrase is set as a candidate entry, if not, a candidate entry is determined from the sample phrase according to the maximum length;

[0121] The setting unit is used for calculating the word frequency, the degree of idiom and the degree of freedom of the candidate entry in the construction corpus sample, and setting the candidate entry as a keyword entry when the word frequency, the degree of idiom and the degree of freedom satisfy a preset condition.

[0122] Specifically, the acquisition unit is further used for:

[0123] acquiring the construction corpus sample, performing word segmentation on the construction corpus sample to obtain a plurality of word segments;

[0124] performing part-of-speech tagging on the plurality of word segments of the construction corpus sample;

[0125] performing syntax analysis on the construction corpus sample according to the result of part-of-speech tagging to obtain a phrase structure syntax tree in the construction corpus sample; ​

[0126] According to the phrase structure syntax tree, sample phrases are extracted recursively from outside to inside, and a phrase type of the sample phrase is obtained.

[0127] Further, the word segmentation module 501 further comprises:

[0128] It is judged whether the key word exists in the to-be-processed construction corpus, and if so, the existing key word is taken as a long word segmentation;

[0129] The corpus except the long word segmentation in the to-be-processed construction corpus is segmented to obtain a short word segmentation;

[0130] The long word segmentation and the short word segmentation form the word segmentation result.

[0131] The containing module 502 is configured to:

[0132] A plurality of regular expressions are obtained, wherein one regular expression corresponds to one construction core word;

[0133] Each regular expression is traversed in turn, and it is judged whether a target word segmentation satisfying the currently traversed regular expression exists in the word segmentation result, if so, the target word segmentation is set as a first-level word segmentation, and if not, the next regular expression is traversed.

[0134] Specifically, the similarity module 503 is configured to:

[0135] The construction core word is converted into a core word vector through a preset word vector model, and other word segmentations except the first-level word segmentation in the word segmentation result are converted into word segmentation vectors;

[0136] Each core word vector is traversed in turn, the cosine distance between each word segmentation vector and the currently traversed core word vector is calculated, and the word segmentation corresponding to the word segmentation vector whose cosine distance is greater than the preset threshold is set as a second-level word segmentation.

[0137] Further, the adding module 504 is configured to:

[0138] A first-level construction group to which the construction core word corresponding to the first-level word segmentation belongs is obtained, and a construction group label corresponding to the first-level construction group is added to the first-level word segmentation;

[0139] A second-level construction group to which the construction core word corresponding to the second-level word segmentation belongs is obtained, and a construction group label corresponding to the second-level construction group is added to the second-level word segmentation;

[0140] The first-level word segmentation and the second-level word segmentation are added in the construction group corresponding to the construction key word library according to the construction group label.

[0141] Further, the device further comprises:

[0142] An identifying unit is configured to acquire a construction text, and identify target keywords from the construction text by using the construction keyword library; wherein the target keywords are contained in the construction keyword library;

[0143] A statistical unit is configured to determine a plurality of paragraphs from the construction text, and respectively count keyword features of each paragraph; wherein the keyword features include: keyword quantity and keyword frequency;

[0144] A calculation unit is configured to calculate an importance value of each paragraph according to the text quantity and the keyword features of each paragraph by using a preset algorithm;

[0145] A marking unit is configured to mark the paragraph with the highest importance value as a construction key paragraph.

[0146] The calculation unit is configured to:

[0147] Acquire the frequency of each construction keyword in the construction keyword library in the to-be-processed construction text;

[0148] Calculate the weight of each construction keyword in the corresponding construction group by using a preset entropy weight method according to the frequency of the construction keyword;

[0149] Determine the keyword weight of each target keyword in the construction text according to the weight of the construction keyword;

[0150] Cumulatively calculate the keyword weight of all target keywords of each paragraph to obtain a total weight value of the paragraph;

[0151] Divide the text quantity of each paragraph by the total weight value of the paragraph to obtain the importance value of the paragraph.

[0152] Embodiment three

[0153] The embodiment also provides a computer device, such as a smartphone, a tablet computer, a notebook computer, a desktop computer, a rack server, a blade server, a tower server or a cabinet server (including a single server or a server cluster composed of multiple servers) and the like which can execute programs. As shown in the figure, the computer device 50 of the embodiment at least includes but is not limited to: a memory 501 and a processor 502 which can be connected to each other in communication through a system bus. It should be pointed out that, Figure 5 only the computer device 50 with components 501-502 is shown, but it should be understood that all the shown components are not required to be implemented, and more or fewer components can be alternatively implemented. Figure 5

[0154] ​The memory 501 (i.e., a storage medium) in this embodiment includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 501 can be an internal storage unit of the computer device 50, such as a hard disk or a memory of the computer device 50. In other embodiments, the memory 501 can also be an external storage device of the computer device 50, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 50. Of course, the memory 501 can also include both the internal storage unit and the external storage device of the computer device 50. In this embodiment, the memory 501 is generally used to store an operating system and various application software installed on the computer device 50. In addition, the memory 501 can also be used to temporarily store various data that have been output or will be output.

[0155] The processor 502 in some embodiments can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other chip that builds a construction keyword library. The processor 502 is generally used to control the overall operation of the computer device 50.

[0156] Specifically, in this embodiment, the processor 502 is configured to execute a program of a construction keyword library building method stored in the memory 501, and the program of the construction keyword library building method, when executed, implements the following steps:

[0157] performing word segmentation on the construction corpus to be processed to obtain a word segmentation result comprising a plurality of word segments;

[0158] obtaining a preset construction core word and screening a first word segment comprising the construction core word from the word segmentation result;

[0159] calculating a similarity between the construction core word and other word segments in the word segmentation result except the first word segment, and setting a word segment with a similarity greater than a preset threshold as a second word segment;

[0160] adding the first word segment and the second word segment as construction keywords to a preset construction keyword library.

[0161] The specific implementation process of the above method steps can be referred to Embodiment One, which will not be repeated here.

[0162] Embodiment Four

[0163] The embodiment also provides a computer storage medium, such as a flash memory, a hard disk, a multimedia card, a card memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application market, and the like, which stores a computer program. When the computer program is executed by a processor, the following method steps are implemented:

[0164] performing word segmentation on the construction corpus to be processed to obtain a word segmentation result comprising a plurality of word segments;

[0165] obtaining a preset construction core word, and screening a first word segment comprising the construction core word from the word segmentation result;

[0166] calculating the similarity between the word segments other than the first word segment in the word segmentation result and the construction core word, and setting a word segment with a similarity greater than a preset threshold as a second word segment;

[0167] adding the first word segment and the second word segment as construction keywords to a preset construction keyword library.

[0168] The specific embodiment process of the above method steps can be referred to Embodiment One, which will not be repeated here.

[0169] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that processes, methods, articles, or devices including a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, methods, articles, or devices. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article, or device including the element.

[0170] The above embodiment numbers of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.

[0171] Through the above description of the embodiments, those skilled in the art can clearly understand that the above embodiment methods can be realized by means of software and necessary general hardware platforms, of course, they can also be realized by hardware, but in many cases the former is a better embodiment.

[0172] The above merely describes the preferred embodiments of the present application, and is not intended to limit the patent scope of the present application, and any equivalent structure or equivalent process conversion, or direct or indirect application in other related technical fields, which are made by using the content of the present application specification and drawings, are also included in the patent protection scope of the present application.

Claims

1. A method of constructing a construction keyword library, characterized by, The method comprises: performing word segmentation on the to-be-processed construction corpus to obtain a word segmentation result comprising a plurality of word segments; obtaining a preset construction core word, and screening a first-level word segment comprising the construction core word from the word segmentation result; calculating the similarity between the construction core word and other word segments in the word segmentation result except the first-level word segment, and setting a word segment with a similarity greater than a preset threshold as a second-level word segment; adding the first-level word segment and the second-level word segment as construction keywords to a preset construction keyword library; wherein the performing word segmentation on the to-be-processed construction corpus to obtain a word segmentation result comprising a plurality of word segments comprises: obtaining a construction corpus sample, and performing constituent syntax analysis on the construction corpus sample by using a constituent syntax analysis model to obtain each sample phrase and the phrase type of each sample phrase; judging whether the phrase length of the sample phrase is less than or equal to the maximum length corresponding to the phrase type, if yes, taking the sample phrase as a candidate entry, and if no, determining a candidate entry from the sample phrase according to the maximum length; screening a construction-related keyword entry meeting the condition from all candidate entries; importing the keyword entry into the dictionary of a word segmentation tool to update the word segmentation tool, and performing word segmentation on the to-be-processed construction corpus by using the updated word segmentation tool.

2. The method of claim 1, wherein, The performing word segmentation on the to-be-processed construction corpus to obtain a word segmentation result comprising a plurality of word segments further comprises: judging whether the keyword entry exists in the to-be-processed construction corpus, if yes, taking the existing keyword entry as a long word segment; performing word segmentation on the corpus except the long word segment in the to-be-processed construction corpus to obtain a short word segment; forming the long word segment and the short word segment into the word segmentation result.

3. The method for constructing a construction keyword database according to claim 1, characterized in that, The obtaining a preset construction core word and screening a first-level word segment comprising the construction core word from the word segmentation result comprises: obtaining a plurality of preset regular expressions; wherein one regular expression corresponds to one construction core word; sequentially traversing each regular expression, and judging whether a target word segment meeting the current traversed regular expression exists in the word segmentation result, if yes, setting the target word segment as a first-level word segment, and if no, traversing the next regular expression.

4. The method for constructing a construction keyword database according to claim 1, characterized in that, The calculating the similarity between the construction core word and other word segments in the word segmentation result except the first-level word segment, and setting a word segment with a similarity greater than a preset threshold as a second-level word segment comprises: converting the construction core word into a core word vector and converting other word segments in the word segmentation result except the first-level word segment into word segment vectors by using a preset word vector model; sequentially traversing each core word vector, respectively calculating the cosine distance between each word segment vector and the currently traversed core word vector, and setting the word segment corresponding to the word segment vector with a cosine distance greater than the preset threshold as a second-level word segment.

5. The method of claim 1, wherein the construction key words are selected from the group consisting of: The adding the first-level word segment and the second-level word segment as construction keywords to a preset construction keyword library comprises: ​ obtaining a first-level construction group to which the construction core word corresponding to the first-level word segment belongs, and adding a construction group label corresponding to the first-level construction group to the first-level word segment. obtain a secondary construction group to which the construction core word corresponding to the secondary word segmentation belongs, and add a construction group label corresponding to the secondary construction group to the secondary word segmentation; add the primary word segmentation and the secondary word segmentation in the construction group corresponding to the construction key word library according to the construction group label.

6. The method of claim 1, wherein the construction key words are selected from the group consisting of: After the primary word segmentation and the secondary word segmentation are added to the preset construction key word library as construction key words, the method further comprises: ​ obtain a construction text, and identify a target key word from the construction text by using the construction key word library; wherein the target key word is contained in the construction key word library; determine a plurality of paragraphs from the construction text, and respectively count key word features of each paragraph; wherein the key word features include: key word quantity and key word frequency; calculate an importance value of each paragraph according to the text quantity and the key word features of each paragraph by using a preset algorithm; mark the paragraph with the highest importance value as a construction key paragraph.

7. An apparatus for constructing a construction keyword database, characterized in that, The device comprises: a word segmentation module configured to perform word segmentation on a to-be-processed construction corpus to obtain a word segmentation result comprising a plurality of word segmentations; a containing module configured to obtain a preset construction core word, and filter a primary word segmentation containing the construction core word from the word segmentation result; a similarity module configured to calculate a similarity between other word segmentations except the primary word segmentation and the construction core word in the word segmentation result, and set a word segmentation with a similarity greater than a preset threshold as a secondary word segmentation; an adding module configured to add the primary word segmentation and the secondary word segmentation as construction key words to a preset construction key word library; The word segmentation module is configured to: obtain a construction corpus sample, and perform a constituent syntax analysis on the construction corpus sample by using a constituent syntax analysis model to obtain a sample phrase and a phrase type of each sample phrase; determine whether the phrase length of the sample phrase is less than or equal to a maximum length corresponding to the phrase type, if yes, set the sample phrase as a candidate entry, and if no, determine a candidate entry from the sample phrase according to the maximum length; filter a construction-related key entry meeting a condition from all candidate entries; import the key entry into a dictionary of a word segmentation tool to update the word segmentation tool, and perform word segmentation on the to-be-processed construction corpus by using the updated word segmentation tool.

8. A computer device comprising: A memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.

9. A computer storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the steps of the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Word generation method and system of corpus, computer equipment and storage medium

    CN110909539A

  • Airline event-based keyword extraction method and device and medium

    CN114692619A