Page 1 of 1
prolog code that translate a sentence.
Posted: 7 Dec 2013 9:13
i have problem creating a prolog code that accept a sentence from user, convert to word in List, and then translate each word to another language already specified in the dictionary. e.g Malay to English.
if a word do not exist in d dictioary, then it remain thesame on the output stream.
Thank you. Any help and suggested is welcome.
Inspect the geographical database example
Posted: 10 Dec 2013 13:52
Inspect the geographical database example of the PDC Prolog.
Some more words of Geobase
Posted: 11 Dec 2013 13:26
The program I have attached to my answer does the following tasks.
It has a built-in database of the rivers and mountains of the USA.
You can ask it by English sentences like
- "Which is the longest river of the USA?"
- "How long is the Colorado?".
The program makes a list of words from your questions.
It deletes the unnecessary articles and copulas.
So the cleaned lists will be ["longest","river"]; ["long","Colorado"]; respectively.
Maybe it reorders the lists.
I recommend you inspect how it executes the simplification.
A big question remains: Is the Malay language so isolating like the English?
What happens if you put the translated words one after the other?
Will a native Malay speaker understand it?
In the case of Hungarian the answer is a definite NO.
- "Which is the longest river of the United States of America"
Word by word translation:
The copula falls out, word order changes, suffixes appear.