Jump to content


Define Multiple Words At Once


  • This topic is locked This topic is locked
5 replies to this topic

#1 Mastermind Z

Mastermind Z

    Member

Posted 05 March 2008 - 07:36 PM

Is there any Web app in which you can type in several words and it will define all of them?

Thanks,

(If not, I think I might just go and write a script for it)

Posted Image


#2 Jeremy

Jeremy

    Member

  • Posts:12,423
  • Joined:08-August 05
  • RS Status:Member

Posted 05 March 2008 - 08:26 PM

http://draget.net/to...ex.php?p=define

Open source too.  Only took about 10 minutes off googling for that.  :ph34r:
Posted Image
Former:
Global Moderator
Radio Manager
Head of Content
Events Team
Blogs Team
Zybez20 Host

#3 zebediah49

zebediah49

    Join EOP

Posted 06 March 2008 - 08:13 PM

That link doesn't work for me.

I don't know of one; I tried to write on, but its results were.. minimal.

Posted Image

www.eop-rs.com #clan-eop on SwiftIRC


#4 Mastermind Z

Mastermind Z

    Member

Posted 11 March 2008 - 06:14 PM

Thanks guys!

Zebediah - script (according the site) is (in Perl);

#!/usr/bin/perl -wT

#Copyright (c) Thomas Drage 2006, All rights reserved.

use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);
use LWP::Simple;

my $input = param('input');

print header;
print start_html('Definator');



@words = split(/\n/, $input);


$i = 1;

foreach my $word (@words) {

$word =~ s/\n//ig;

print $i . ". " .  $word . ": " .  &define($word) . "\n <br /> \n";

$i++;
}

sub define {
	 my $msg = shift;
lcfirst($msg);

	 # If there's a message to define...
	 if (length $msg > 0) {
		  my $src = LWP::Simple::get "http://dictionary.reference.com/search?q=$msg" or return "Could not access dictionary.com!";
		  $src =~ s/\n/ /g;

		  # Get the first definition.
		  if ($src =~ /<tr><td valign=\"top\" class=\"dn\">1\.<\/td><td valign=\"top\">(.*?)<\/td><\/tr><\/table>/i or $src =~ /<ol type=\"1\"><li>(.*?)<\/li>/i or $src =~ /<dl><dd>(.*?)<\/dd>/i or $src =~ /<table class=\"luna-Ent\"><tr><td valign=\"top\">(.*?)<span class=\"labset"/i) {
			   my $def = $1;

$def =~ s/<OL TYPE\=\"a\">//ig;
$def =~ s/<LI TYPE\=\"a\">//ig;
$def =~ s/<CITE>/ eg. /ig;
$def =~ s/<\/CITE>//ig;

$def =~ s/<.+>//ig;
$def =~ s/\n//ig;
$def =~ s/See Synonyms at .//ig;
$def =~ s/\&\#14[7-8]\;/\"/ig;

			   return 
					"$def";
		  }
		  else {
			   return "Could not find a definition to $msg!";
		  }
	 }
	 else {
		  return "Input Error !?!?!?!";
	 }
}


print "<br /><br /><input type=button value=\"Back\" onclick=\"history.go(-1)\" />";



print end_html;

Dunno if that could help at all.

Edited by Mastermind Z, 11 March 2008 - 06:15 PM.

Posted Image


#5 eff

eff

    Code Geass

  • Posts:476
  • Joined:04-April 07
  • RS Name:I Eff U Bak
  • RS Status:Member

Posted 11 March 2008 - 06:38 PM

Tabs in IE7 Always work

Posted Image

99 Range- 75 Defence - 90 Hitpoints - 70 Prayer

Looking for long term Armadyl Team for the summer

PM me on RSC


#6 Sxc

Sxc

    Gf +1...Gf...

Posted 16 March 2008 - 05:08 PM

View PostJeremy, on Mar 5 2008, 09:26 PM, said:

http://draget.net/to...ex.php?p=define

Open source too. Only took about 10 minutes off googling for that. :-)


Wow, that's very nice, I can't wait to use that lol.

Posted Image

Rar. Msg for MLG 2v2





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Font:
Arial | Calibri | Lucida Console | Verdana
 
Font Size:
9px | 10px | 11px | 12px | 10pt | 12pt
 
Color: