egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dictionary? speechles if you don' mind? :D [SOLVED]
Goto page Previous  1, 2, 3
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Mon Jan 12, 2009 7:51 pm    Post subject: Reply with quote

The script will now redirect itself automatically if wordnetweb ever points elsewhere making having to change the config webdict variable hopefully no longer necessary.

Incith:Dictionary v1.7 ... Have a fun Razz
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Tue Jan 13, 2009 12:46 am    Post subject: Reply with quote

Quote:
# DISPLAY OPTION 8
# you get two variable to use here:


I only see one variable "%%site%%".

Very Happy
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Tue Jan 13, 2009 7:30 am    Post subject: Reply with quote

holycrap wrote:
Quote:
# DISPLAY OPTION 8
# you get two variable to use here:


I only see one variable "%%site%%".

Very Happy


Yeah, was going to be two variables there. But afterwards, it was like why? They would both be the same thing. That is the display option for redirecting loop errors where the query redirects back to itself.
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Wed Jan 14, 2009 9:58 am    Post subject: Reply with quote

Oh... ok, I didn't know. It said two and I saw only one, just thought I might have missed something. My bad.

Very Happy
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Fri Jan 16, 2009 9:58 am    Post subject: Reply with quote

Just curious why this file was created at the root directory "ig.debug.txt"?

Very Happy
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Fri Jan 16, 2009 1:42 pm    Post subject: Reply with quote

Standard debug code of course. Razz
Remove:
Code:
      # DEBUG DEBUG                   
      set junk [open "ig-debug.txt" w]
      puts $junk $html
      close $junk

_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Jan 16, 2009 7:51 pm    Post subject: Reply with quote

lmao.. exactly. The purpose of that is mainly for people experienced with regexp to correct the script themselves. It contains a pure 'html' dump of the site exactly as the bot sees it before it attempts parsing, but isn't really necessary anymore so has been removed.

Also refined the matching quite a bit to use patterns more easily matched without being over greedy. This leaves the ability to use the input methods below:
Quote:
!dict egg - default amount of results for each type
!dict --noun egg - default amount of noun results for egg
!dict --noun3 egg - the 3rd noun result for egg
!dict --noun1-3 egg - the 1st thru 3rd noun result for egg
!dict --all egg - every result for egg that appears for any type
!dict --all5-all egg - the 5th to last results for egg that appears for any type
!dict --nounall-3 egg - the start thru 3rd noun result for egg
!dict --noun3-all egg - the 3rd thru last noun result for egg

Where noun above can also be verb, adj, adv, or all (as well as any combination you place within the types config variable). The above also assumes the switchorder is set to 0 (type/range), and switcher is set to "--". The purpose of the typeline variable is to match the webpage as it calls them. This order must be used when configuring your types variable. You can use any number of abbreviations within types.

The script now correctly returns over-greedy matches back as user input making it much more intelligent than previous versions. Try some weird input and try to break the parser to see if you can. Note: a broken parser will eat part of your input, as the previous 'hot tub' returning results for only 'tub' was doing. Try it out and let me know what you think.
Incith:Dictionary v1.8 .. Have a fun Razz
Quote:
<speechles> !dict --a2-all egg
<sp33chy> <( #test )> "--a2-all egg" :: types = a; range = 2-all; input = egg; start = 2; end = 7; typeline = all
<speechles> !dict egg
<sp33chy> <( #test )> "egg" :: types = ; range = ; input = egg; start = 1; end = 1; typeline = all
<speechles> !dict --adj19-all hot tub
<sp33chy> <( #test )> "--adj19-all hot tub" :: types = adj; range = 19-all; input = hot tub; start = 19; end = 24; typeline = adjective
<speechles> !dict hot tub
<sp33chy> <( #test )> "--hot tub" :: types = ; range = hot; input = hot tub; start = 1; end = 1; typeline = all

If you have problems with editing the types and having the script recognize them correctly enabling debug will show output similar to above. The important parts are input, start, end and typeline as these parts the script is manipulating. The first two, types and range are generated by the user... Wink
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Wed Jan 21, 2009 11:02 am    Post subject: Reply with quote

Just another crazy request. Would it be possible to implement this to the script? Able to see in DCC what people are defining in private message with the bot? I know, incith's weather will show in DCC when people use the command in /msg bot.

Thanks.

Very Happy
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Thu Jan 22, 2009 7:31 pm    Post subject: Reply with quote

Then of course let's get crazy. Without further adieu, welcome to insanity.
Incith:Dictionary v1.9 .. Insane isn't it? Well, it's however you configure it if you even care to use it, below is a simple example.
Quote:
... in channel #testing ...
<speechles>!dict --nall blue
... in partyline/log debug ...
<(speechles@#testing)> "!dict --nall egg" --> egg (noun 1-5)
... in private message to bot ...
<speechles> !dict --v1-3 egg
... in partyline/log debug ...
<(speechles@speechles)> "!dict --v1-3 egg" --> egg (verb 1-3)

This is also fully configureable, you decide what is in your debug line yourself. At your whim are literally a ton of (well, 10.. heh) variables to use to build it. Have a fun.. Razz
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Fri Feb 06, 2009 11:31 am    Post subject: Reply with quote

The display option is not working.

Tcl error [incith::dictionary::public_message]: can't read "state(http)": no such variable

Sad
Back to top
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Fri Feb 06, 2009 5:29 pm    Post subject: Reply with quote

holycrap wrote:
The display option is not working.

Tcl error [incith::dictionary::public_message]: can't read "state(http)": no such variable

Sad

Their website appears to be down causing the issue... Sad
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
digs
Voice


Joined: 13 Mar 2008
Posts: 12

PostPosted: Sat Oct 10, 2009 12:18 am    Post subject: Reply with quote

Is there anyone else that is having this

"Time-out error occured when trying to query 'http://wordnetweb.princeton.edu/perl/webwn?s=worrywart'.

It works 2 out of every 5 times. Any thoughts?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page Previous  1, 2, 3
Page 3 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber