stonyy1 has asked for the wisdom of the Perl Monks concerning the following question:

I am working on a project where I would like to have my script find and use synonyms and antonyms for regular English words. Does anyone know if there is a perl module or some such equivalently easy-to-use method for finding synonyms and antonyms?

Replies are listed 'Best First'.
Re: synonyms and antonyms
by kvale (Monsignor) on Aug 31, 2005 at 20:00 UTC
    WordNet has a synonym feature and can be accessed via the WordNet module.

    -Mark

Re: synonyms and antonyms
by halley (Prior) on Aug 31, 2005 at 19:38 UTC
    WWW::Mechanize and http://www.thesaurus.com/

    English is a hard language just to conjugate, nevermind to find synonyms and opposites.

    Body-language exists one unfeeling palaver solely to have sexual relations, to infringe locate apposites and antipodeans.

    --
    [ e d @ h a l l e y . c c ]

      Indeed. I have a thesarus that tells in the introduction the story of three gentlemen learning English as a second language who would:
      read English books and meet together at one another's houses to talk English.

      On this evening Mr. X was entertaining his friends. The conversation started like this:

      "Good evening, Mr. X. I have the pleasure to ask after your heallth, and the health of your wife and children."

      "Thank you, Mr. Y. I am well, and so is my wife, but it is my great sorrow that I have no children. My wife is unbearable."

      "That is a great tragedy, Mr. X. You will forgive me what I say now, but you know we have the obligation to correct one another. I understand that the proper English work for Mrs. X's unfortunate condition is, she is impregnable."

      At this point Mr. Z spoke up. "And you will forgive me, Mr. Y, but I must tell you that the proper English work for Mrs. X's most unfortunate condition is that she is inconceivable."

Re: synonyms and antonyms
by radiantmatrix (Parson) on Aug 31, 2005 at 19:58 UTC

    Well, you could use a Project Gutenberg free thesaurus (just a text file), and port it to a database (something like DBD::SQLite2 would be acceptable). Then just build an app that queries the database and returns the results.

    Yes, it's quite a bit of work; however, once you have done it you will have an exceptionally flexible base on which to build all sorts of thesaurus-related tools and modules.

    <-radiant.matrix->
    Larry Wall is Yoda: there is no try{} (ok, except in Perl6; way to ruin a joke, Larry! ;P)
    The Code that can be seen is not the true Code
    "In any sufficiently large group of people, most are idiots" - Kaa's Law
Re: synonyms and antonyms
by spiritway (Vicar) on Sep 01, 2005 at 03:28 UTC