grammatical and semantic
Grammar is the study of describing how words and their component parts combine to form sentences. Sometime if you want to make a perfect sentence from the grammar you made, you would find that the meaning of the sentence is something both funny and annoying.
If you are trying to machine-translate some languages just according to the grammar rules, you are just doing garbage research.
The ideal way is to combine semantic information or semantic meaning with grammar rules.