Releases: aichaos/rivescript-python
Releases · aichaos/rivescript-python
1.15.0 - Apr 9, 2020
Changes
1.15.0 - Mar 29 2020
This release provides a major (~5x) speedup for RiveScripts that have
a large number of substitutions, and also fixes the following issues:
- Add a
prepare_brain_transplant
method to clear the RiveScript brain
in preparation to load in a new one, while optionally preserving
much of the current state (enh #81) - Implement the
trigger_info
method (bug #120) - Fix the issue of a "=" appearing in a variable value (bug #130)
- Allow nested brackets (bug #132)
- Fix trigger sorting to only count the existance of stars, optionals,
etc. instead of how many there are in a trigger (bug #133) - Fix the debug message for incomment (bug #138)
- Fix substitutions if they occur more than 3 times on a line (bug #140)
- Fix crash in
set_substitution
method (bug #142) - Fix issue in
set_person
method (bug #143) - Significantly improve code coverage of tests (add
test_coverage.py
)
1.14.9 - Sept 21 2017
Changes
This release fixes some regular expressions and adds better Unicode
compatibility for trigger matching.
- Fix the regexp that matches
{weight}
tags in replies to usere.search()
instead ofre.match()
. This ensures that random replies are chosen with the
correct weighting applied (bug #102; PR #106) - Fix the way arrays are interpolated into triggers so that array names are
now allowed to contain underscores (bug #101; PR #107) - Fix Unicode handling in regular expressions by using the
re.UNICODE
flag.
This allows for a trigger containing optionals, like[*]
, to match
correctly when adjacent to Unicode symbols such as umlauts (bug #37; PR #108)
1.14.8 - Sept 5 2017
Changes
This release focuses on bug fixes and backwards compatible improvements.
- Improvements to the new trigger sorting algorithm:
- Triggers containing no text (wildcards only) are sorted nearer to the end
(bug #94)
- Triggers containing no text (wildcards only) are sorted nearer to the end
- Trigger components containing an empty string between pipes (e.g.
[|]
) now
raises a syntax error at parsing time (bug #87) - Fix the parsing of
^
when used on a+Trigger
not being fully evaluated
before syntax checking for the trigger was done (bug #86) - Remove extra space characters inside optionals (bug #98)
- Improve the syntax checker by having it raise errors when certain "tag
characters" are mismatched or opened and closed in the wrong order -- for
example{<}>
(PR #103) - Fix the
deparse()
andwrite()
functions so they work again with the
latest version of RiveScript (bug #76)
1.14.7 - May 19 2017
Changes
- Various fixes and improvements that catch RiveScript-Python up with the other
implementations, to pass the RiveScript Test Suite (PR #89):- Implement arrays in replies -- so you could write a reply like
My favorite color is (@colors)
and the array gets expanded to a random
item from the!array
by the same name. - Fix the regexp for
{weight}
tag removal so that it still works if you
include extra spaces on either end of the tag. - Fix the
_
wildcard to allow matching Unicode letters. - Fix division with the
<div>
tag to use integer division for Python 3.
- Implement arrays in replies -- so you could write a reply like
- Improvements to the trigger sorting algorithm:
1.14.6 - March 23 2017
1.14.5 - February 20, 2017
Changes
- Bugfix when storing the user's
last_match
variable when a%Previous
is
active (it was storing a regexp object and not a string), to help third party
session drivers (e.g. Redis) to work.
1.14.4 - December 14 2016
1.14.3 - December 8 2016
Changes
1.14.3 Dec 8 2016
- Fix sorting algorithm for triggers with
%Previous
, making their sort order
deterministic and correct regardless of the order they appeared in the
source file (PR #60; bug #59) - Fix a possible crash when interpolating a
<star>
tag when the trigger
had captured no stars. In this cases the<star>
tag will become the string
"None"
; it is a user error that this situation arises anyway and this fix
just prevents Python from crashing (bugs #51 and #54) - Fix a possible crash when calling
random.choice
on an empty list by
wrapping it in a safety function atrivescript.utils.random_choice
(bug #36) - Better error reporting on the JSON Interactive Mode: if there is an
exception raised when decoding the input JSON, the output JSON now contains
anerror
key with the text of the exception to help diagnose what went
wrong.
1.14.2 - October 18 2016
Changes
1.14.2 Oct 18 2016
- Fix numeric tags like
<add>
raising aTypeError
exception.