Skip to content
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

Response list now stores occurrence count #63

Merged
merged 10 commits into from
Oct 17, 2015
Merged

Conversation

gunthercox
Copy link
Owner

This makes changes that will make the process of generating responses to known input more accurate.

Before this pull request, each statement object stored a count (occurrences), representing the number of times the statement had occurred, and a list of responses (in_response_to), representing the list of other statements that the current statement has been issued in response to.

This pull request removes the occurrence count from the statement object and introduces a response object. Each response object holds the text of the response statement and the count of the number of times the current statement has been used to respond to it.

By making these changes a fundamental issue with the previous algorithm is solved. The problem with using the weighting of occurrence count to select responses is that some statements may tend to occur frequently, but that does not necessarily imply an equal level of frequency toward all possible responses.

Closes #46

This makes it possible to create logic adapters that
use additional meta data from statements to select
a response.
Since the list of statement objects is now passed to the logic
adapter, have the logic adapter return the matching statement
instead of doing another lookup.
This was due to an issue in a dependency where the empty string
was being evaluated as false. The minimum required value of jsondb
bas been set to prevent this in the future.
Signatures are not used yet. In the future they will be used to
hold meta data about a response, such as who said it.
gunthercox added a commit that referenced this pull request Oct 17, 2015
Response list now stores occurrence count
@gunthercox gunthercox merged commit 071f7a8 into master Oct 17, 2015
@gunthercox gunthercox deleted the response_structure branch October 17, 2015 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant