Home > Archive > PERL Miscellaneous > June 2005 > Text to keyword parsing script?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Text to keyword parsing script?
|
|
| abracad_1999@yahoo.com 2005-06-09, 3:57 am |
| Before I write one, are there any free scripts out there that will take
a string of text and output a list of spearate keywords?
| |
| A. Sinan Unur 2005-06-09, 3:57 am |
| abracad_1999@yahoo.com wrote in news:1118278845.349984.31150
@g44g2000cwa.googlegroups.com:
> Before I write one, are there any free scripts out there that will take
> a string of text and output a list of spearate keywords?
Your specs are incomplete and hard to comprehend.
Please read the posting guidelines for this group to learn how you can
help yourself, and help others help you.
Sinan
--
A. Sinan Unur <1usa@llenroc.ude.invalid>
(reverse each component and remove .invalid for email address)
comp.lang.perl.misc guidelines on the WWW:
http://mail.augustmail.com/~tadmc/c...guidelines.html
| |
| Christopher Nehren 2005-06-09, 3:57 am |
| On 2005-06-09, abracad_1999@yahoo.com scribbled these
curious markings:
> Before I write one, are there any free scripts out there that will take
> a string of text and output a list of spearate keywords?
What's a keyword? A Perl keyword? A C keyword? You might get a better
response if you:
1. read the posting guidelines (not painful at all, and very
educational)
2. Specified what you meant by a keyword. I could show you code which
outputs all key words related to pre-denoministic Christianity, or
Celtic paganism, or $other_field_of_endeavour (easily configurable by
reading the keywords one per line from a file, hint hint) but I highly
doubt that that's what you want.
As an aside, you may be able to use the grep utility (available on any
self-respecting POSIX system, also available in a number of forms in the
Perl Power Tools (ppt) package; check your local CPAN archive) instead
of writing something from scratch. Of course, I don't know if this will
work for you, because you haven't mentioned where the text is or what
the keywords are.
Best Regards,
Christopher Nehren
--
I abhor a system designed for the "user", if that word is a coded
pejorative meaning "stupid and unsophisticated". -- Ken Thompson
If you ask the wrong people questions, you get "Joel on Software".
Unix is user friendly. However, it isn't idiot friendly.
| |
| Josef Moellers 2005-06-09, 8:57 am |
| abracad_1999@yahoo.com wrote:
> Before I write one, are there any free scripts out there that will take=
> a string of text and output a list of spearate keywords?
>=20
If all you want is to split (hinthint) a line into separate words, look=20
at split and perlre, e.g.
@words =3D split(/\W+/, $line);
print join("\n", @words);
HTH,
--=20
Josef M=F6llers (Pinguinpfleger bei FSC)
If failure had no penalty success would not be a prize
-- T. Pratchett
|
|
|
|
|