CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I need a program that...:
Find the abbreviations from a given text

 



phoenie
New User

Mar 22, 2008, 9:52 AM

Post #1 of 5 (2758 views)
Find the abbreviations from a given text Can't Post

hi,i am a newbie in Perl.

How can i find the abbreviations from a given text.

For example, Dr. Alex is a smart doctor. Now he is at USA.

So the output willbe Dr. and USA


KevinR
Veteran


Mar 22, 2008, 2:55 PM

Post #2 of 5 (2755 views)
Re: [phoenie] Find the abbreviations from a given text [In reply to] Can't Post

You would have to predefine all the abbreviations and then search for them. Or you could try using a regexp and search for patterns. Something like:

/[MD]r\./

That could find Mr. and Dr. for example. Of course that is a super simple example just to get you started.
-------------------------------------------------


phoenie
New User

Mar 22, 2008, 10:15 PM

Post #3 of 5 (2754 views)
Re: [KevinR] Find the abbreviations from a given text [In reply to] Can't Post

Thank you for the the reply.

that means Perl does not has any library to detect the abbreviation?

If using the regexp, that means we only can constraint on the certain patterns?


KevinR
Veteran


Mar 23, 2008, 12:00 AM

Post #4 of 5 (2752 views)
Re: [phoenie] Find the abbreviations from a given text [In reply to] Can't Post

All I can suggest is you search CPAN or ask on other forums if anyone knows of a module or modules that can do this. I don't know of any myself.
-------------------------------------------------


phoenie
New User

Mar 23, 2008, 10:55 AM

Post #5 of 5 (2746 views)
Re: [KevinR] Find the abbreviations from a given text [In reply to] Can't Post

anyway, thank you foryoue helping hand.Wink

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives