Open kbseah opened 7 months ago
Implemented in v0.4.0:
%extend
directives to modify common grammar for individual romanization schemesPotential future enhancements:
Intermediate translator to convert each parse tree to a common abstract parse tree structure, to deal with the many-to-many conversion issue.
Ideal:
Input text --> scheme-specific parse tree --> common parse tree --> scheme-specific translator --> output
Could we automatically generate parser and translator code from the parser grammar rules (!!)?
Currently, input text is directly parsed to common parse tree with hacky preprocessing steps. Translation rules are implicit in the translator code, but would be helpful to have some abstract representation that is more quickly comprehensible and be more easily configured by users.
Three layers:
By separating the logic, we can do the following: