Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C
Hi all,
 
I want to find the repeated sentences/pharses and count their frequence in paragraphs or documents.
 
ex:
The paragraph:
 
On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document. You can use these galleries to insert tables, headers, footers, lists, cover pages, and other document building blocks. When you create pictures, charts, or diagrams, they also coordinate with your current document look. You can easily change the formatting of selected text in the document text by choosing a look for the selected text from the Quick Styles gallery on the Home tab. You can also format text directly by using the other controls on the Home tab. Most controls offer a choice of using the look from the current theme or using a format that you specify directly. To change the overall look of your document, choose new Theme elements on the Page Layout tab. To change the looks available in the Quick Style gallery, use the Change Current Quick Style Set command. Both the Themes gallery and the Quick Styles gallery provide reset commands so that you can always restore the look of your document to the original contained in your current template. On the Insert tab, the galleries include items that are designed to coordinate with the overall look of your document.
 
One of the repeated sentences/pharses is "On the Insert tab".
Its frequence is 2. How to find all of them?
 
Do you have any idea?
 
Many thanks!
Posted 31-Jan-13 18:51pm
Comments
Sergey Alexandrovich Kryukov at 1-Feb-13 0:01am
   
This is not a valid question. "Do you have any idea?" would make some sense when something is conceptually puzzling or just difficult. But here, this is nothing but some amount of work. So, what have you done so far?
—SA
Member 8064588 at 1-Feb-13 0:44am
   
I am a new member and my English is not good. If there is any misunderstand, I sorry about this. In my question, I mean that I need someone help me find a solution for my problem. Thanks again!
Sergey Alexandrovich Kryukov at 1-Feb-13 0:56am
   
You English is good enough for me to understand you well. Please imagine, how this help can be done. This is only a Questions & Answers forum, so you need to ask something which can be answered in a more or less short post. It does not mean someone will do some big job for your. We share knowledge and experience, give advice, etc., but here... there are not any special "professional secrets", subliminal APIs or something very wise to share. This is just: design, prototype, write code, debug, etc. Design data structures, types responsible for parts of the task, algorithms....
 
Probably you should simply start solving the problem and ask more specific question when you stuck...
—SA
Member 8064588 at 1-Feb-13 1:35am
   
Thanks for your advice! I will try to do and come back with specific task.
zaphoed at 1-Feb-13 14:50pm
   
although it isn't really what you're probably looking for, this article may serve as a starting point:
 
http://www.codeproject.com/Questions/418859/How-to-find-number-of-words-sentences-paragraphs-m
 
adding another level of indirection to one of the provided solutions may be close to what you want
Member 8064588 at 20-Feb-13 2:42am
   
thank you! That article has many good ideals. I do it by my way. My problem is really the same with a normal word count problem. But there are two levels one for word and one for phrase or sentence.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 169
1 Zoltán Zörgő 139
2 George Jonsson 135
3 PIEBALDconsult 130
4 OriginalGriff 120
0 OriginalGriff 6,165
1 DamithSL 4,658
2 Maciej Los 4,107
3 Kornfeld Eliyahu Peter 3,649
4 Sergey Alexandrovich Kryukov 3,382


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100