Page 1 of 1

traductor spanish to english

Posted: Fri Jul 25, 2008 2:33 pm
by javipalma
Friends.
Im making a traductor spanish to english.

I have a DB with this words (example)

KEYSPN (SPANISH KEYWORD) - KEY_ENG (ENGLISH TRADUCTION)
chicos child
mujer woman
aires air
buenos good
buenos aires buenos aires


i have this query in a search box = "chicos buenos of buenos aires"

To do the traduction of this string i do a query split by " " (blank space) and i get an array like this

[] = "chicos"
[] = "buenos"
[] = "de"
[] = "buenos"
[] = "aires"

The problem is that i need my script recognize "whole words",
For example
if i make a word by word traduction i get = "child good of good air".
but i need:
"child good of buenos aires"

I need that my script recognize "BUENOS AIRES" like a "whole word" not like 2 split strings
Have idea??
Thanks!!!

Re: traductor spanish to english

Posted: Fri Jul 25, 2008 3:12 pm
by Christopher
Translation is more complicated than that. You should do some research on translation parsers. Or use web services and something like Google.

Re: traductor spanish to english

Posted: Fri Jul 25, 2008 4:26 pm
by javipalma
Dear Christopher
I dont want enter in the words traslation subject, i know it is complicated.
If i could know how make a traslation of a whole word like "buenos aires" and get "buenos aires" and NOT "good air", this will be very helpfull.
For example a idea is:

query="chicos buenos de buenos aires"

i check every secuence of string..

chicos buenos de buenos aires (no match)
chicos buenos buenos de buenos (no match)
chicos buenos de (no match)
chicos buenos (no match)
chicos buenos (no match)
chicos (match)
//I continue with the following
buenos de buenos aires (no match)
buenos buenos de (no match)
buenos buenos (no match)
buenos (match)
//I continue with the following
de buenos aires (no match)
de buenos (no match)
de (match)
//I continue with the following
buenos aires (match)
Finish

this be a solution but I think it would take much if there are several words in the query.
Your you think?

Re: traductor spanish to english

Posted: Fri Jul 25, 2008 6:27 pm
by Christopher
It seems like it would be better to store whether each word started a sequence. So "buenos" would have an entry that if followed by "aires" then don't translate. But you will still need context because "buena vista", for example, could be a city or just mean "good view".