| View previous topic :: View next topic |
| Author |
Message |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Mon Jan 12, 2009 7:51 pm Post subject: |
|
|
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  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Tue Jan 13, 2009 12:46 am Post subject: |
|
|
| Quote: | # DISPLAY OPTION 8
# you get two variable to use here:
|
I only see one variable "%%site%%".
 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Jan 13, 2009 7:30 am Post subject: |
|
|
| holycrap wrote: | | Quote: | # DISPLAY OPTION 8
# you get two variable to use here:
|
I only see one variable "%%site%%".
 |
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 |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Wed Jan 14, 2009 9:58 am Post subject: |
|
|
Oh... ok, I didn't know. It said two and I saw only one, just thought I might have missed something. My bad.
 |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Fri Jan 16, 2009 9:58 am Post subject: |
|
|
Just curious why this file was created at the root directory "ig.debug.txt"?
 |
|
| Back to top |
|
 |
incith Master

Joined: 23 Apr 2005 Posts: 275 Location: Canada
|
Posted: Fri Jan 16, 2009 1:42 pm Post subject: |
|
|
Standard debug code of course.
Remove:
| Code: | # DEBUG DEBUG
set junk [open "ig-debug.txt" w]
puts $junk $html
close $junk |
_________________ ; Answer a few unanswered posts! |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Jan 16, 2009 7:51 pm Post subject: |
|
|
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  | 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...  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Wed Jan 21, 2009 11:02 am Post subject: |
|
|
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.
 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Thu Jan 22, 2009 7:31 pm Post subject: |
|
|
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..  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
holycrap Op
Joined: 21 Jan 2008 Posts: 152
|
Posted: Fri Feb 06, 2009 11:31 am Post subject: |
|
|
The display option is not working.
Tcl error [incith::dictionary::public_message]: can't read "state(http)": no such variable
 |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Fri Feb 06, 2009 5:29 pm Post subject: |
|
|
| holycrap wrote: | The display option is not working.
Tcl error [incith::dictionary::public_message]: can't read "state(http)": no such variable
 |
Their website appears to be down causing the issue...  _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
digs Voice
Joined: 13 Mar 2008 Posts: 12
|
Posted: Sat Oct 10, 2009 12:18 am Post subject: |
|
|
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 |
|
 |
|