As part of a bigger project I want to implement a machine translator from language A to language B. Since there are not available tools that automatically do machine translation over this set of languages, and the available corpus of language B is quite small, I am trying to do the following:
1. Given a sentence in language A, use a tool to get its set of language A PoS (Part-of-speech) tags.
2. The tool I am using for PoS tagging (Freeling) does not return a parse tree, so I thought on building my own parse tree from the set of tags.
3. After the parse tree is completed, traverse it by levels (starting on the root) and reorder its elements according to the grammar rules of language B.
After doing some research I found out about Earley parsing (whose ability of parsing any language caught my attention because grammar on language B might change overtime, so I cannot guarantee that it will always meet any specific criterion). However, given that my ultimate goal is doing structure transfer I am not sure if using a bottom-up parser and trying to reorder the elements as I match them with the rules would give me a better performance, or if I am on the wrong path and my solution is wrong altogether.
Depending on the source language you are dealing with, FreeLing does provide a parse tree (e.g. for Spanish, English, Catalan, Portuguese...)
If parsing in your language is not supported by FreeLing, you can add it just by writting a grammar. FreeLing includes a CKY parser which will apply your grammar and give you the parse tree.
In this way, you could achieve step 2 "building my own parse tree from the set of tags".
Regarding the transfer, I am not sure the best strategy is reordering on the fly. Probably is better to have the whole tree and perform the transfer aftwerwards.
If your goal is rule-based translation, you can have a look to the open-source translation platform https://www.apertium.org/