Duplicate phrases



  • Hello,

    Is there a plugin that highlight duplicated phrases in a text file? I mean if the row will contain some different text and also words in duplicated order as on some other row(same sentence), then program will highlight this pieces of text.

    Thanks for reply



  • @Peter-X

    not sue if I understood correctly but what about

    • select the word(s) you want to be highlighted
    • right click on selection and use one of the
    • defined Style Tokens ?

    Cheers
    Claudia



  • Your solution just make the same thing like find the words via ctrl+F - find the same words, but I want to see all duplicated words/sentences.

    For better understanding of what I meant:

    Text file content:

    " I visited their hometown yesterday. My father waited till I come back. This text was written by me."
    " Everyone in this town has a garden. This text was written by me. My father waited till I come back"



  • So in your example you do have two sentences which appear twice.
    But what do you want to achieve? Having both sentences highlighted
    without user interaction? Having only one sentence colored?
    I assume you need to be more specific about this.

    Cheers
    Claudia



  • I want to see all same sentences highlighted - if there is 50 random sentences with some number of repeating, then I want to see all the sentences with same word order. Making it word after word is slow and unpractic.



  • What prevents you from selecting the sentence instead of a single word and do the styling?
    There are only 5 predefined styles that’s for sure but I don’t see that this can’t be achieved
    using this technique.

    Cheers
    Claudia



  • For example, if the previos sample text will have 50 variants (other same sentences) then I want to see immediately all duplicated sentences (not rows) which are used more then once in whole text file.



  • Npp doesn’t have it natively and I strongly believe that there isn’t a plugin available as well.

    Cheers
    Claudia



  • Okay, thanks, time to make it! :D No, really it would be really usefull if you can see all the dups sentences without user any action at start and know if there are some other existences of the same phrases. The ability to check dups in other text editors just check the whole rows but it’s bad because if you have some small diference at start of the line and then you have the duplicated sentence behind that, program will not notice that as dup and it doesn’t find anything.


Log in to reply