Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Replace numbers in text document

happy_neidhappy_neid Member Posts: 10 Contributor I
edited November 2018 in Help

Hi everybody.

I have some text processing to do, and i am trying to replace all numbers with the word NUMBER. I used operator replace token, but i only sucsseded to replace each figure with that word, not the whole number. For example, 67 is replaced with NUMBERNUMBER, and i want it to ne NUMBER. How to do that?


Answers

  • IngoRMIngoRM Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, Community Manager, RMResearcher, Member, University Professor Posts: 1,751 RM Founder

    Hi,

     

    You could transform your document into an Example Set first and use the regular "Replace" operator.  Here you can specify a regular expression like "\d+" (without quotes) and replace this with NUMBER.  Then you transform this back into a document.  This should do the trick...

     

    Hope that helps,

    Ingo

Sign In or Register to comment.