Home > Back-end > Word frequency statistics algorithm
Word frequency statistics algorithm
Time:05-26
Such as the following phrases
Phrases: 1 seller in lien to looking and ㈥ Phrase 2: seller in lien to Phrase 3: looking and ( Phrase 4: seller in lien seller Phrase 5: seller to denominated in
Statistical continuously appear in the above phrase phrase (at least more than two words) the number of times, The result should be: Seller in lien to appear twice Looking and appear 2 times Seller appears 3 times in lien
Try N quadtree breadth traversal tree construction, the depth of the algorithm to solve the word frequency, encountered node lines into the ring, still can not find a solution,
CodePudding user response:
Send a sample out to statistical data, is a big difference of different data statistical method
CodePudding user response:
Problems just I make a simple demo, Demand for an English article, statistical articles words present continuously more than 2 times, Such as the essay is: I am a man, I am a programmer. I am on programming now. Results: I am a (2) I am (3 times)