Text Processing

ss7thirty

Well-known member
Joined
Jun 14, 2005
Messages
455
Location
New Jersey, US
Programming Experience
5-10
I am working with a large stream of text. Each line of this text is going to represent a command. Each string sent will be of the same size. Lines will be added at a rate of about 2-3 per iteration (per string sent). This means means that 2-3 lines will be missing from the front of the previous string and the next string will have 2-3 new lines and these will have to be added to the queue for processing. Therefore, I need a good algorithm or way to do this. Each command is not necessarily unique and this make the process more difficult because it is not just a single comparison. This text will most likely be coming from the clipboard (My.Computer.Clipboard.GetText).

To Better what I mean here is some "sample" data:

VB.NET:
/* Sample of first stream of commands to be parsed */
Player1 Leaves Room1
Player2 Enters Room2
Player3 Takes 3 Steps Forward
Player4 Runs 4 Miles
...
Player 99 Leaves Room99

/* Sample of second stream of commands to be parsed */
Player 4 Runs 4 Miles
...
Player 99 Leaves Room99
Player 100 Goes 100
Player 101 Enters Room6
Player 102 Enters Room 12

Therefore what I would want is to be able to add all 99 or 100 commands in the first iteration and then with second stream I should only add the new ones. Some of these will be removed from the queue by the time it gets back to queue to add them and all of these commands will not be unique so what do I have to do to add only the new ones?
 
Back
Top