Coder Social home page Coder Social logo

fabioravila / rivescript-csharp Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 6.0 315 KB

A RiveScript interpreter for C# .Net. RiveScript is a scripting language for chatterbots. http://www.rivescript.com

License: MIT License

C# 100.00%
ai artificial-intelligence bot chatbot chatterbot csharp dotnet interpreter rivescript

rivescript-csharp's People

Contributors

andreminelli avatar effacestudios avatar fabioravila avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rivescript-csharp's Issues

Deparse function

rivescript-js has a deparse and stringfy function that allows you to extract the in-memory representation of the brain memory to a JSON notation, and vice versa

My idea is to create an object that represents this JSON in a structured way, besides allowing it to be easily converted to JSON notation.

Methods to implement:

  • deparse
  • stringify
  • write

For more details of deparse: https://github.com/aichaos/rivescript-js/tree/master/eg/deparse

Definitive Csharp object handler

The current csharp object handler is a first work code just to have something to say.
The definitive has to be better

  • Allow user using keyword
  • Allow add custom dll referencies
  • Access to current RiveScript instance
  • Better performance
  • Better code

Folow-UP with ricescript-java 0.8+

As my initial code is based on the rivescript-java version, I think it's a good idea to try to keep the code of the two similar versions in terms of implementation and organization.
This would make it easier to replicate localized corrections in the java version for csharp, given the low usage of the csharp version relative to java.
especially this commit: Refactorings for 0.8.0 release

Bug in Rivescript.vs

Caro Fabio, por favor verifique seu código na linha 1867 em relação ao trecho abaixo cuja declaração da string value precede o teste da existência da chave no dicionário vars!
Obrigado.

                                   //string value = vars[var].ToLower().ReplaceRegex("[^a-z0-9 ]+", "");

                //BUG: tem que testar se contem primeiro!!!
                //string value = Util.StripNasties(vars[var].ToLower(), utf8);

                // Have this?
                if (vars.ContainsKey(var))
                {
                    string value = Util.StripNasties(vars[var].ToLower(), utf8);
                    regexp = regexp.Replace(tag, value);
                }
                else
                {
                    regexp = regexp.Replace(tag, "undefined");
                }

setSubroutine function

Implement setSubroutine function like does JS ans Pearl version.

This allows you to insert procedures directly into without having to write macros

Bug in Util.Substitute

begin.txt
main.txt

The method of using Rot13 to do substitutions does not seem to be robust.

Attached are the RS files I was using. This is taken partially from the Eliza template on the RiveScript website.

Input: he's an idiot
Actual output: Why are you concerned over my vfbus31tor an idiot?
Expected output: Use: https://www.rivescript.com/try with the Eliza template (the default one) - this shouldn't match anything at all

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.