Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: Program tha...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 16 Topic 26174 of 27695
Post > Topic >>

Re: Program that makes a list of words.

by Richard Heathfield <rjh@[EMAIL PROTECTED] > May 13, 2008 at 07:38 AM

lundslaktare@[EMAIL PROTECTED]
 said:

> Maybe this is the wrong group, if so I would like to be pointed
> to a better group.

If you were writing such a program yourself in the C language, and there 
were some aspect of C that was puzzling you, this would be the right 
group. It seems, however, that you want to find an existing program that 
already meets your requirements, rather than write it yourself.

There's nothing wrong with that, but - as you suspected - this group isn't

intended to meet that need. There are many groups in the comp.sources 
hierarchy, however, and it may well be that one of those can supply your 
need.

If you /were/ planning to write such a program yourself, you would want to

start off by tackling the most difficult problems first. These are:

1) sorting out the logic behind punctuation. You want to treat

 ques
-tion

as one hit for question and one hit for the hyphen, which is clear enough 
and not too difficult. But what about "didn't"? Does the ' character count

as a separate hit? And what about "fo'c'sle"? (That's a single word, 
according to the dictionary.) These decisions aren't difficult to make, 
but they do have to be made. Once you've made the decisions, you would 
need to write a parser that can enact them.

2) storage. You appear to want your output to be sorted, so you'd need to 
think about a container that can regurgitate data in sorted order after 
processing. A binary search tree is the obvious choice, but a hash table 
might be faster if you didn't actually need the sorting. You also need to 
think about whether you want to be able to handle arbitrarily long words. 
If so, you'll need to handle the memory requirements yourself, using 
malloc.

Although it sounds like a simple enough program, you have introduced
enough 
complications to make it quite an interesting programming exercise for 
someone with a year or two of C experience.

If you change your mind and decide to write it yourself in C, we can 
certainly help you with it. Otherwise, good luck in comp.sources.* (and 
you're going to need it, partly because I believe those groups aren't very

popular with source providers, and partly because your requirements are 
sufficiently different from a normal concordance program to make it quite 
unlikely that someone can meet your needs without actually writing a 
program just for you).

HTH. HAND.

-- 
Richard Heathfield <http://www.cpax.org.uk>
Email: -http://www.
+rjh@[EMAIL PROTECTED]
 users: <http://www.cpax.org.uk/prg/writings/googly.php>
"Usenet is a strange place" - dmr 29 July 1999
 




 16 Posts in Topic:
Program that makes a list of words.
lundslaktare@[EMAIL PROTE  2008-05-12 23:32:01 
Re: Program that makes a list of words.
Chris McDonald <chris@  2008-05-13 06:43:04 
Re: Program that makes a list of words.
lundslaktare@[EMAIL PROTE  2008-05-13 00:12:08 
Re: Program that makes a list of words.
Chris McDonald <chris@  2008-05-13 07:24:44 
Re: Program that makes a list of words.
Richard Heathfield <rj  2008-05-13 07:38:04 
Re: Program that makes a list of words.
lundslaktare@[EMAIL PROTE  2008-05-13 01:22:26 
Re: Program that makes a list of words.
Richard Heathfield <rj  2008-05-13 08:52:13 
Re: Program that makes a list of words.
viza <tom.viza@[EMAIL   2008-05-13 04:48:53 
Re: Program that makes a list of words.
"Joachim Schmitz&quo  2008-05-13 13:55:22 
Re: Program that makes a list of words.
pete <pfiland@[EMAIL P  2008-05-13 07:59:33 
Re: Program that makes a list of words.
Richard Heathfield <rj  2008-05-13 12:22:16 
Re: Program that makes a list of words.
Keith Thompson <kst-u@  2008-05-13 11:14:39 
Re: Program that makes a list of words.
CBFalconer <cbfalconer  2008-05-13 10:21:13 
Re: Program that makes a list of words.
viza <tom.viza@[EMAIL   2008-05-13 11:30:02 
Re: Program that makes a list of words.
viza <tom.viza@[EMAIL   2008-05-13 11:37:06 
Re: Program that makes a list of words.
CBFalconer <cbfalconer  2008-05-13 16:28:27 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:41:59 CDT 2008.