in reply to using Word dictionary in Perl
Anoter way might be to use LWP and search an online dictionary (like Lexical FreeNet) and parse the returned page. The url to get the antonyms for "big" on lexfn is http://www.lexfn.com/l/lexfn-cuff.cgi?sWord=big&tWord=&query=show&maxReach=2&Aant=on#!/usr/bin/perl -w # Uses use strict; use Win32::OLE; use Win32::OLE::Const; # Create MSWord object and load constants my $MSWord = Win32::OLE->new('Word.Application', 'Quit') or die "Could not load MS Word\n"; my $wd=Win32::OLE::Const->Load($MSWord); # Word and language to search for my $word="big"; my $language=$wd->{wdEnglishUS}; # Get antonyms from MSWord my $antonyms=$MSWord->SynonymInfo( {Word => $word, LanguageID => $language})->AntonymList; # Print them out... foreach (@{ $antonyms }) { print $_."\n" };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: using Word dictionary in Perl
by Anonymous Monk on Dec 02, 2000 at 23:01 UTC | |
by t0mas (Priest) on Dec 03, 2000 at 00:18 UTC | |
by Anonymous Monk on Dec 14, 2000 at 06:36 UTC | |
by t0mas (Priest) on Dec 14, 2000 at 12:33 UTC |