Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
a45605d
Puse el nombre del responsable
Jul 15, 2019
8ec9b2e
Archivo csv agregado
Jul 16, 2019
02d6349
Modificación a los archivos a ignorar por el git
Jul 16, 2019
cc0cd5e
Librerias necesarias instaladas
Jul 16, 2019
8aca688
modificacion al random_greeting para tener mas saludos
Jul 24, 2019
07de4d4
ARCHIVO DATOS PERSONALES
OLopezHdz Jul 24, 2019
9c358f9
archivo de mentiras
Jul 24, 2019
08b9579
ARCHIVO DATOS PERSONALES
OLopezHdz Jul 24, 2019
5a4b47b
LISTO archivo datos personales IT WAS EASY!!
OLopezHdz Jul 24, 2019
51991cb
archivo de trabajo
Jul 24, 2019
f501569
Merge branch 'master' of https://github.com/JesusChuyErnesto/chatvoice
Jul 24, 2019
ab4eec6
ARCHIVO DATOS PERSONALES CORREGIDO!! :)
OLopezHdz Jul 24, 2019
4ca3f05
Merge branch 'master' of https://github.com/JesusChuyErnesto/chatvoice
OLopezHdz Jul 24, 2019
fd5e4d1
modificaciones ultimas antes de la primer corrida del programa
Jul 24, 2019
d0e30b1
agregado escolar
Jul 24, 2019
c1521a8
funcionalidad cambiada
Jul 24, 2019
337b992
ya funciona datos_personales
Jul 24, 2019
c3adbc3
ARCHIVO CENTRAL DE HABILIDADES TECNICAS
OLopezHdz Jul 25, 2019
fbf9ff3
ARCHIVO HABILIDADES CONOCIMIENTO..
OLopezHdz Jul 25, 2019
845075a
Merge branch 'master' of https://github.com/JesusChuyErnesto/chatvoice
OLopezHdz Jul 25, 2019
970b0e8
ARCHIVO HABILIDADES IDIOMAS..
OLopezHdz Jul 25, 2019
4b23fb2
Primera prueba del 25 de julio
Jul 25, 2019
9786c14
este ya casi jala
Jul 25, 2019
88af26e
Version semi-final funcional 30-julio
Jul 30, 2019
2cb88ab
Fechas y numeros mejorados
Jul 30, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,8 @@ pip-selfcheck.json

# moni_files
conversations/moni*

audios/
audios.json
conversations/kb.db
rec_voice_audios/
Binary file added FormatoCV.docx
Binary file not shown.
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ yarl = "*"
duckduckpy = "*"
socketIO-client = "*"
python-socketio = "*"
request = "*"
spacy = "*"
python-docx = "*"

[dev-packages]

Expand Down
54 changes: 43 additions & 11 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# chatvoice
# chatvoice
#Modificado por Jesús Ernesto Martínez Olmos

A language for chatbots, uses ASR and TTS technology.

Expand Down
5 changes: 4 additions & 1 deletion conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# Import plugins
# TODO make a better system for plugins
from plugins import random_greeting
from plugins import spacy
from plugins import doc_generator
# TODO make a better system for filters
from filters import *

Expand Down Expand Up @@ -205,6 +207,7 @@ def solve_(self,*args):
try:
if args[0] in self.contexts:
self.current_context=self.contexts[args[0]]
#print("d**************",self.contexts)
slots_tmp=OrderedDict(self.current_context.slots)
slots_tmp_ = self.slots
self.slots=self.current_context.slots
Expand Down Expand Up @@ -300,7 +303,7 @@ def conditional_(self,line):
result=eval(conditional,globals(),self.slots)
except NameError:
print(bcolors.WARNING, "False because variable not defined",bcolors.ENDC)
result=True
result=False
if result:
self.execute_line_(cmd)

Expand Down
23 changes: 23 additions & 0 deletions conversations/alergia_yes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
strategies:
num_children:
- say "¿cuantos hijos tienes?"
- input num_children
age_children:
- say "¿qué edades tienen?"
- input age_children
subject_children:
- say "¿ya sabes que quieren estudiar?"
- input status
where_study_children:
- say "¿y dónde quieren estudiar?"
- input where_study_children
insurance_education:
- say "¿tienes algún seguro que cubra su educación?"
- input insurance_education
script:
- while number_creditcard_counter < number_creditcard solve card_info
- say num_children
- solve age_children
- solve subject_children
- solve where_study_children
- solve insurance_education
35 changes: 35 additions & 0 deletions conversations/chataracely/chatbot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
settings:
name: ChatBot

conversations:
- 'pract_yes_pro.yaml'
- 'idioma.yaml'
- 'trabajo.yaml'
- 'hello.yaml'

slots:
- name
- age
- Grado_Aca
- Pract_Profesionales

strategies:
name:
- say "Hola ¿Cómo te llamas?"
- input name
- say "mucho gusto en conocerte"
age:
- say "¿y qué edad tienes?"
- input age
Grado_Aca:
- say "¿Cual es tu grado academico?"
- input Grado_Aca
Pract_Profesionales:
- say " ¿Haz trabajado, realizado practicas profesionales, etc?"
- input Pract_Profesionales | yesno
script:
- loop_slots
- if Pract_Profesionales solve pract_yes_pro
- solve idioma
- solve trabajo
- say "adios {}".format(name)
77 changes: 77 additions & 0 deletions conversations/chataracely/denuncia.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Conversation example for simple hello and ask a name

settings:
name: DenunciaBot

conversations:
- 'denuncia_yes_reconocerAsaltante.yaml'
- 'denuncia_yes_antecedentes.yaml'

slots:
- name
- denuncia
- descripcionDenuncia
- fecha
- hora
- lugar
- reconocerAsaltante
- arma
- antecedentes
- objetoRobado
- valorObjetoRobado
- tipoDenuncia

strategies:
name:
- say "Hola, soy Denunciabot, el chatbot que recibe denuncias.. ¿Cual es tu nombre?"
- input name
denuncia:
- say "En que puedo ayudarte?"
- input denuncia
descripcionDenuncia:
- say "Sobre que es tu denuncia"
- input descripcionDenuncia
fecha:
- say "En que fecha fue asaltado?"
- input fecha
hora:
- say "A que hora ocurrieron los hechos?"
- input hora
lugar:
- say "Donde ocurrio el asalto?"
- input lugar
reconocerAsaltante:
- say "Reconocio al asaltante"
- input reconocerAsaltante | yesno
arma:
- say "Con que fue asaltado?"
- input arma
antecedentes:
- say "Ya habia sido asaltado con anterioridad por esa zona?"
- input antecedentes | yesno
objetoRobado:
- say "Que le fue despojado?"
- input objetoRobado
valorObjetoRobado:
- say "Que valor tenia?"
- input valorObjetoRobado
tipoDenuncia:
- say "¿Muy bien, desea hacer la denuncia anonima o nos permite saber sus datos?"
- input tipoDenuncia

script:
- loop_slots
- if denuncia_yes_reconocerAsaltante
- if denuncia_yes_antecedentes
- solve name
- solve denuncia
- solve descripcionDenuncia
- solve fecha
- solve hora
- solve lugar
- solve reconocerAsaltante
- solve arma
- solve antecedentes
- solve objetoRobado
- solve valorObjetoRobado
- solve tipoDenuncia
9 changes: 9 additions & 0 deletions conversations/chataracely/denuncia_yes_antecedentes.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Moni conversation for children information
strategies:
antecedentes:
- say "�Cuando?"
- input antecedentes

script:
- solve antecedentes

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Moni conversation for children information
strategies:
reconocer:
- say "�Como era?"
- input reconocer

script:
- solve reconocer

8 changes: 8 additions & 0 deletions conversations/chataracely/hello.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Conversation example for simple hello

plugins:
- random_greeting

script:
- set_slot options ["whatsup"]
- random_greeting.execute('greeting',options)
22 changes: 22 additions & 0 deletions conversations/chataracely/idioma.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
strategies:
num_idioma:
- say "¿Cuantos idiomas sabes hablar?"
- input num_idioma
primero:
- say "Menciona el primer idioma"
- input primero
nivel:
- say "¿Nivel de idioma?"
- input nivel
segundo:
- say "Menciona el segundo idoma"
- input segundo
snivel:
- say "¿Nivel de idioma?"
- input snivel
script:
- solve num_idioma
- solve primero
- solve nivel
- solve segundo
- solve snivel
27 changes: 27 additions & 0 deletions conversations/chataracely/pract_yes_pro.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

strategies:
num_lugar:
- say "¿En cuantos lugares?"
- input num_lugar | number
lugar:
- solve lugar_puesto
- solve periodo
- solve guardar_info
lugar_puesto:
- say "Menciona el lugar y en que puesto trabajaste"
- input lugar_puesto
periodo:
- say "¿Que periodo de tiempo estuviste?"
- input periodo
guardar_info:
- execute self.slots['lugares'].append((self.slots['lugar_puesto'],self.slots['periodo']))
- empty_slot lugar_puesto
- empty_slot periodo
- execute self.slots['numero_contador']+=1
script:
- solve num_lugar
- add_slot lugares
- set_slot lugares []
- add_slot numero_contador
- set_slot numero_contador 0
- while numero_contador < num_lugar solve lugar
20 changes: 20 additions & 0 deletions conversations/chataracely/trabajo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
strategies:
puesto:
- say "¿Que puesto de trabajo buscas preferentemente?"
- input puesto
primeros:
- say "Otro puesto de trabajo?"
- input primeros
horario:
- say " En que horario, Mañana, Tarde, Noche o Mixto"
- input horario
correo:
- say "Perfecto, ahora generaremos tu CV. y buscaremos en ferias de empleo, deja tu correo para hacerte llegar todo"
- input correo

script:
- solve puesto
- solve primeros
- solve horario
- solve correo

3 changes: 3 additions & 0 deletions conversations/data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fact, date
benito juarez nacio en, un 21 marzo
el día de la bandere es el, 24 de febrero
Loading