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.
- Ferenc Nagy
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Inspect the geographical database example
Ajivic,
Inspect the geographical database example of the PDC Prolog.
Inspect the geographical database example of the PDC Prolog.
- Attachments
-
- PDC_PROLOG_GEOBASE.ZIP
- (9.89 KiB) Downloaded 449 times
TIA, Regards,
Frank Nagy
Frank Nagy
- Ferenc Nagy
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
Some more words of Geobase
Hello Ajivic,
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.
English input:
- "Which is the longest river of the United States of America"
Word by word translation:
-"Melyik vannakja?
The copula falls out, word order changes, suffixes appear.
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.
English input:
- "Which is the longest river of the United States of America"
Word by word translation:
-"Melyik vannakja?
The copula falls out, word order changes, suffixes appear.
TIA, Regards,
Frank Nagy
Frank Nagy