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  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Wed Dec 31, 2008 4:47 pm    Post subject: Reply with quote

This keeps getting better and better. Shocked

I have another simple request.

Since the output is like this:

<user>!dict egg
<bot> [1/3] (n) egg (animal reproductive body consisting of an ovum or embryo together with nutritive and protective envelopes; especially the thin-shelled reproductive body laid by e.g. female birds)

Instead of having the syntax <n,v,adj,adv,all><range> <word>
Why not set it to like this <range><n,v,adj,adv,all> <word>

<user>!dict 2n egg
or
<user>!dict 2-3n egg

Instead of:
<user>!dict n2 egg

Seems more logical to understand.

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: Wed Dec 31, 2008 8:40 pm    Post subject: Reply with quote

@holycrap:
Code:
    # set this to correspond to the order you will allow switches
    # and their ranges.
    # 0 - <type><range>
    # 1 - <range><type>
    #
    # <type> being noun/verb/adverb/adjective/etc
    # <range> being <start>-<end> indexing.
    # --
    variable switchorder 1

It can now be either way, illogical or logical, you decide Smile
/me includes the kitchen sink.

incith wrote:
I learned to stop saying that ages ago my friend. It will never be perfect. It will always break. Someone will want something, so on and so forth.

P.S. Thank you for attaching my name to yet another script Razz

Haw, lesson learned. The moment everything except the kitchen sink is included, people want the kitchen sink.. lmao ;D
Your name is attached because a good majority of the code was written by yourself. It is used in the hopes it doesn't offend you, just shows others that your scripts can be adapted to fit anything. Smile

Incith:Dictionary v1.4 .. 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: Thu Jan 01, 2009 3:18 pm    Post subject: Reply with quote

Just wanna report this:

The script is not searching for a two-word meaning.

Exe:
<user> !dict hay fever
<bot> (n) fever, febrility, febricity, pyrexia, feverishness (a rise in the temperature of the body; frequently a symptom of infection)

Word like "theme park" won't work either.

but

<user> !dict all hay fever
<bot> (n) hay fever, pollinosis (a seasonal rhinitis resulting from an allergic reaction to pollen)

I think the script is omitting the first word thinking it's the 'switch or v/n..etc'

Thanks for looking into this.

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 02, 2009 3:03 am    Post subject: Reply with quote

speechles wrote:
It is used in the hopes it doesn't offend you, just shows others that your scripts can be adapted to fit anything. Smile

Yeah, this is the intention. I will release incith:layout sooner or later to especially try and help make this true for novice coders especially. Of course, they are html-fetching inclined scripts.

holycrap wrote:
Just wanna report this:

Rofl.
_________________
; 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 02, 2009 10:38 pm    Post subject: Reply with quote

holycrap wrote:
Just wanna report this:

The script is not searching for a two-word meaning.

Exe:
<user> !dict hay fever
<bot> (n) fever, febrility, febricity, pyrexia, feverishness (a rise in the temperature of the body; frequently a symptom of infection)

Word like "theme park" won't work either.

but

<user> !dict all hay fever
<bot> (n) hay fever, pollinosis (a seasonal rhinitis resulting from an allergic reaction to pollen)

I think the script is omitting the first word thinking it's the 'switch or v/n..etc'

Thanks for looking into this.

Very Happy

Solved. The problem was when using a switch of null, there was over greedy matching going on with those regexp's. When the switch triggers, it then attempts to scan for subsets. It was assumed if the switch matched, a subset would be found within. The problem is a null switch always matches, so if a subset match isn't found the switch should be applied back onto the front of the users input. Now it does just that.

The elaborate configuration options left open to the user create this type of problem, because I don't want to break it for people wanting a switch. Yet I want the script capable enough for those not wanting a switch having the script instead use intelligence to detect when to use it and when not to. Let me know how this version works out for you..... Wink

Incith:Dictionary v1.5
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Sat Jan 03, 2009 12:15 am    Post subject: Reply with quote

You are super duper kewl, speechles! Cool

This piece of work is so kick ass and useful at the same time. And thanks for making everything easy to understand in the configurations.

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: Sat Jan 03, 2009 2:08 pm    Post subject: Reply with quote

Well, seems I forgot one tiny detail which looks kinda neat spammed onto irc with the definitions. So here we go again, making this even better.
Code:
    ## MAIN DISPLAY OPTION
    # You get five variables to use here:
    # %%type%% - The type of word defined, noun, verb, etc..
    # %%attrib%% - The lexical relation to the word, better ;)
    # %%num%% - The count of definitions for each type.
    # %%total%% - The total count of definitions for each type.
    # %%def%% - The definition.. ah ;)
    #
    # You can use these however you like, put color etc go nuts ;P
    # --
    variable display "\002%%attrib%%\002 (%%num%%/%%total%%) %%def%%"

Along with type, you now have attributes which contains the lexical information about the word. You don't need to use %%type%% if your using %%attrib%% or you can if you want to. An example is below:
Quote:
<speechles> !dict --nall red
<sp33chy> Noun attribute (1/4) (n) red, redness (red color or pigment; the chromatic color resembling the hue of blood)
<sp33chy> Noun object (2/4) (n) Red, Red River (a tributary of the Mississippi River that flows eastward from Texas along the southern boundary of Oklahoma and through Louisiana)
<sp33chy> Noun person (3/4) (n) Bolshevik, Marxist, red, bolshie, bolshy (emotionally charged terms used to refer to extreme radicals or revolutionaries)
<sp33chy> Noun possession (4/4) (n) loss, red ink, red (the amount by which the cost of a business exceeds its revenue) "the company operated at a loss last year"; "the company operated in the red last year"


Incith:Dictionary v1.6
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Sat Jan 03, 2009 4:06 pm    Post subject: Reply with quote

speechles wrote:
Well, seems I forgot one tiny detail which looks kinda neat spammed onto irc with the definitions. So here we go again, making this even better.
Code:
    ## MAIN DISPLAY OPTION
    # You get five variables to use here:
    # %%type%% - The type of word defined, noun, verb, etc..
    # %%attrib%% - The lexical relation to the word, better ;)
    # %%num%% - The count of definitions for each type.
    # %%total%% - The total count of definitions for each type.
    # %%def%% - The definition.. ah ;)
    #
    # You can use these however you like, put color etc go nuts ;P
    # --
    variable display "\002%%attrib%%\002 (%%num%%/%%total%%) %%def%%"


Our village demands tribute! Razz Why 2 %'s (no milk jokes) ?
_________________
; 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: Sun Jan 04, 2009 1:14 pm    Post subject: Reply with quote

incith wrote:
Our village demands tribute! Razz Why 2 %'s (no milk jokes) ?

I dunno, I've always thought double-use on start and end mainly so it wouldn't match anything else potentially. I just landed on % for the character to represent replacement for no reason. What is better to use??? This can be fixed!!!... Very Happy
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
incith
Master


Joined: 23 Apr 2005
Posts: 275
Location: Canada

PostPosted: Sun Jan 04, 2009 1:29 pm    Post subject: Reply with quote

Oh, well, this is how I've been doing it in :weather is all, with %w0-9% and etc. I figured that's where the idea came from Razz So I was just wondering why you had decided to use 2 %'s, but it's all good, just being curious. Smile
_________________
; Answer a few unanswered posts!
Back to top
View user's profile Send private message
achilles1900
Voice


Joined: 21 Apr 2008
Posts: 30

PostPosted: Wed Jan 07, 2009 1:03 pm    Post subject: SERVER Down Reply with quote

Hey guys

thanks Speechless, you and Incinth are amazin'!

Loaded the script but couldnt get any results, checked the site, got this message
WordNet Service Unavailable
The WordNet service is being moved to a new server. We expect the service to be back by January 8. Please check back then.


Anyone else confirm?

Thanks,
Achilles
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: Wed Jan 07, 2009 9:08 pm    Post subject: Re: SERVER Down Reply with quote

Yep, I get the exact same message you have. Seems they are presently in flux while undergoing some type of migration/maintenance so they've parked the domain with some static html Sad...
But.. the 8th is tomorrow so hopefully once their migration/maintenance is finished the script will again work without any modification.. *crosses fingers* Smile
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
holycrap
Op


Joined: 21 Jan 2008
Posts: 152

PostPosted: Mon Jan 12, 2009 12:39 am    Post subject: Reply with quote

It's working now.

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: Mon Jan 12, 2009 7:27 am    Post subject: Reply with quote

holycrap wrote:
It's working now.

Very Happy

I found I had to change the part below to get it to work.
Code:
    # set this to the website we are going to get our definitions from.
    # at the moment, only the site listed below is tested.
    # --
    set webdict "http://as200l.princeton.edu/perl/webwn\?"


Notice the new webdict url.. Wink
_________________
speechles' eggdrop tcl archive
Back to top
View user's profile Send private message
achilles1900
Voice


Joined: 21 Apr 2008
Posts: 30

PostPosted: Mon Jan 12, 2009 12:24 pm    Post subject: RE: Reply with quote

Hi guys,

I can also confirm that the site is up.

You need to make the URL changes as brother speechless directs, before it works.

Again thanks speechless and incinth, you guys are Gods! really looking forward to having some fun with this!

achilles
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  Next
Page 2 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