KDnuggets » Forums
Latest News



 FAQFAQ    SearchSearch    MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

How do I randomly generate a string with 1% of change?

 
Post new topic   Reply to topic    www.kdnuggets.com Forum Index -> Text Mining, Web Mining, Association Rules, and Other Algorithms
View previous topic :: View next topic  
Author Message
flame_copper



Joined: 06 Jan 2013
Posts: 1

PostPosted: Sun Jan 06, 2013 10:18 am    Post subject: How do I randomly generate a string with 1% of change? Reply with quote

I have this string,I am suppose to randomize them with addition,deletion,randomly changing a string how can I do it?

von Hippel-Lindau tumor suppressor
Back to top
View user's profile Send private message
phil123
Data Mining Guru


Joined: 05 Mar 2012
Posts: 50
Location: Canada

PostPosted: Fri Mar 08, 2013 2:45 pm    Post subject: Reply with quote

I don't know what programming language you are using. But it should not be complicated.

You need a random number generator.

Then you randomly choose an operation from : add, delete, etc.

If it is a delete, then you randomly choose a position for the delete.

If it is a add, then you randomly choose a character from the set of characters, etc.

That should be the basic idea.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    www.kdnuggets.com Forum Index -> Text Mining, Web Mining, Association Rules, and Other Algorithms All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KDnuggets » Forums

Copyright © 2012 KDnuggets.   Subscribe to KDnuggets News! Tweet Twitter | facebook Facebook | RSS RSS | About KDnuggets