<filename>terms.py
# -*- coding: utf-8 -*-

from expressions import TermCategory, Term

azul = Term("azul", categories=(TermCategory.ITEM,))
albahaca = Term("alba(ha)?ca", categories=(TermCategory.ITEM,))
bebida = Term("bebidas?", categories=(TermCategory.ITEM,))
blanca =  Term("blanc[oa]s?", categories=(TermCategory.ITEM,))
caprese = Term("capress?e",   categories=(TermCategory.ITEM,))
carne =    Term("carne|c",    categories=(TermCategory.ITEM,))
cebolla = Term("cebolla", categories=(TermCategory.ITEM,))
cerveza = Term("cerveza|birra", categories=(TermCategory.ITEM,))
champignon = Term(r"champi\w+", categories=(TermCategory.ITEM,))
chipa = Term("chipas?", categories=(TermCategory.ITEM,))
ciruela = Term("ciruela", categories=(TermCategory.ITEM,))
cortada = Term("cortad[ao]", categories=(TermCategory.ITEM,))
cuatro_quesos = Term("cuatro|4 (q|quesos?)", categories=(TermCategory.ITEM,))
cuchillo = Term("cuchillo", categories=(TermCategory.ITEM,))
dulce = Term("dulce", categories=(TermCategory.ITEM,))
empanada = Term(r"emp\w*", categories=(TermCategory.ITEM,))
espinaca = Term("espinaca", categories=(TermCategory.ITEM,))
fusion = Term("fusion", categories=(TermCategory.ITEM,))
fugazzeta = Term("fuga((s|zz?)eta)?", categories=(TermCategory.ITEM,))
glaceada = Term("glacead[oa]", categories=(TermCategory.ITEM,))
jamon_queso = Term(r"j(amon)? ?y? ?q(ueso)?", categories=(TermCategory.ITEM,))
jamon = Term("jamon", categories=(TermCategory.ITEM,))
jerez = Term("jerez", categories=(TermCategory.ITEM,))
laqueado = Term("laqueado", categories=(TermCategory.ITEM,))
light = Term("light|dieta", categories=(TermCategory.ITEM,))
miel = Term("miel", categories=(TermCategory.ITEM,))
mini = Term("mini|chic[ao]|peque[nñ][ao]", categories=(TermCategory.ITEM,))
ml1500 = Term(r"((1|un)? (lt?|litro) y medio)|(1[\.,]5( ?lt?s?)?)", categories=(TermCategory.ITEM,))
ml600 = Term("600 ?(mls?)?", categories=(TermCategory.ITEM,))
muzzarella = Term("mu(zz?|s)a(rell?a)?", categories=(TermCategory.ITEM,))
panceta = Term("panceta|bacon", categories=(TermCategory.ITEM,))
panini = Term("pann?inn?i|sand?wich", categories=(TermCategory.ITEM,))
pascualina = Term("pascualina|acelga", categories=(TermCategory.ITEM,))
picante = Term("picante", categories=(TermCategory.ITEM,))
pizza = Term("pizz?a", categories=(TermCategory.ITEM,))
pollo = Term("p(ollo)?", categories=(TermCategory.ITEM,))
queso = Term("queso", categories=(TermCategory.ITEM,))
roquefort = Term("roque(fort)?", categories=(TermCategory.ITEM,))
salsa = Term("salsa", categories=(TermCategory.ITEM,))
salteado = Term("saltead[ao]", categories=(TermCategory.ITEM,))
saltena = Term("salte[ñn]a", categories=(TermCategory.ITEM,))
suave = Term("suaves?", categories=(TermCategory.ITEM,))
tomate = Term("tomate", categories=(TermCategory.ITEM,))
tarta = Term("tarta", categories=(TermCategory.ITEM,))
vegetal = Term("vegetal(es)?", categories=(TermCategory.ITEM,))
zapallitos = Term("zapallitos?|zapallos?", categories=(TermCategory.ITEM,))

sprite = Term("sprite", categories=(TermCategory.ITEM,))
coca = Term("(coca( ?cola)?)|cocucha", categories=(TermCategory.ITEM,))
grande = Term("grandes?", categories=(TermCategory.ITEM,))

veinticuatro = Term("veint[iy]cuatro|((2|dos) docenas?)", lemma=24, categories=(TermCategory.NUMBER,))
dieciocho = Term("(die[cz] ?[yi] ?ocho)|((una )?docena y media)", lemma=18, categories=(TermCategory.NUMBER,))
doce = Term("doce|((1|una) docena)", lemma=12, categories=(TermCategory.NUMBER,))

number = Term(r"\d+", categories=(TermCategory.NUMBER,))

uno = Term("un(o|a)?", lemma=1, categories=(TermCategory.NUMBER,))
dos = Term("dos", lemma=2, categories=(TermCategory.NUMBER,))
tres = Term("tres", lemma=3, categories=(TermCategory.NUMBER,))
cuatro = Term("cuatro", lemma=4, categories=(TermCategory.NUMBER,))
cinco = Term("cinco", lemma=5, categories=(TermCategory.NUMBER,))
seis= Term("seis", lemma=6, categories=(TermCategory.NUMBER,))
siete = Term("siete", lemma=7, categories=(TermCategory.NUMBER,))
ocho = Term("ocho", lemma=8, categories=(TermCategory.NUMBER,))
nueve = Term("nueve", lemma=9, categories=(TermCategory.NUMBER,))
diez = Term("(die[sz])|diego", lemma=10, categories=(TermCategory.NUMBER,))
once = Term("once", lemma=11, categories=(TermCategory.NUMBER,))
trece = Term("trece", lemma=13, categories=(TermCategory.NUMBER,))
catorce = Term("catorce", lemma=14, categories=(TermCategory.NUMBER,))
quince = Term("quince", lemma=15, categories=(TermCategory.NUMBER,))

words = Term(r"\w+", name="a", categories=(TermCategory.UNKNOWN,))
punctuation = Term(r"[.,:¿?()\[\]{}]+", name=".", categories=(TermCategory.UNKNOWN,), wrap=False)
end = Term("a^", name="end", categories=(TermCategory.END,), wrap=False)
<filename>terms.py
# -*- coding: utf-8 -*-

from expressions import TermCategory, Term

azul = Term("azul", categories=(TermCategory.ITEM,))
albahaca = Term("alba(ha)?ca", categories=(TermCategory.ITEM,))
bebida = Term("bebidas?", categories=(TermCategory.ITEM,))
blanca =  Term("blanc[oa]s?", categories=(TermCategory.ITEM,))
caprese = Term("capress?e",   categories=(TermCategory.ITEM,))
carne =    Term("carne|c",    categories=(TermCategory.ITEM,))
cebolla = Term("cebolla", categories=(TermCategory.ITEM,))
cerveza = Term("cerveza|birra", categories=(TermCategory.ITEM,))
champignon = Term(r"champi\w+", categories=(TermCategory.ITEM,))
chipa = Term("chipas?", categories=(TermCategory.ITEM,))
ciruela = Term("ciruela", categories=(TermCategory.ITEM,))
cortada = Term("cortad[ao]", categories=(TermCategory.ITEM,))
cuatro_quesos = Term("cuatro|4 (q|quesos?)", categories=(TermCategory.ITEM,))
cuchillo = Term("cuchillo", categories=(TermCategory.ITEM,))
dulce = Term("dulce", categories=(TermCategory.ITEM,))
empanada = Term(r"emp\w*", categories=(TermCategory.ITEM,))
espinaca = Term("espinaca", categories=(TermCategory.ITEM,))
fusion = Term("fusion", categories=(TermCategory.ITEM,))
fugazzeta = Term("fuga((s|zz?)eta)?", categories=(TermCategory.ITEM,))
glaceada = Term("glacead[oa]", categories=(TermCategory.ITEM,))
jamon_queso = Term(r"j(amon)? ?y? ?q(ueso)?", categories=(TermCategory.ITEM,))
jamon = Term("jamon", categories=(TermCategory.ITEM,))
jerez = Term("jerez", categories=(TermCategory.ITEM,))
laqueado = Term("laqueado", categories=(TermCategory.ITEM,))
light = Term("light|dieta", categories=(TermCategory.ITEM,))
miel = Term("miel", categories=(TermCategory.ITEM,))
mini = Term("mini|chic[ao]|peque[nñ][ao]", categories=(TermCategory.ITEM,))
ml1500 = Term(r"((1|un)? (lt?|litro) y medio)|(1[\.,]5( ?lt?s?)?)", categories=(TermCategory.ITEM,))
ml600 = Term("600 ?(mls?)?", categories=(TermCategory.ITEM,))
muzzarella = Term("mu(zz?|s)a(rell?a)?", categories=(TermCategory.ITEM,))
panceta = Term("panceta|bacon", categories=(TermCategory.ITEM,))
panini = Term("pann?inn?i|sand?wich", categories=(TermCategory.ITEM,))
pascualina = Term("pascualina|acelga", categories=(TermCategory.ITEM,))
picante = Term("picante", categories=(TermCategory.ITEM,))
pizza = Term("pizz?a", categories=(TermCategory.ITEM,))
pollo = Term("p(ollo)?", categories=(TermCategory.ITEM,))
queso = Term("queso", categories=(TermCategory.ITEM,))
roquefort = Term("roque(fort)?", categories=(TermCategory.ITEM,))
salsa = Term("salsa", categories=(TermCategory.ITEM,))
salteado = Term("saltead[ao]", categories=(TermCategory.ITEM,))
saltena = Term("salte[ñn]a", categories=(TermCategory.ITEM,))
suave = Term("suaves?", categories=(TermCategory.ITEM,))
tomate = Term("tomate", categories=(TermCategory.ITEM,))
tarta = Term("tarta", categories=(TermCategory.ITEM,))
vegetal = Term("vegetal(es)?", categories=(TermCategory.ITEM,))
zapallitos = Term("zapallitos?|zapallos?", categories=(TermCategory.ITEM,))

sprite = Term("sprite", categories=(TermCategory.ITEM,))
coca = Term("(coca( ?cola)?)|cocucha", categories=(TermCategory.ITEM,))
grande = Term("grandes?", categories=(TermCategory.ITEM,))

veinticuatro = Term("veint[iy]cuatro|((2|dos) docenas?)", lemma=24, categories=(TermCategory.NUMBER,))
dieciocho = Term("(die[cz] ?[yi] ?ocho)|((una )?docena y media)", lemma=18, categories=(TermCategory.NUMBER,))
doce = Term("doce|((1|una) docena)", lemma=12, categories=(TermCategory.NUMBER,))

number = Term(r"\d+", categories=(TermCategory.NUMBER,))

uno = Term("un(o|a)?", lemma=1, categories=(TermCategory.NUMBER,))
dos = Term("dos", lemma=2, categories=(TermCategory.NUMBER,))
tres = Term("tres", lemma=3, categories=(TermCategory.NUMBER,))
cuatro = Term("cuatro", lemma=4, categories=(TermCategory.NUMBER,))
cinco = Term("cinco", lemma=5, categories=(TermCategory.NUMBER,))
seis= Term("seis", lemma=6, categories=(TermCategory.NUMBER,))
siete = Term("siete", lemma=7, categories=(TermCategory.NUMBER,))
ocho = Term("ocho", lemma=8, categories=(TermCategory.NUMBER,))
nueve = Term("nueve", lemma=9, categories=(TermCategory.NUMBER,))
diez = Term("(die[sz])|diego", lemma=10, categories=(TermCategory.NUMBER,))
once = Term("once", lemma=11, categories=(TermCategory.NUMBER,))
trece = Term("trece", lemma=13, categories=(TermCategory.NUMBER,))
catorce = Term("catorce", lemma=14, categories=(TermCategory.NUMBER,))
quince = Term("quince", lemma=15, categories=(TermCategory.NUMBER,))

words = Term(r"\w+", name="a", categories=(TermCategory.UNKNOWN,))
punctuation = Term(r"[.,:¿?()\[\]{}]+", name=".", categories=(TermCategory.UNKNOWN,), wrap=False)
end = Term("a^", name="end", categories=(TermCategory.END,), wrap=False)
# -*- coding: utf-8 -*-