mirror of
https://github.com/keiffster/program-y.git
synced 2026-04-03 00:19:21 -06:00
Bug in pattern parser where the star index of the words will change #30
Labels
No labels
News
News
News
News
News
News
News
News
bug
bug
bug
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
dependencies
enhancement
enhancement
enhancement
enhancement
enhancement
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github/program-y#30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @EdvinJakobsson on 8/12/2021
I have tried to pinpoint when this bug occurs, and I have found one simple example. I have seen the bug trigger in other instances as well though, and it has become a major headache to try to sidestep it in our project.
Example pattern:
In this pattern the install/replace word should be retrievable as "star index=5" and the radio/antenna as "star index=6", and when this is the only pattern in the bot it works fine for an example question: "please show me a video on how to install radio
".
However, if I add a second pattern:
then even though this pattern will not match the example question above, it will affect how the words are indexed in the first pattern (in this case it will kind of forget about all words before the "show"). All words are hence indexed one step earlier than they should, leaving the radio/antenna word to be retrievable as "star index=4" and radio/antenna as "star index=5", as seen in the image attached. Also note that using the other word in the iset, "give", the pattern still functions as normal.

I will also attach the log from when asking the three questions in the image, when both patterns are loaded (and no other patterns)
programy-log-edvin.log