How to deal with the keyword and description of the page, the program automatically retrieves the body from other websites, then saves it as an html file, and how to obtain the keyword information in the body, replace the keyword and Description content on the static page ------ solution -------------------- is troublesome. Try regular expression extraction and replacement ------ solution -------------------- what is the keyword information in the body? --- How to handle the keywords and descriptions of the page
News class, the program automatically obtains the body from other websites, and then saves it as an html file, how to obtain the keyword information in the body, replacing the keyword and Description content in the static page
------ Solution --------------------
Troublesome. Try regular expression extraction and replacement.
------ Solution --------------------
What is the keyword information in the body?
------ Solution --------------------
Word Segmentation
------ Solution --------------------
To obtain data that can replace the keyword content, you must extract keywords from the database,
The data storage format is similar to the parent-child relationship between Forum partitions and posts.
However, the question is how to generate keywords.
I think there are two ways to generate keywords:
1. manually submit
That is, when submitting a news report, there is a keyword bar where you can manually enter the required keywords.
2. automatically generate the information based on the content when submitting the news
Extracting keywords from an article is a tedious operation, usually called word segmentation, and is also one of the key technologies of search engines.
It is impossible to extract data. There are two types:
2.1 automatically input when submitting news
When submitting news, you can use JavaScript to extract keywords from the content. of course, if the content is too long, the extraction time will also be longer.
However, it takes a little longer to submit the content, which usually does not affect the operation quality of the UI. In addition, the specific step to be analyzed can be determined based on the situation.
2.2 automatic background program generation
In short, it is to use a background program to analyze news content, then automatically generate keyword information, and save it to the database.
DZ Forum Keyword extraction is the combination of Method 1 and 2.1.
Lz can select a method that suits its needs.
------ Solution --------------------
Word segmentation, very troublesome
Mainly word segmentation and word frequency statistics
Intelligent Text retrieval and Keyword extraction
You can develop search engines and intelligent translation systems if you can.