Talking about automatic summarization algorithm, common and most easily realized when belong to TF-IDF, but feel tf-idf effect general, inferior to textrank good.
650) this.width=650; "alt=" bubuko.com, Bubu Buckle "src=" http://ww4.sinaimg.cn/large/6cbb8645gw1eeti85tt02j20jj03xmx5.jpg " Width= "703" height= "141" style= "padding:0px;"/>
The formal Textrank formula, based on the formula of PageRank, introduces the concept of the weight of the edge, representing the similarity of the two sentences.
650) this.width=650; "alt=" bubuko.com, Bubu Buckle "src=" http://ww1.sinaimg.cn/large/6cbb8645gw1eetibn86vij20jy03gmx8.jpg " Width= "718" height= "124" style= "padding:0px;"/>
But obviously I just want to calculate the keyword, if a word as a sentence, then all the sentences (words) constitute the weight of the edge is 0 (no intersection, no similarity), so the weight of the numerator denominator w is about to drop, the algorithm degenerate to PageRank. So, it is said that the keyword extraction algorithm is not too pagerank.
In addition, if you want to extract the key sentence (automatic summary), please refer to the sister article "Textrank algorithm automatic summary of Java implementation."
I took out the Baidu encyclopedia on the definition of "programmer" as a test case, it is clear that the definition of the keyword should be "programmer" and "programmer" should score the highest.
First of all, this sentence participle, here can help with a variety of word segmentation items, such as ANSJ participle, to obtain the results:
Then remove the stop words inside, here I removed the punctuation, common words, and "nouns, verbs, adjectives, adverbs and other words." Come up with useful words: Get Java Big Data High concurrency system framework SPRINGMVC MyBatis Bootstrap HTML5 Shiro maven SSM
After that, create two windows with a size of 5, each of which will vote for words within 5 of the distance behind it:
{Development =[Professional, programmer, Maintenance, English, program, personnel],
Software =[programmers, divided into, boundaries, advanced, China, special, personnel],
Programmer =[Development, software, analyst, maintenance, system, project, manager, divided into, English, program, professional, design, senior, personnel, China],
Analyst =[Programmer, System, project, manager, advanced],
Maintenance =[Professional, development, programmer, divided into, English, program, personnel],
System =[programmer, analyst, project, manager, divided, advanced],
Project =[programmer, analyst, System, manager, advanced],
Manager =[programmer, analyst, System, Project],
Divided into =[Professional, software, design, programmer, maintenance, System, advanced, program, China, special, personnel],
English =[Professional, development, programmer, Maintenance, program],
Program =[Professional, development, design, programmer, coding, maintenance, boundaries, divided into, English, special, personnel],
Special =[software, coding, dividing, boundaries, programs, China, people],
Professional =[Development, programmer, maintenance, divided into, English, program, personnel],
Design =[programmer, Code, divide, program, people],
Coding =[Design, boundaries, procedures, China, special, people],
Boundaries =[software, coding, programs, China, special, people],
Senior =[programmer, software, analyst, System, project, divide, personnel],
China =[programmer, Software, coding, dividing, dividing, special, personnel],
Personnel =[Development, programmer, software, maintenance, divide, program, special, Professional, design, coding, boundaries, advanced, China]}