Labeling double words in a sentence

Comments

4 comments

  • Official comment
    Sabeel

    Hi Tugrul,

    Thank you for posting this question. In order to understand the problem statement better, I would like to know if you mean to say that, if there are consecutive words, the next repetitive word should be replaced with a * character?

     

    Comment actions Permalink
  • Tugrul Bayrak

    Hi,

    That's exactly as you understand, I guess I should have made it more clear. So are there any suggestions? Thanks

    0
    Comment actions Permalink
  • Sabeel

    Hi Tugrul,

    Thanks for the clarifications.

    You can use REPLACEALL function to replace all the duplicate words with an output you desire.

    Refer more about REPLACEALL:https://documentation.datameer.com/documentation/display/DASSB70/REPLACEALL

    Expression : REPLACEALL(#Sheet1!A;"\\b(\\w+)(?:\\s+\\1\\b)+";"$1*")

    Regular expression to find the duplicate words in a sentence "\\b(\\w+)(?:\\s+\\1\\b)+".

    Here is an Example:

    Please let me know if this works for you.

    Regards,

    Sabeel

    0
    Comment actions Permalink
  • Tugrul Bayrak

    It works, thank you so much

    0
    Comment actions Permalink

Please sign in to leave a comment.