Bug Stomp

Upgrades and changes sometimes have unpredictable results, so post your bugs and glitches in here and I'll get out my trusty wrench and get to fixin'!

Posts 8,345 - 8,356 of 8,662

5 years ago #8345
A note re: plugins: if you copy/paste entries into the plugin values box, be sure you strip out any invisible carriage returns or unintended "smart quote" characters, since they can interfere with the selection of keyphrases using the plugin. Spent a good hour last night hammering away in debug trying to figure out why my obviously suitable, maximum rated keyphrase was not being considered. D'oh. ;-)

5 years ago #8346
Funny you should bring that up... because I ran into a similar problem earlier today and I'm not quite certain what you mean by invisible carriage returns...


The keyprhase I have is this:


I am (studying|learning|training) to (be a|be an|become a|become an) * (p:Job-catch),
I am (trying|attempting) to get a job as (a|an) * (p:Job-catch),
I (work|am working) as (a|an) * (p:Job-catch),
I am (studying|learning|training) (so I can be|so I can become) * (p:Job-catch)


Response 'A (key4) eh? Do you think you'll like doing that?'


Now the keyphrase works fine. Catching things like "I'm studying to be a rich and famous actor." And it will return, "A actor, eh? Do you think you'll enjoy doing that?"

The problem is, it will also catch things like: "I'm studying to be a walrus." or "I'm studying to be a block of wood"

Returning with "A eh, do you think you'll enjoy doing that?"

As a brute force temporary fix I added the kp:

I am (studying|learning|training) to (be a|be an|become a|become an) (*),
I am (trying|attempting) to get a job as (a|an) (*),
I (work|am working) as (a|an) (*),
I am (studying|learning|training) (so I can be|so I can become) (*)

which just goes to xnone. But it's a really inelegant solution. And I'd like to know why the original kp catches things that aren't in the plugin.

5 years ago #8347
Hmm.

"I'm studying to be a rich and famous actor" matches

I am - I'm
1studying|learning|training) - studying
to - to
2be a|be an|become a|become an) - be a
3:* - rich and famous
4p:Job-catch) - actor

It sounds like "I'm studying to be a walrus" is maybe hitting

I am - I'm
1studying|learning|training) - studying
to - to
2be a|be an|become a|become an) - be a
3:* - walrus
4p:Job-catch) -

which would give you a blank key4.

What about

I am (studying|learning|training) to (be a|be an|become a|become an) (*|) (p:Job-catch:4)

That makes the input between "be a" and the job plugin optional, and adding the :4 to the plugin key means your response (key4) will always match that key in the keyphrase, whether or not there is anything between it and the verb phrase.





5 years ago #8348
Oh, ha ha...colon parenthesis, not sad face. This, but without the spaces:

1: (
2: (
3: (
4: (

Let's see if that looks better...

5 years ago #8349
Oh, and invisible carriage returns: sometimes when I'm making a plugin I gather words and phrases from around the web and paste them into a Google doc or notepad, and then paste the whole list into the plugin when I'm done, rather than typing each item separately into the plugin. If there are carriage returns in the document or "curly" quotes or apostrophes and you paste them into the plugin they'll interfere with the ability of the language processor to evaluate and select the list items.

5 years ago #8350
Hrm, sadly that didn't work. It seems (*|) can't be substituted for *, or at least in this case it broke the kp somehow. (Couldn't even find an attempt to process it in the debugger.)

I do appreciate you taking the time to look this over though. For now I'll just use the alternate kp to redirect nonsense and add more specific possibilities as the need arises.

Thank you!

5 years ago #8351
Try leaving the * as is but keeping the :4 in the plugin key.

5 years ago #8352
I did actually try that. Still nada.

5 years ago #8353
This doesn't help you Nathan S, but you don't need to have "an" in your keyphrases, the site changes all "an"'s to just "a" before matching. Just saves a bit of time and effort. You can also use (det) instead, which could match "_an_ engineer" "_the_ president" "_a_ pilot", etc.

5 years ago #8354
See I THOUGHT that from reading the book of AI lol. But for some reason I've been batting 0 with this kp. It wants specific variations for a and an to work and won't bounce back the appropriate determiner in the response.

It's crazy.

5 years ago #8355
Hmm, even triggers without the *. That's quite the conundrum you've found yourself... In my testing this seems to work though, even for weird stuff. (i did edit it a bit)

kp:
I am (studying|learning|training) to (be|become) a (p:Job-catch:1),
I am (trying|attempting) to (get a job as|become) a (p:Job-catch:1),
I (work|am working) as a (p:Job-catch:1),
I am (studying|learning|training) (so I can|to) (be|become) a (p:Job-catch:1)

response:
Why a (key1) (postkey)?

5 years ago #8356
Could just be that the websites health isn't too great these days. Seems slow, with a lot of time-outs. I find I have to hit the button to submit new kp's more than once before it goes.


Posts 8,345 - 8,356 of 8,662

» More new posts: Doghead's Cosmic Bar