Package: qary
qaryTheqarypackage is both a chatbot framework and a virtual assistant that actually assists!
Most bots manipulate you to make money for their corporate masters. With qary, you can buildyourbot to protect you and amplify your prosocial intelligence.We started work onqaryas part of 1st editition ofNLP in Action.
It has slowly grown into the core framework for a social-impact startupTangible AI.
Tangible AIinterns and volunteersare constantly fixing bugs, adding new features and dialog trees to qary's repetoire.
TheSan Diego Python User Groupmeetups have been the scene forsome fun qary demos.
TheSan Diego Machine Learning Book Clubis a great place for support on advanced concepts in theNLP in Actionbook or anything NLP and machine learning related.
You can find more ideas indocs/.InstallInstall from sourceRetrieve the source code from GitLab using a bash console:gitclonegit@gitlab.com:tangibleai/qarycdqaryIf that doesn't work or you don't know what a bash console is, then you probably want to start with theWindows UsersInstructions here:docs/README-windows-install.mdMake sure you installqaryin avirtual environmentusing the latest version ofpipand the pythonvirtualenvpackage:pipinstall--upgradepipvirtualenv
python-mvirtualenvvenvsourcevenv/bin/activateNow that you have your environment activated, make sure you are in theqary/repository along side the pyproject.toml file so you can install qary in developer (editable) mode:pipinstall--editable.Now you're ready to runqaryfrom the command line (bash console):qary"Hi!"PyPi packageqaryis onPyPibut this install is unlikely to work, unless you've already installed all the dependencies:pipinstallqaryUsage$qary--help
usage:qary[-h][--version][--nameSTR][-p][-sSTR][-v][-vv][words[words...]]Runningqaryfor just one skill$qary-sqa# ... (logging messages)YOU:WhenwasBarackObamaborn?# ... (logging messages)qary:August4,1961qaryskillsqary's probabilistic conversation manager chooses a reply from the possiblities generated by the different personalities:pattern(skills/pattern.py): example skill using regex patterns to reply to greetings like "hi"qa(skills/qa.py): BERT and ALBERT Wikipedia Question Answering (WikiQA reading comprehension tests)faq(skills/faq.py): answers to frequently asked questions using data/faq/*.ymlglossary(skills/glossary.py): definitions from glossary yml files in data/faq/glossary-*.ymleliza(eliza.py): a python port of the ELIZA therapist botConfiguring default personalitiesBy default,qaryruns withqapersonality. Check out the config file inqary.inito change the default skills loaded for your own custom skill in the skills directory.Approachqary's chatbot framework allows you to combine many approaches to give you state-of-the-art capability to answer questions and carry on a conversation:search:chatterbot,willpattern matching and response templates: Alexa,AIMLgenerative deep learning:robot-bernie,movie-botgrounding:snipsIt's all explained in detail atNLP in Action.Presentations for San Diego Python User Group are in [docs/](/docs/2019-08-22--San Diego Python User Group -- How to Build a Chatbot.odp) and on the web athttp://totalgood.org/midata/talksContributing pattern for developersDM @hobs on SD PUG'sdiscord serverif you'd like to join us for weekly collaborative-coding sessions onqaryand other open source projects.Create a forkof themain qary repositoryon Gitlab.Make your changes in a branch named something different frommaster, e.g. create
a new branchmy-pull-request.Create a merge request.Help your fellow contributors out by:Follow thePEP-8 style guide.Try to include a docstring, at least a single line, in any function, method, or classBonus points for adding adoctestas part of your contribution.If you add a new feature, write some quick docs in the README.Add your name and attribution to the AUTHORS file.Know we are grateful for your contribution! You've made the chatbot world a little better!