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 6,051 - 6,062 of 8,681

19 years ago #6051
? is handy in some numerical contexts, but in a linguistic setting when what we primarily need to match are typos, gerunds, conjugations and occasional punctuation, what would a single character wildcard actually be useful for? I imagine it works, but I have never found the need to try it.

19 years ago #6052
I tried using "?", with no success. Also, the "*" and "+" quantificators seem to behave both as "*".

Obviously, there is a syntactic problem about "." and "?". These quantificators are also punctuation symbols. In a true regex, you have to escape them in order to gain access to the punctuation symbol. Unescaped, they are read as quantificators. But in our keyphrases, a period is a period and so on. And you cannot enter punctuations.

19 years ago #6053
I'm used to using it to make a specific string optional, as in (his|her)? Meaning zero or more occurances of that group.

19 years ago #6054
Also, the "*" and "+" quantificators seem to behave both as "*".

Uh, no. * is a standard soft wildcard, and ([s]+) in a regex = any number of ss.

I think a lot of the problem here is that the regex system we're using is not a fully regex environment, it's a subset. The AIEngine processes all keyphrases using */(*) wildcards and local plugins as regexes, even without (re) - Basically it's in regex mode the whole time. When we specify "(re)" we get a sort of shell access to deeper regex functions, but it's not the whole regex environment - some functions are reserved by the AIEngine (including . I imagine.)

19 years ago #6055
I really wish that the link to the regex system was working. I suppose no one has an electronic copy of it lying about?

19 years ago #6056
I'm used to using it to make a specific string optional, as in (his|here)? Meaning zero or more occurances of that group.

Well, (his|here|) would do that, wouldn't it? "his", "here" or nothing...

19 years ago #6057
Sure, I'm just used to thinking differently, I guess. I had just thought of that, and came to post about it.

19 years ago #6058
>>Well, (his|her|) would do that, wouldn't it?
>>"his", "here" or nothing...
However, in both cases you run into the "key count" problem. I've burned repeatedly by doing things like
(do|) (you|) (verb)
only to discover that the Key# of (verb) is based on the number occupied keys, NOT its position in the KP. For example, "dance" is key3 of "do you dance" but key2 of "you dance."

M

19 years ago #6059
the "key count" problem

Yeah, it can take a bit of getting used to - the answer is to have hierarchies of keyphrases:

(verb)
you (verb)
do you (verb)

though you can usually concatenate them:

(verb), you (verb), do you (verb)

just remember not to have any |) or * before keys you need to access.

19 years ago #6060
Does the comma only work that way in regex, or is it a general or operator for the entire engine?

19 years ago #6061
unless you specifically escape it, it works that way in all keyphrases (because whether you specify them (re) or not, the AIEngine is working in regex anyway.)

19 years ago #6062
I didn't see that in the book of AI. Probably should be added, as it is a more powerful feature than much of what is in there. Thanks.


Posts 6,051 - 6,062 of 8,681

» More new posts: Doghead's Cosmic Bar