Commit bd99601242daacc503efe771015c694504b352ec
1 parent
0b82304d
Exists in
master
and in
1 other branch
Adiciona classe principal PortGlosa
Showing
1 changed file
with
28 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,28 @@ | @@ -0,0 +1,28 @@ | ||
1 | +#!/usr/bin/python | ||
2 | +# -*- coding: utf-8 -*- | ||
3 | + | ||
4 | +#Autor: Erickson Silva | ||
5 | +#Email: <erickson.silva@lavid.ufpb.br> <ericksonsilva@live.com> | ||
6 | + | ||
7 | +#LAViD - Laboratório de Aplicações de Vídeo Digital | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | +from TraduzSentencas import * | ||
12 | + | ||
13 | + | ||
14 | +def traduz(texto): | ||
15 | + try: | ||
16 | + texto_codificado = texto.decode("UTF-8") | ||
17 | + except: | ||
18 | + texto_codificado = texto.decode("ISO-8859-1") | ||
19 | + | ||
20 | + glosa = iniciar_traducao(texto_codificado) | ||
21 | + if glosa == "": | ||
22 | + return "selecione um texto" | ||
23 | + return glosa.encode("utf-8") | ||
24 | + | ||
25 | + | ||
26 | +def help(): | ||
27 | + #TODO: Adicionar um pequeno tuto aqui | ||
28 | + print "Help" |