Commit 9f3d3d7708423d0bc8f5cdfa3b8f74169d27c4a5
1 parent
82a7f1e6
Exists in
devel
[LerDicionarios]Adiciona função para carregar todos os dicionários
Showing
1 changed file
with
17 additions
and
1 deletions
Show diff stats
src/LerDicionarios.py
@@ -36,7 +36,7 @@ class LerDicionarios(object): | @@ -36,7 +36,7 @@ class LerDicionarios(object): | ||
36 | self.dic_vb_infinitivo = {} | 36 | self.dic_vb_infinitivo = {} |
37 | self.set_vb_ligacao = [] | 37 | self.set_vb_ligacao = [] |
38 | self.dic_vb_muda_negacao = [] | 38 | self.dic_vb_muda_negacao = [] |
39 | - self.file = '' | 39 | + self.file = '' |
40 | 40 | ||
41 | def get_path(self): | 41 | def get_path(self): |
42 | '''Verifica qual o SO e gera o path de onde se encontra o diretório data. | 42 | '''Verifica qual o SO e gera o path de onde se encontra o diretório data. |
@@ -48,6 +48,22 @@ class LerDicionarios(object): | @@ -48,6 +48,22 @@ class LerDicionarios(object): | ||
48 | def montar_diretorio(self, arquivo): | 48 | def montar_diretorio(self, arquivo): |
49 | return os.path.join(self.path, arquivo) | 49 | return os.path.join(self.path, arquivo) |
50 | 50 | ||
51 | + def carregar_dicionarios(self): | ||
52 | + '''Realiza a leitura dos arquivos e atribui à estruturas de dicionários e sets. | ||
53 | + ''' | ||
54 | + print "carregando..." | ||
55 | + self.carregar_excecoes_plural() | ||
56 | + self.carregar_adverbios_intensidade() | ||
57 | + self.carregar_adverbios_tempo() | ||
58 | + self.carregar_artigos() | ||
59 | + self.carregar_preposicoes() | ||
60 | + self.carregar_sinonimos() | ||
61 | + self.carregar_subs_2_generos() | ||
62 | + self.carregar_pronomes_tratamento() | ||
63 | + self.carregar_verbos_infinitivo() | ||
64 | + self.carregar_verbos_ligacao() | ||
65 | + self.carregar_verbos_muda_negacao | ||
66 | + | ||
51 | def carregar_excecoes_plural(self): | 67 | def carregar_excecoes_plural(self): |
52 | '''Carrega arquivo de exceções de plural. | 68 | '''Carrega arquivo de exceções de plural. |
53 | ''' | 69 | ''' |