Venus Chat Bot: Difference between revisions
No edit summary |
|||
Line 47: | Line 47: | ||
https://futuragora.pt/portfolio/inteligencia-artificial-aiml/ | https://futuragora.pt/portfolio/inteligencia-artificial-aiml/ | ||
==Program-O== | ==Program-O== | ||
Line 80: | Line 78: | ||
==AIML== | ==AIML== | ||
===Alice Portuguese Translation=== | |||
https://github.com/roltel/aiml-pt-pt-futuragora-venus | |||
==AIML intelligence google== | ===AIML with intelligence at google=== | ||
A.1 O que é, de que é feito, como é feito, onde é, quem é -> wikipedida - 1ª frase | A.1 O que é, de que é feito, como é feito, onde é, quem é -> wikipedida - 1ª frase | ||
Line 88: | Line 88: | ||
A.2. Quem fez, quem escreveu -> wikipedia -> ver nome criador: | A.2. Quem fez, quem escreveu -> wikipedia -> ver nome criador: | ||
==AIML substitutions== | ===AIML substitutions=== | ||
á à ã â é ê í ó õ ô ú ç | á à ã â é ê í ó õ ô ú ç | ||
Line 110: | Line 110: | ||
</pre> | </pre> | ||
===AIML Profile=== | |||
VENUS. | |||
O perfil da Venus está principalmente no ficheiro venus.aiml. Aí tem VENUS VENUS2 (contactos), VENUS3 e VENUS4 (conversa). | |||
<pre> | <pre> | ||
Revision as of 12:21, 7 August 2018
codename: Venus Assistente Virtual
Venus Asistente Virtual
Venus Falante https://futuragora.pt/Program-O/gui/plain/venusaudio.php
Projecto: http://www.futuragora.pt/portfolio/inteligencia-artificial-aiml/
Servidor: Program O
VENUS AIML GITHUB: https://github.com/roltel/aiml-pt-pt-futuragora-venus/tree/master/branches/venus
http://futuragora.pt/chatbots/venus.php
admin: http://futuragora.pt/Program-O/admin
Projecto no Google Code: https://code.google.com/p/aiml-pt-pt-futuragora-venus/wiki/DevManual
A Futuragora desenvolveu dois “bots” de chat durante 2012. Neste momento a assistente pessoal Vénus contém a maior base de dados de conversação em língua em Portuguesa em AIML, disponível gratuitamente Aqui.
O AIML foi desenvolvido por Richard S. Wallace no mundial de uma comunidade de software livre entre os anos de 1995 e 2002. Ela serviu de base para ” A.L.I.C.E. ” (“Artificial Linguistic Internet Computer Entity”) que antes era chamado de Eliza, que ganhou o concurso para o Prémio anual Loebner Prize Contest for Most Human Computer três vezes, e foi também o campeão Chatterbox em 2004.
Como o conjunto A.L.I.C.E. AIML foi liberado sob a licença GNU GPL, e porque a maioria dos intérpretes AIML são oferecidos sob uma licença livre ou de fonte aberta, muitos “clones Alicebot ” tem sido criados baseados na implementação do programa original e na sua base de conhecimento. Conjuntos AIML em várias línguas foram desenvolvidos e disponibilizados pela comunidade de utilizadores.
https://futuragora.pt/portfolio/inteligencia-artificial-aiml/
Program-O
O Program-O é o motor que lê os ficheiros aiml e está escrito em php/mysql. https://github.com/Program-O/Program-O/wiki/Installation-Guide
https://futuragora.pt/Program-O/chatbot/conversation_start.php
Google TTS on Program-O
while [[ 1 ]]; do inotifywait -e modify ./testve.txt; ./venusaudioupdate.sh; done
Relay controlo on Program-O
Wiki Search
https://en.wikipedia.org/w/api.php?action=opensearch&search=zyz&limit=1&namespace=0&format=jsonfm
Wiki Google search
Charliebot http://futuragora.pt:2001/?botid=Venus&template=fa&text=fasite
Aiml 2
AIML
Alice Portuguese Translation
https://github.com/roltel/aiml-pt-pt-futuragora-venus
AIML with intelligence at google
A.1 O que é, de que é feito, como é feito, onde é, quem é -> wikipedida - 1ª frase
A.2. Quem fez, quem escreveu -> wikipedia -> ver nome criador:
AIML substitutions
á à ã â é ê í ó õ ô ú ç
"EU QUERIA" > "QUERIA" "EU GOSTO" > GOSTO - Remover todos os "eu gosto", substituir por "gosto" e no final fazer um reencaminhamento para o "gosto". "EU NAO GOSTO" > "NAO GOSTO" "EU JA" > "JA" "EU TOCO" > "TOCO" "EU ODEIO" > "ODEIO" "EU NAO SOU" > "NAO SOU" "EU PENSEI" > "PENSEI" "EU ESTOU" > "ESTOU" "EU SOU" > "SOU" "EU ESTOU" > "ESTOU" "EU SINTO-ME" > "SINTO-ME" "EU PENSEI" > "PENSEI" "EU VOU" > "VOU" "EU FUI" > "FUI" "EU NAO GOSTO" > "NAO GOSTO"
AIML Profile
O perfil da Venus está principalmente no ficheiro venus.aiml. Aí tem VENUS VENUS2 (contactos), VENUS3 e VENUS4 (conversa).
ASSISTANT.SH #!/bin/bash echo "Venus Virtual Assistant version 0.1.2" echo "Choose your assistant:" echo "1 - Venus (Portugues)" echo "2 - Fresco:" venus="1" fresco="2" echo -n "Select assistant: " read assistant if [ $assistant == $venus ] then bot="Venus" elif [ $assistant == $fresco ] then bot="Fresco" fi ./venusa.sh VENUS.SH #!/bin/bash echo "Venus Virtual Assistant v 0.1.2 (teste PT)" while : do echo -n "User: " #get user input read text command=${text%% *} gquery=${text#* } search="procura" echo -n "Venus: " if [ $command == $search ] # split user input on function reply or search then echo "Google Top10 Results:" GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&' | sed 's/\/url?q=//;s/&//'); echo -e "${stream//\%/\x}" else reply=$(curl -s -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) #get chatbot response echo $reply fi done #!/bin/bash ## This program is intended to be a terminal virtual assistant with ## text to speech, websearch and automation function. It is based on ## echo "Venus Virtual Assistant v 0.1.2" ## SALUTATION echo -n "Venus: " hi=$(curl -s -d "botid=Venus&text=oi" http://dev.futuragora.pt:2001) echo $hi wget -q -U Mozilla -O ./hi.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${hi}" mplayer -quiet hi.mp3 > /dev/null 2>&1 ## LOOP while : do echo -n "User: " #get user input read text command=${text%% *} gquery=${text#* } search="procura" echo -n "Venus: " if [ $command == $search ] # split user input on function reply or search then echo "Google Top10 Results:" GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&' | sed 's/\/url?q=//;s/&//'); echo -e "${stream//\%/\x}" else reply=$(curl -s -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) #get chatbot response echo $reply wget -q -U Mozilla -O ./output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${reply}" mplayer -quiet output.mp3 > /dev/null 2>&1 # audio output fi done "Venus Virtual Assistant" while : do echo -n "User: " read text command=${text%% *} gquery=${text#* } search="procura" if [ $command == $search ] then echo match GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&' | sed 's/\/url?q=//;s/&//'); echo -e "${stream//\%/\x}" fi echo -n "Venus: " reply=$(curl -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) echo "" echo $reply wget -q -U Mozilla -O ./output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${reply}" mplayer -quiet output.mp3 > /dev/null 2>&1 done --------------------------------------------------------------------------------------------- Venus falante com procura (LOCAL) #!/bin/bash echo "Venus Virtual Assistant" while : do echo -n "User: " read text command=${text%% *} gquery=${text#* } search="procura" if [ $command == $search ] then echo match GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&' | sed 's/\/url?q=//;s/&//'); echo -e "${stream//\%/\x}" else echo -n "Venus: " reply=$(curl -s -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) echo "" echo $reply wget -q -U Mozilla -O ./output.mp3 "http://translate.google.com/translate_tts?ie=UTF-8&tl=pt&q=${reply}" mplayer -quiet output.mp3 > /dev/null 2>&1 fi done venus com procura server #!/bin/bash echo "Venus Virtual Assistant Server" while : do echo -n "User: " read text command=${text%% *} gquery=${text#* } search="procura" if [ $command == $search ] then echo match GOOG_URL="http://www.google.com/search?q="; AGENT="Mozilla/4.0"; stream=$(curl -A "$AGENT" -skLm 10 "${GOOG_URL}\"${gquery/\ /+}\"" | grep -oP '\/url\?q=.+?&' | sed 's/\/url?q=//;s/&//'); echo -e "${stream//\%/\x}" else echo -n "Venus: " reply=$(curl -d "botid=Venus&text=${text}" http://dev.futuragora.pt:2001) echo "" echo $reply fi done