Venus Chat Bot: Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
<html> | <html> | ||
<div id="wrap"> | <div id="wrap"> | ||
<iframe id="frame" src="https://futuragora.pt/Program-O/gui/plain/venusaudio.php"></iframe> | <iframe id="frame" src="https://futuragora.pt/Program-O/gui/plain/venusaudio.php"></iframe> |
Revision as of 02:46, 4 August 2018
codename: Venus Assistente Virtual
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/
Alice Portuguese Translation
https://github.com/roltel/aiml-pt-pt-futuragora-venus
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
Charliebot http://futuragora.pt:2001/?botid=Venus&template=fa&text=fasite
Aiml 2
AIML intelligence 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"
VENUS.AIML <!-- 1 PERFIL --> <!-- 2 QUEM --> <!-- 3 ONDE --> <!-- 4 CONTACTOS --> <!-- 5 SAUDAÇÕES --> <!-- 6 CONVERSA --> <!-- 7 CYBORABUS --> <!-- 8 INSULTOS --> <!-- 9 IRC --> <!-- 10 MERDICES --> <!-- 11 PERFIL --> <!-- 12 EU -->
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