-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with some tags #1
Comments
Hi, I also discovered some tags were presenting problems during my tests. For instance, I had to create a subset of the ALICE AML ( located here: https://github.com/robertjwhitney/alice-programr ). I didn't end up with enough time to patch it, but I'm happy to assist if you track it down or accept a patch if you want to submit a pull request. Thanks! |
Hello, I have been analyzing the source code of the gem, and I think I know what happens (at least with Srai tag). In the "AIML Parser", in the three blocks concerning the tag, the first initialize an object (currentSrai = Srai.new), and add to "openLabels" that object. But in the second block, create a new one, and the text is added to the new object, which is not the one in "openLabels" so that reference is lost. I just commented the line of code where you create a new object Srai, and has worked for me. I dont know if this happens with more tags, as I focused on the tag Srai. Piece of code (lib/programr/aiml_parser.rb, lines 185 et seq): srai
end sraiI hope you find it helpful. Greetings! |
@dreamingechoes great. I didn't really write the library just ported it over to a gem. |
hey @dreamingechoes I will accept a pull-request if you think you have a fix. |
I submitted a PR for Looks like there's still an off-by-one error in |
@robertjwhitney - when you get a chance, could you publish a release with these patches please? |
@decampj4 no problem, published it just now |
@robertjwhitney thank you very much! |
Hello,
I discovered this gem a few days ago, and I use it for a project but I'm having trouble because some tags (like "srai" and "sr") do not work properly, simply do not return any response.
Am I the only one with this error?
The text was updated successfully, but these errors were encountered: