CN115525761A - Method, device, equipment and storage medium for article keyword screening category - Google Patents
Method, device, equipment and storage medium for article keyword screening category Download PDFInfo
- Publication number
- CN115525761A CN115525761A CN202211208768.9A CN202211208768A CN115525761A CN 115525761 A CN115525761 A CN 115525761A CN 202211208768 A CN202211208768 A CN 202211208768A CN 115525761 A CN115525761 A CN 115525761A
- Authority
- CN
- China
- Prior art keywords
- text
- keywords
- target
- calculating
- classified
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000012216 screening Methods 0.000 title claims abstract description 30
- 238000003860 storage Methods 0.000 title claims description 16
- 238000012545 processing Methods 0.000 claims abstract description 36
- 230000011218 segmentation Effects 0.000 claims abstract description 21
- 238000007781 pre-processing Methods 0.000 claims abstract description 15
- 238000001914 filtration Methods 0.000 claims description 16
- 238000004590 computer program Methods 0.000 claims description 11
- 238000004364 calculation method Methods 0.000 claims description 10
- 238000004458 analytical method Methods 0.000 claims description 6
- 238000002372 labelling Methods 0.000 claims description 4
- 238000005516 engineering process Methods 0.000 abstract description 2
- 230000006870 function Effects 0.000 description 20
- 238000004891 communication Methods 0.000 description 8
- 238000013473 artificial intelligence Methods 0.000 description 6
- 238000004422 calculation algorithm Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 5
- 238000007726 management method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 238000011160 research Methods 0.000 description 3
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/279—Recognition of textual entities
- G06F40/289—Phrasal analysis, e.g. finite state techniques or chunking
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Probability & Statistics with Applications (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention relates to an intelligent decision technology, and discloses a method for screening article keywords, which comprises the following steps: acquiring a text to be classified, and preprocessing the text to be classified to obtain a target text; recognizing text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words; extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors, and calculating the weight of the text keywords in the target text; calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying word categories of the target keywords, and taking the word categories as text categories of the text to be classified. The invention aims to improve the accuracy of article keyword classification.
Description
Technical Field
The invention relates to the technical field of intelligent decision making, in particular to a method, a device, equipment and a storage medium for screening article keywords.
Background
The people have entered the big data era, and all walks of life need to process a large amount of data, such as news, current news data and research data, the data volume is very large, and the wanted data can be obtained by screening and classifying according to the matching rules given by the business. After receiving a piece of news or research and report data, whether the piece of data is the required data or not needs to be determined according to the title matching keywords, classification is determined according to the classification labels associated with the keywords, and the method for screening the articles and determining the article classification only considers the title and does not consider the contents of the abstract and the body part of the article, so that the classification result is inaccurate.
Disclosure of Invention
The invention provides a method, a device, equipment and a storage medium for screening article keywords, and mainly aims to improve the accuracy of article keyword classification.
In order to achieve the above object, the method for screening the categories of the keywords of the article provided by the invention comprises the following steps:
acquiring a text to be classified, and preprocessing the text to be classified to obtain a target text;
recognizing text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words;
extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors, and calculating the weight of the text keywords in the target text;
calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying word categories of the target keywords, and taking the word categories as text categories of the text to be classified.
Optionally, the preprocessing the text to be classified to obtain a target text includes:
identifying non-text content in the text to be classified;
if the non-text content does not exist in the text to be classified, converting the text to be classified to obtain a target text;
if the text to be classified has the non-text content, identifying a text region of the non-text content;
extracting characters from the text area to obtain a character sequence;
and converting the character sequence into a character text, and combining the character text and the text to be classified to obtain a target text.
Optionally, the performing word segmentation processing on the text data to obtain text words includes:
carrying out duplicate removal processing on the text data to obtain a duplicate removal text;
filtering the duplicate removal text to obtain a filtered text;
labeling the filtered text according to a preset word comparison table to obtain a labeled text;
and performing word segmentation processing on the labeling data to obtain text words.
Optionally, the extracting text keywords of the text words includes:
performing semantic analysis on the text data to obtain text semantics;
performing semantic analysis on the text words to obtain word semantics;
calculating the matching degree of the text semantics and the word semantics;
and when the matching degree is greater than a preset value, taking the text words corresponding to the matching degree as text keywords of the text data, and extracting the text keywords.
Optionally, the calculating the attribution degree of the text keyword in the text classification factor includes:
calculating the weight value of the text key words in the text classification factors;
acquiring the occurrence frequency of the text keywords in the text classification factors;
and calculating the attribution degree of the text keywords in the text classification factors according to the weight value and the frequency.
Optionally, the calculating and weighting the text keyword in the target text includes:
calculating the word frequency of the text keywords in the target text;
calculating the reverse file frequency of the text keywords in the target text;
and calculating the weight of the text key words according to the frequency and the reverse file frequency.
Optionally, the calculating the support degree of the text keyword according to the attribution degree and the weight includes:
calculating the scores of the text keywords in the text classification factors, summing the scores to obtain the matching scores of the text keywords, converting the matching scores into numerical values, and multiplying and summing the numerical values with the attribution degrees and the weights respectively to obtain the support degrees of the text keywords.
In order to solve the above problem, the present invention further provides an apparatus for screening article keywords, wherein the apparatus comprises:
the text processing module is used for acquiring a text to be classified and preprocessing the text to be classified to obtain a target text;
the text word segmentation module is used for identifying text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words;
the weight calculation module is used for extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors and calculating the weight of the text keywords in the target text;
and the text classification module is used for calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying the word categories of the target keywords and taking the word categories as the text categories of the texts to be classified.
In order to solve the above problem, the present invention also provides an electronic device, including:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor, the computer program being executable by the at least one processor to enable the at least one processor to perform the method for keyword screening of articles as described above.
In order to solve the above problem, the present invention further provides a storage medium, in which at least one computer program is stored, and the at least one computer program is executed by a processor in an electronic device to implement the method for filtering the article keyword according to the above description.
The method and the device for processing the target text can obtain the target text by acquiring the text to be classified and preprocessing the text to be classified, can convert all contents in the classified text into a text form, and provide convenience for processing the target text subsequently, wherein the text data of each classification factor in the text classification factors are inquired by identifying the text classification factors of the target text, and guarantee is provided for the subsequent processing of the text data; in addition, the invention can remove unimportant words in the text words by extracting the text keywords of the text words, thereby reducing the subsequent calculation difficulty of the text keywords. Therefore, the method, the apparatus, the device and the storage medium for article keyword screening provided by the embodiments of the present invention can be used to improve the accuracy of article keyword classification.
Drawings
FIG. 1 is a flowchart illustrating a method for keyword screening of an article according to an embodiment of the present invention;
FIG. 2 is a functional block diagram of an apparatus for keyword screening of articles according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device for implementing the method for screening categories of article keywords according to an embodiment of the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the application provides a method for screening categories of article keywords. In the embodiment of the present application, the execution subject of the method for article keyword screening categories includes, but is not limited to, at least one of electronic devices such as a server and a terminal that can be configured to execute the method provided in the embodiment of the present application. In other words, the method for filtering the article keywords can be executed by software or hardware installed in the terminal device or the server device, and the software can be a block chain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, and the like. The server may be an independent server, or may be a cloud server that provides basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, and the like.
Referring to fig. 1, a flowchart of a method for screening categories of article keywords according to an embodiment of the present invention is shown. In this embodiment, the method for filtering the article keyword includes steps S1 to S5:
s1, obtaining a text to be classified, and preprocessing the text to be classified to obtain a target text.
According to the embodiment of the invention, the target text can be obtained by acquiring the text to be classified and preprocessing the text to be classified, the content in the classified text can be completely converted into the text form, and convenience is provided for the subsequent processing of the target text.
The text to be classified is news data or newspaper research data, and the preprocessing is to identify and convert the text to be classified, and to convert all non-text contents in the text to be classified into a text content form.
As an embodiment of the present invention, the preprocessing the text to be classified to obtain a target text includes: identifying non-text content in the text to be classified, if the non-text content is not in the text to be classified, converting the text to be classified to obtain a target text, if the non-text content is in the text to be classified, identifying a text region of the non-text content, extracting characters from the text region to obtain a character sequence, converting the character sequence into a character text, and combining the character text with the text to be classified to obtain the target text.
The non-text content is picture data or voice data in the text to be classified, the non-text content is not content expressed in a text form, the target text is a text in which all content in the text to be classified is expressed in a text form, the text region is a region containing text in the non-text content, the character sequence is all characters in the text region, the character text is a text form corresponding to the character sequence, further, the identification of the non-text content in the text to be classified can be realized through an AI intelligent identification algorithm, the AI intelligent identification algorithm is compiled by a script language, the conversion of the text to be classified can be realized through a text conversion tool, the text conversion tool is constructed by Java language, the identification of the text region of the non-text content can be realized through an AI intelligent identification algorithm, the extraction of characters in the text region can be realized through an OCR function, and the conversion of the character sequence into the character text can be realized through a character conversion function.
S2, identifying the text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words.
The text classification factors of the target text are identified, so that the text data of each classification factor in the text classification factors are inquired, and the follow-up processing of the text data is guaranteed.
The text classification factors are the target texts as classification elements, such as titles, abstracts and body contents of the target texts, and the text data is the text contents in the text classification factors, further, the recognition of the text classification factors can be realized by the OCR recognition algorithm, and the text data of each classification factor in the text classification factors can be queried by a text recognizer.
According to the embodiment of the invention, the text words in the text data can be obtained by performing word segmentation processing on the text data, useless data in the text data is removed, and the processing difficulty of the text data is reduced.
As an embodiment of the present invention, the performing word segmentation processing on the text data to obtain text words includes: and carrying out duplication removal processing on the text data to obtain duplication removal texts, carrying out filtering processing on the duplication removal texts to obtain filtering texts, labeling the filtering texts according to a preset word comparison table to obtain labeled texts, and carrying out word segmentation processing on the labeled data to obtain text words.
The method comprises the steps of deleting repeated text information in text data to obtain a text, deleting stop words in the duplicate text to obtain a filtered text, marking the marked text to obtain a text after marking words in the filtered text, wherein the text words are all words in the filtered text, further, the duplicate removal of the text data can be realized through a duplicate removal function, the filtering of the duplicate text can be realized through a set aggregation method, marking of the filtered text can be realized through a marking tool, such as a color marking tool, the word segmentation of the marked data can be realized through an Elasticissearch tool, further, the Elasticissearch tool is a distributed, high-expansion and high-real-time search and data analysis engine, a large amount of data can be conveniently provided with the searching, analyzing and exploring capabilities, the Elasticissearch tool has horizontal flexibility, the data can be changed into more valuable in a production environment, the implementation of the Elasticissearch tool is mainly divided into the following steps, the results are submitted to an Elasticissearch database, and the results are displayed in a corresponding user database according to the results, and the results are displayed in a corresponding user.
S3, extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors, and calculating the weight of the text keywords in the target text.
According to the method, the unimportant words in the text words can be removed by extracting the text keywords of the text words, so that the subsequent calculation difficulty of the text keywords is reduced. The text keywords are words with relatively high refinement or relatively high occurrence frequency in the text words.
As an embodiment of the present invention, the extracting text keywords of the text words includes: performing semantic analysis on the text data to obtain text semantics, performing semantic analysis on the text words to obtain word semantics, calculating the matching degree of the text semantics and the word semantics, taking the text words corresponding to the matching degree as text keywords of the text data when the matching degree is greater than a preset value, and extracting the text keywords.
The text semantics represent a central idea of the text data, the word semantics represent a central idea of the text words, the matching degree is two object images which are not identical, the matching degree is called matching degree under a certain classification requirement, the preset value is a preset numerical value and can be used as a basis for judging whether the text semantics and the word semantics are matched, and the preset value can be 0.8 and can also be set according to an actual service scene.
The invention can judge the importance of the text keywords according to the attribution degree by calculating the attribution degree of the text keywords in the text classification factors, wherein the attribution degree is the percentage of the text keywords in the text classification factors.
As an embodiment of the present invention, the calculating the attribution degree of the text keyword in the text classification factors includes: calculating the weight value of the text key words in the text classification factors, acquiring the occurrence frequency of the text key words in the text classification factors, and calculating the attribution degree of the text key words in the text classification factors according to the weight value and the occurrence frequency.
The weighted value is a numerical value representing the importance degree of the text keyword in the text classification factor, the frequency is the number of times of occurrence of the text keyword in the text classification factor, further, the weighted value of the text keyword in the text classification factor can be calculated through a weighting function, the frequency of occurrence of the text keyword in the text classification factor can be realized through a count function, the attribution degree calculation of the text keyword in the text classification factor can be calculated through an attribution degree function, and the attribution degree function is compiled by a script language.
According to the invention, the weight of the text keyword in the target text is calculated, so that the weight value of the text keyword can be obtained, and a guarantee is provided for subsequent calculation, wherein the weight value represents the importance degree of the text keyword in the target text.
As an embodiment of the present invention, the calculating the weight of the text keyword in the target text includes: calculating the word frequency of the text keywords in the target text, calculating the reverse file frequency of the text keywords in the target text, and calculating the weight of the text keywords according to the frequency and the reverse file frequency.
The word frequency is the frequency of the text keywords appearing in the target text, the reverse file frequency is the reciprocal of the word frequency, further, the word frequency can be calculated through a word frequency algorithm, the reverse file frequency of the text keywords in the target text can be calculated through an IDF function, and the weights of the text keywords can be calculated through a weight function.
Further, the word frequency algorithm includes:
wherein td a,b Word frequency, W, representing text keywords a,b Represents the number of text keywords, sigma c W c,b Representing a sum of text keywords in a target text
S4, calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying word categories of the target keywords, and taking the word categories as text categories of the text to be classified.
According to the embodiment of the invention, the support degree of the text key words is calculated according to the attribution degree and the weight, so that a guarantee is provided for the subsequent classification of the text to be classified.
The support degree is a degree of support of the text keyword in the target text, and is usually expressed by a percentage, the preset condition is that the support degree is greater than a preset threshold, and the threshold may be 80% or may be set according to an actual service scenario.
As an embodiment of the present invention, the calculating the support degree of the text keyword according to the attribution degree and the weight includes: calculating the scores of the text keywords in the text classification factors, summing the scores to obtain the matching scores of the text keywords, converting the matching scores into numerical values, and multiplying and summing the numerical values with the attribution degrees and the weights respectively to obtain the support degrees of the text keywords.
The shared score is the importance degree of the text keyword in the text classification factor, the matching score is the sum of the shared scores, and further, the calculation of the shared score of the text keyword in the text classification factor can be realized through a score function, and the score function is compiled by a scripting language.
The text keywords with the support degrees meeting the preset conditions are selected as the target keywords, so that accuracy is provided for subsequent classification of the target texts, wherein the preset conditions are that the support degrees are greater than a preset threshold value, and the threshold value can be 80% or can be set according to actual service scenes. Further, the selection of the target keyword can be realized through a left function.
According to the method and the device, the word category of the target keyword is identified and can be used as the text category of the text to be classified, so that the accuracy of text classification is improved, wherein the word category is the attribute category of the target keyword, and further, the word category of the target keyword can be identified through OCR character identification.
The method and the device for processing the target text can obtain the target text by acquiring the text to be classified and preprocessing the text to be classified, can convert all contents in the classified text into a text form, and provide convenience for processing the target text subsequently, wherein the text data of each classification factor in the text classification factors are inquired by identifying the text classification factors of the target text, and guarantee is provided for the subsequent processing of the text data; in addition, the invention can remove unimportant words in the text words by extracting the text keywords of the text words, thereby reducing the subsequent calculation difficulty of the text keywords. Therefore, the method for screening the categories of the article keywords provided by the embodiment of the invention can improve the accuracy of the article keyword classification.
Fig. 2 is a functional block diagram of an apparatus for filtering keyword categories of articles according to an embodiment of the present invention.
The article keyword screening category apparatus 100 according to the present invention may be installed in an electronic device. According to the realized functions, the article keyword screening and classifying device 100 can comprise a text processing module 101, a text word segmentation module 102, a weight calculation module 103 and a text classification module 104. The module of the present invention, which may also be referred to as a unit, refers to a series of computer program segments that can be executed by a processor of an electronic device and can perform a fixed function, and are stored in a memory of the electronic device.
In the present embodiment, the functions of the respective modules/units are as follows:
the text processing module 101 is configured to obtain a text to be classified, and pre-process the text to be classified to obtain a target text;
the text word segmentation module 102 is configured to identify text classification factors of the target text, query text data of each classification factor in the text classification factors, and perform word segmentation processing on the text data to obtain text words;
the weight calculation module 103 is configured to extract text keywords of the text words, calculate attribution degrees of the text keywords in the text classification factors, and calculate weights of the text keywords in the target text;
the text classification module 104 is configured to calculate a support degree of the text keyword according to the attribution degree and the weight, select the text keyword with the support degree meeting a preset condition as a target keyword, identify a word category of the target keyword, and use the word category as the text category of the text to be classified.
In detail, in the embodiment of the present application, each module in the apparatus 100 for article keyword category screening employs the same technical means as the method for article keyword category screening described in fig. 1, and can produce the same technical effect, and is not described herein again.
Fig. 3 is a schematic structural diagram of an electronic device 1 for implementing a method for filtering categories of keywords of an article according to an embodiment of the present invention.
The electronic device 1 may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may further include a computer program, such as a method program for filtering a keyword of an article, stored in the memory 11 and running on the processor 10.
In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or may be composed of a plurality of integrated circuits packaged with the same function or different functions, and includes one or more Central Processing Units (CPUs), microprocessors, digital Processing chips, graphics processors, and combinations of various control chips. The processor 10 is a Control Unit (Control Unit) of the electronic device 1, connects various components of the whole electronic device by using various interfaces and lines, and executes various functions and processes data of the electronic device by running or executing programs or modules (for example, methods for executing keyword screening categories of articles, etc.) stored in the memory 11 and calling data stored in the memory 11.
The memory 11 includes at least one type of readable storage medium including flash memory, removable hard disks, multimedia cards, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, magnetic disks, optical disks, etc. The memory 11 may in some embodiments be an internal storage unit of the electronic device, for example a removable hard disk of the electronic device. The memory 11 may also be an external storage device of the electronic device in other embodiments, such as a plug-in mobile hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the electronic device. Further, the memory 11 may also include both an internal storage unit and an external storage device of the electronic device. The memory 11 may be used to store not only application software installed in the electronic device and various types of data, such as codes of method programs for filtering categories of article keywords, but also temporarily store data that has been output or will be output.
The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is arranged to enable connection communication between the memory 11 and at least one processor 10 or the like.
The communication interface 13 is used for communication between the electronic device 1 and other devices, and includes a network interface and a user interface. Optionally, the network interface may include a wired interface and/or a wireless interface (e.g., WI-FI interface, bluetooth interface, etc.), which are commonly used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a Display (Display), an input unit, such as a Keyboard (Keyboard), and optionally a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is suitable, among other things, for displaying information processed in the electronic device and for displaying a visualized user interface.
Fig. 3 shows only an electronic device with components, and it will be understood by those skilled in the art that the structure shown in fig. 3 does not constitute a limitation of the electronic device 1, and may comprise fewer or more components than those shown, or some components may be combined, or a different arrangement of components.
For example, although not shown, the electronic device 1 may further include a power supply (such as a battery) for supplying power to each component, and preferably, the power supply may be logically connected to the at least one processor 10 through a power management device, so as to implement functions of charge management, discharge management, power consumption management, and the like through the power management device. The power supply may also include any component of one or more dc or ac power sources, recharging devices, power failure detection circuitry, power converters or inverters, power status indicators, and the like. The electronic device 1 may further include various sensors, a bluetooth module, a Wi-Fi module, and the like, which are not described herein again.
It is to be understood that the embodiments described are illustrative only and are not to be construed as limiting the scope of the claims.
The method program for filtering the article keyword category stored in the memory 11 of the electronic device 1 is a combination of a plurality of instructions, and when running in the processor 10, can implement:
acquiring a text to be classified, and preprocessing the text to be classified to obtain a target text;
recognizing text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words;
extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors, and calculating the weight of the text keywords in the target text;
calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying word categories of the target keywords, and taking the word categories as text categories of the text to be classified.
Specifically, the specific implementation method of the instruction by the processor 10 may refer to the description of the relevant steps in the embodiment corresponding to the drawings, which is not described herein again.
Further, the integrated modules/units of the electronic device 1 may be stored in a storage medium if they are implemented in the form of software functional units and sold or used as separate products. The storage medium may be volatile or non-volatile. For example, the medium may include: any entity or device capable of carrying said computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM).
The present invention also provides a storage medium, which is readable and stores a computer program that, when executed by a processor of an electronic device, can implement:
acquiring a text to be classified, and preprocessing the text to be classified to obtain a target text;
recognizing text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words;
extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors, and calculating the weight of the text keywords in the target text;
calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying word categories of the target keywords, and taking the word categories as text categories of the text to be classified.
In the embodiments provided in the present invention, it should be understood that the disclosed apparatus, device and method can be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional module.
It will be evident to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, and that the present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof.
The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference signs in the claims shall not be construed as limiting the claim concerned.
The embodiment of the application can acquire and process related data based on an artificial intelligence technology. Among them, artificial Intelligence (AI) is a theory, method, technique and application system that simulates, extends and expands human Intelligence using a digital computer or a machine controlled by a digital computer, senses the environment, acquires knowledge and uses the knowledge to obtain the best result.
Furthermore, it is obvious that the word "comprising" does not exclude other elements or steps, and the singular does not exclude the plural. A plurality of units or means recited in the system claims may also be implemented by one unit or means in software or hardware. The terms first, second, etc. are used to denote names, but not any particular order.
Finally, it should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and not to limit the same, and although the present invention is described in detail with reference to the preferred embodiments, it should be understood by those skilled in the art that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims (10)
1. A method for screening categories of article keywords is characterized by comprising the following steps:
acquiring a text to be classified, and preprocessing the text to be classified to obtain a target text;
identifying text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words;
extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors, and calculating the weight of the text keywords in the target text;
and calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying word categories of the target keywords, and taking the word categories as text categories of the text to be classified.
2. The method for screening categories of article keywords according to claim 1, wherein the preprocessing the text to be classified to obtain a target text comprises:
identifying non-text content in the text to be classified;
if the non-text content does not exist in the text to be classified, converting the text to be classified to obtain a target text;
if the non-text content exists in the text to be classified, identifying a text area of the non-text content;
extracting characters from the text area to obtain a character sequence;
and converting the character sequence into a character text, and combining the character text and the text to be classified to obtain a target text.
3. The method for screening categories of keywords of articles according to claim 1, wherein the step of performing word segmentation processing on the text data to obtain text words comprises:
carrying out duplicate removal processing on the text data to obtain a duplicate removal text;
filtering the de-duplicated text to obtain a filtered text;
labeling the filtered text according to a preset word comparison table to obtain a labeled text;
and performing word segmentation processing on the labeled data to obtain text words.
4. The method for article keyword screening categories as claimed in claim 1, wherein the extracting the text keywords of the text words comprises:
performing semantic analysis on the text data to obtain text semantics;
performing semantic analysis on the text words to obtain word semantics;
calculating the matching degree of the text semantics and the word semantics;
and when the matching degree is greater than a preset value, taking the text words corresponding to the matching degree as text keywords of the text data, and extracting the text keywords.
5. The method of claim 1, wherein the calculating the attribution degree of the text keyword in the text classification factors comprises:
calculating the weight value of the text key words in the text classification factors;
acquiring the occurrence frequency of the text keywords in the text classification factors;
and calculating the attribution degree of the text keywords in the text classification factors according to the weight value and the frequency.
6. The method for article keyword screening categories according to claim 1, wherein the calculating the weight of the text keyword in the target text comprises:
calculating the word frequency of the text keywords in the target text;
calculating the reverse file frequency of the text keywords in the target text;
and calculating the weight of the text key words according to the frequency and the reverse file frequency.
7. The method for filtering keyword of article according to claim 1, wherein said calculating the support degree of said text keyword according to said attribution degree and said weight comprises:
calculating the scores of the text keywords in the text classification factors, summing the scores to obtain the matching scores of the text keywords, converting the matching scores into numerical values, and multiplying and summing the numerical values with the attribution degrees and the weights respectively to obtain the support degrees of the text keywords.
8. An apparatus for filtering categories of keywords of articles, the apparatus comprising:
the text processing module is used for acquiring a text to be classified and preprocessing the text to be classified to obtain a target text;
the text word segmentation module is used for identifying text classification factors of the target text, inquiring text data of each classification factor in the text classification factors, and performing word segmentation processing on the text data to obtain text words;
the weight calculation module is used for extracting text keywords of the text words, calculating the attribution degree of the text keywords in the text classification factors and calculating the weight of the text keywords in the target text;
and the text classification module is used for calculating the support degree of the text keywords according to the attribution degree and the weight, selecting the text keywords with the support degree meeting preset conditions as target keywords, identifying the word categories of the target keywords and taking the word categories as the text categories of the text to be classified.
9. An electronic device, characterized in that the electronic device comprises:
at least one processor; and (c) a second step of,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of article keyword screening categories as claimed in any one of claims 1 to 7.
10. A storage medium storing a computer program, wherein the computer program when executed by a processor implements the method for article keyword screening category according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211208768.9A CN115525761A (en) | 2022-09-30 | 2022-09-30 | Method, device, equipment and storage medium for article keyword screening category |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211208768.9A CN115525761A (en) | 2022-09-30 | 2022-09-30 | Method, device, equipment and storage medium for article keyword screening category |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115525761A true CN115525761A (en) | 2022-12-27 |
Family
ID=84698806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211208768.9A Pending CN115525761A (en) | 2022-09-30 | 2022-09-30 | Method, device, equipment and storage medium for article keyword screening category |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115525761A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116629254A (en) * | 2023-05-05 | 2023-08-22 | 杭州正策信息科技有限公司 | Policy text analysis method based on text analysis and recognition |
-
2022
- 2022-09-30 CN CN202211208768.9A patent/CN115525761A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116629254A (en) * | 2023-05-05 | 2023-08-22 | 杭州正策信息科技有限公司 | Policy text analysis method based on text analysis and recognition |
CN116629254B (en) * | 2023-05-05 | 2024-03-22 | 杭州正策信息科技有限公司 | Policy text analysis method based on text analysis and recognition |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112597312A (en) | Text classification method and device, electronic equipment and readable storage medium | |
CN113268615A (en) | Resource label generation method and device, electronic equipment and storage medium | |
CN114138784B (en) | Information tracing method and device based on storage library, electronic equipment and medium | |
CN113360768A (en) | Product recommendation method, device and equipment based on user portrait and storage medium | |
CN114416939A (en) | Intelligent question and answer method, device, equipment and storage medium | |
CN113886708A (en) | Product recommendation method, device, equipment and storage medium based on user information | |
CN112632264A (en) | Intelligent question and answer method and device, electronic equipment and storage medium | |
CN112883730A (en) | Similar text matching method and device, electronic equipment and storage medium | |
CN115018588A (en) | Product recommendation method and device, electronic equipment and readable storage medium | |
CN114969484A (en) | Service data searching method, device, equipment and storage medium | |
CN117390173B (en) | Massive resume screening method for semantic similarity matching | |
CN114756669A (en) | Intelligent analysis method and device for problem intention, electronic equipment and storage medium | |
CN115525761A (en) | Method, device, equipment and storage medium for article keyword screening category | |
CN113869456A (en) | Sampling monitoring method and device, electronic equipment and storage medium | |
CN113902404A (en) | Employee promotion analysis method, device, equipment and medium based on artificial intelligence | |
CN113821602A (en) | Automatic answering method, device, equipment and medium based on image-text chatting record | |
CN113343102A (en) | Data recommendation method and device based on feature screening, electronic equipment and medium | |
CN112579781A (en) | Text classification method and device, electronic equipment and medium | |
CN115409041B (en) | Unstructured data extraction method, device, equipment and storage medium | |
CN114969385B (en) | Knowledge graph optimization method and device based on document attribute assignment entity weight | |
CN116738044A (en) | Book recommendation method, device and equipment for realizing college library based on individuation | |
CN114943306A (en) | Intention classification method, device, equipment and storage medium | |
CN114996386A (en) | Business role identification method, device, equipment and storage medium | |
CN114693435A (en) | Intelligent return visit method and device for collection list, electronic equipment and storage medium | |
CN114996400A (en) | Referee document processing method and device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |