{"id":13439892,"url":"https://github.com/gooofy/zamia-ai","last_synced_at":"2025-04-14T14:43:21.955Z","repository":{"id":13308166,"uuid":"15994566","full_name":"gooofy/zamia-ai","owner":"gooofy","description":"Free and open source A.I. system based on Python, TensorFlow and Prolog.","archived":false,"fork":false,"pushed_at":"2021-05-13T19:06:43.000Z","size":124072,"stargazers_count":151,"open_issues_count":0,"forks_count":28,"subscribers_count":20,"default_branch":"master","last_synced_at":"2024-02-15T02:34:31.599Z","etag":null,"topics":["artificial-intelligence","knowledgebase","natural-language-processing","prolog","python","semantic-web","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Prolog","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gooofy.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-01-17T08:49:59.000Z","updated_at":"2023-12-26T18:20:10.000Z","dependencies_parsed_at":"2022-08-29T10:31:22.182Z","dependency_job_id":null,"html_url":"https://github.com/gooofy/zamia-ai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gooofy%2Fzamia-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gooofy%2Fzamia-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gooofy%2Fzamia-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gooofy%2Fzamia-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gooofy","download_url":"https://codeload.github.com/gooofy/zamia-ai/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248898722,"owners_count":21179830,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["artificial-intelligence","knowledgebase","natural-language-processing","prolog","python","semantic-web","tensorflow"],"created_at":"2024-07-31T03:01:17.964Z","updated_at":"2025-04-14T14:43:21.924Z","avatar_url":"https://github.com/gooofy.png","language":"Prolog","funding_links":[],"categories":["Prolog","Artificial Intelligence"],"sub_categories":[],"readme":"ifndef::imagesdir[:imagesdir: doc]\nZamia AI\n========\n\nThe Zamia AI project is a framework that provides a set of components needed to\nbuild completely free, open source end-to-end speech and natural language \nprocessing A.I.  systems.\n\nFor more information about the Zamia AI project check out our homepage at:\n\n* http://zamia-ai.org\n\nGetting Started\n---------------\n\nTry Our Example Applications\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThe easiest way to see Zamia AI in action is to download one of our precompiled examples:\n\nhttp://goofy.zamia.org/zamia-ai/\n\nChatbot\n^^^^^^^\n\nThis is a simple text chat bot built on top of Zamia AI's knowledge base. You can chat with the model by\nrunning the command:\n\n```\nzaicli chat\n```\n\nHere is a sample session giving you some ideas to get your conversation started:\n\n```\n[bofh@centos7 chatbot]$ zaicli chat\n...\nai\u003e okay computer\nINFO:root:RESP: [   0.5] Greetings! | action: attention(on)\nai\u003e what is your name\nINFO:root:RESP: [   0.5] My name is \"HAL 9000\" \nai\u003e who was the predecessor of barack obama\nINFO:root:RESP: [   0.2] The predecessor of \"Barack Obama\" as \"President of the United States of America\" was \"George W. Bush\". \nai\u003e what time is it\nINFO:root:RESP: [   0.1] It is 6 minutes past 0 \nai\u003e are you a computer\nINFO:root:RESP: [   0.1] Yes, I am a Computer. Are you knowledgeable about Computers? \nai\u003e what is your favorite movie\nINFO:root:RESP: [   1.0] 2001: A Space Odyssey by Stanley Kubrick \nai\u003e \n```\n\nYou can also run the chatbot application itself which shoud also give you a starting point on how\nto embed Zamia AI into you own applications:\n\n```\n./chatbot.py\n```\n\nVoice Assistant\n^^^^^^^^^^^^^^^\n\nThis example show how Zamia AI can be combined with Zamia Speech Kaldi ASR Models and eSpeak NG\nto create a completely free, offline capable voice assistant.\n\nCompiling Zamia AI Models\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis tutorial uses the chatbot example that comes with Zamia AI. You can also find it online here:\n\nhttps://github.com/gooofy/zamia-ai/tree/master/examples/chatbot\n\nto try it, create a directory and put all the source files there. \n\nNow, the first step is to compile the skills that are used in this examples - i.e. Zamia AI will\nwill compute all sample utterances plus their corresponding responses from the skills our `toplevel.py`\nskill depends on into an SQLite DB. To do this, we run the command\n\n```\nzaicli compile all\n```\n\nyou can check out the number of utterances extracted from each skill using the command\n\n```\nzaicli stats\n```\n\nalso, you can check the utterances extracted from all or specific skills using the command\n\n```\nzaicli utterances [-s skill]\n```\n\nTrain word vectors using fastText:\n\n```\nwget 'http://goofy.zamia.org/zamia-speech/misc/sentences-en.txt.xz'\nunxz sentences-en.txt.xz\n\nzaicli utterances \u003eutts.txt\n\ncat utts.txt sentences-en.txt \u003e corpus.txt\nmkdir model\nfasttext skipgram -input corpus.txt -output model/word_embeddings\n```\n\nOnce we are satisfied it is time to train our NLP model which will allow Zamia AI to handle utterances\nthat have no exact match in our DB:\n\n```\nzaicli train\n```\n\nUtterance Classification\n^^^^^^^^^^^^^^^^^^^^^^^^\n\nUtterance classification is used to predict which of the existing skills a new utterance fits best. Can also be \nused on a text file containing one utterance per line.\n\nTrain the classifier:\n```\nzaicli utt_class_train\n```\n\nRun the prediction:\n```\nzaicli utt_class \"Who is the current US President?\"\n```\n\nAdapt the Kaldi Speech Recognition Model\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n\nNOTE: This is only needed for application that use voice input.\n\n```\ncat utts.txt utts.txt utts.txt utts.txt utts.txt sentences-en.txt \u003ecorpus5.txt\n\nMODEL=\"/opt/kaldi/model/kaldi-generic-en-tdnn_sp\"\n\ncut -f 1 -d ' ' ${MODEL}/data/local/dict/lexicon.txt \u003evocab.txt\nlmplz -o 4 --prune 0 1 2 3 --limit_vocab_file vocab.txt --interpolate_unigrams 0 \u003ccorpus5.txt \u003elm.arpa\n\nrm -rf work\nkaldi-adapt-lm ${MODEL} lm.arpa en-tdnn_sp\ntar xfJ work/kaldi-en-tdnn_sp-adapt.tar.xz\n```\n\nFurther Documentation\n~~~~~~~~~~~~~~~~~~~~~\n\nFor other technical documentation, check out\n\n* http://zamia-ai.org/architecture.html\n* \u003c\u003cdoc/guide#,Skill Author's Guide\u003e\u003e\n\nLicense\n-------\n\nMy own scripts as well as the data I create is Apache-2.0 licensed unless otherwise\nnoted in the script's copyright headers.\n\nSome scripts and files are based on works of others, in those cases it is my\nintention to keep the original license intact. Please make sure to check the\ncopyright headers inside for more information.\n\nAuthor\n------\n\nGuenter Bartsch \u003cguenter@zamia.org\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooofy%2Fzamia-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooofy%2Fzamia-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooofy%2Fzamia-ai/lists"}