text processing.

May 6, 2011 at 4:19pm
Hi,

I want to write an''ideal''class for general text processing.
What it has facilities should it?
How do I write this ?
May 6, 2011 at 4:48pm
It's called the standard library and it is already ideal for text processing.
May 6, 2011 at 4:52pm
It's called the standard library and it is already ideal for text processing.


8^) rofl - we are on fire tonight!

for general text processing, I personally wouldn't even use C++ - it's like trying to patch a hole in your shirt with a ten-ton hammer

if you don't have a ****-on for C++ for this particular project, consider Ruby, python, or even UNIX command-line with pipes or perl and save yourself a ton of time
May 6, 2011 at 8:41pm

Why does not C + + for this job?
May 6, 2011 at 8:55pm
Because Perl or Python (I don't know enough Ruby) are much better suited for manipulating text. I would hardly call the C++ standard library "ideal" for text processing.
May 6, 2011 at 9:07pm
What is the exact text processing ?
May 6, 2011 at 9:17pm
Text processing means doing any kind of work in which you need to manipulate text. You might be looking for a specific word or regular expression, replacing something, formatting or whatever.
May 6, 2011 at 9:23pm
If you are interested you can check out this thread where the OP is trying to do some text processing with a 130+ line C++ program and still not succeeding, but one can pull it off using a one-liner UNIX command (or, technically, a 4-liner shell):

http://www.cplusplus.com/forum/beginner/42370/

Of course, I don't recommend doing it this way if the text processing required is more complex - in that case, I would do perl, python, or Ruby for easier maintenance - using any of these tools, it's much easier than in C++

PS: to do what he wants, you don't really need 130 lines in C++, you may be able to pull it off in 30-40 lines in C++ if you are good (I'm guesstimating atm - been up-all-night - it's 5:30AM here) - in any case, it's much easier using the other tools
Last edited on May 6, 2011 at 9:27pm
May 7, 2011 at 6:39pm
Thank you for your responses.
May 7, 2011 at 7:29pm
If you insist to do it by C++, you could consider about the regular expression of boost
I think that current standard(c++03) is not "ideal" for complex text processing
May 7, 2011 at 10:32pm
stereoMatching:

If you insist to do it by C++, you could consider about the regular expression of boost
I think that current standard(c++03) is not "ideal" for complex text processing


thanks..
Last edited on May 7, 2011 at 10:33pm
Topic archived. No new replies allowed.