Conversation
…ructure utils/fst/att and changes in makefile
umoqnier
left a comment
There was a problem hiding this comment.
Dejo un par de comments pero en general se ve bastante bien. Buenos docstrings 💯 . Me queda duda si al final no agregamos mas tests y si corrieron los que existen para ver que todo este ok con el código existente que modificaron o que clase de pruebas hicieron para ver que no rompieran nada ❓ Si pueden agregar pantallazos a la descripción del PR para que quede documentado vendría joya :)
No mire demasiado los archivos .att o .lexc se los dejo a @Lguyogiro :p
elotl/otomi/orthography.py
Outdated
| _path_to_orig_fon = p | ||
|
|
||
| _ORIG_FON_FST = ATTFST(_path_to_orig_fon) | ||
| _available_orthographies = ['inali', 'otq', 'ots', "rfe"] |
There was a problem hiding this comment.
Creo que si es una variable global conviene que este en mayúsculas
| _available_orthographies = ['inali', 'otq', 'ots', "rfe"] | |
| _AVAILABLE_ORTHOGRAPHIES = ['inali', 'otq', 'ots', "rfe"] |
elotl/otomi/orthography.py
Outdated
| print(normalized_ort + " is not a supported orthography.") | ||
| print("Using 'inali' as orthography.") |
There was a problem hiding this comment.
Creo que esto podría ir con logs como un warning ¿no?
There was a problem hiding this comment.
ya quedó como warning :)
elotl/otomi/config.py
Outdated
| # | ||
| DEFAULT_LANG_CODE = "ote" | ||
| SUPPORTED_LANG_CODES = ["ote"] | ||
| SUPPORTED_LANG_CODES = ["ote", "inali", "ots", "otq", "rfe"] |
There was a problem hiding this comment.
creo que esto puede ser un poco confuso porque se están mezclando códigos de la lengua (como "ote") con códigos referentes al sistema de ortografía. Creo que sería mejor cambiar el nombre de este variable o mover los códigos de las ortografías a otra lista. creo que con el Nahuatl hay algo como _available_orthographies aparte de las opciones de "language codes" o algo así.
There was a problem hiding this comment.
debo mencionar que lo de los "LANG_CODES" es para cuando tenemos analizadores morfológicos para distintas variantes de una lengua.
…LE_ORTHOGRAPHIES and DEFAULT_ORTHOGRAPHY in normalizers
…es()` in morphology files.
|
Se hicieron los siguientes cambios
Cambios faltantes:
|
umoqnier
left a comment
There was a problem hiding this comment.
En general está bien. Dejé unos coments con sugerencias y dudas. Resolviendo esto de mi lado estaría ok
elotl/nahuatl/morphology.py
Outdated
| else: | ||
| if lang_code not in SUPPORTED_LANG_CODES: | ||
| logger.error("Unsupported language variant specified.") | ||
| #logger.error("Unsupported language variant specified.") |
There was a problem hiding this comment.
no jeje, lo descomento
| _path_to_att_dir = pkg_resources.files("elotl.nahuatl.data").joinpath(f"{self.lang_code}.mor.att") | ||
| _path_to_tsv_dir = pkg_resources.files("elotl.nahuatl.data").joinpath(f"{self.lang_code}.mor.tsv") |
Co-authored-by: Diego Alberto Barriga Martínez <dbarriga@ciencias.unam.mx>
Co-authored-by: Diego Alberto Barriga Martínez <dbarriga@ciencias.unam.mx>
Co-authored-by: Diego Alberto Barriga Martínez <dbarriga@ciencias.unam.mx>
Que yo me acuerde, sí funcionaban al principio pero ya se han metido muchos cambios desde que se establecieron y al parecer no siempre corríamos los tests jaja. cuando tenga tiempo me pongo a ver esto. |

add normalizer for Otomi with its lexc and att files. Restructure utils/fst/att and changes in makefile
name: Pull request
about:
Please include the next info: