3
$\begingroup$

I have the following problem: I have a set of English words which I want to translate to Dutch. Of each words I mined a set of possible translations. For example, for the word "Eighteen" I obtained only one possible Dutch translation: "Achttien", which is correct. However, for other words I obtained multiple translations. For the word "Good" I have the translations "Goed", "Braaf" and "Eerlijk", which are technically correct translations but by far the best and most commonly used translation is only the word "Goed".

For a training set of English words I manually defined the optimal (correct) translation. Using this set I want to train some model to optimally pick for each English word the optimal Dutch word using some predictors. For example, I assume words that are more frequently used are probably better translations than others, and I assume that words that are noted first in a list of translations are probably better translations than others (e.g., in a dictionary, the first translation is usually the best).

So, my data looks something like this:

English     Dutch       Frequency   Order   Correct
---------------------------------------------------
Eighteen    Achttien    800         1       TRUE
Good        Goed        900         1       TRUE
Good        Braaf       500         2       FALSE
Good        Eerlijk     600         3       FALSE
old         bejaard     300         1       FALSE
old         oud         900         2       TRUE

I want to predict the classification in the column Correct. At first I thought a logistic regression could do this, but that does not take into account that each row is not independent. e.g., for each unique value of the column English only one is correct and all others are false. Thus, some other classification method is required.

I was hoping you could point me in the right direction as to what method (or even better, an R package) would be suitable to tackle this problem. I guess this problem occurs more often in Machine Learning but I have no experience in that field.

$\endgroup$
5
  • $\begingroup$ This links to an earlier question on violation of the i.i.d. assumption. $\endgroup$
    – Zhubarb
    Commented Sep 22, 2014 at 10:29
  • $\begingroup$ (1) Are you using just Frequency and Order as features? (2) What is the size of you training set? $\endgroup$ Commented Sep 22, 2014 at 23:28
  • $\begingroup$ I also use levenstein distance between the words as feature, as I expect that the optimal translation often is more similar between languages as well (especially dutch-english: goed-good, oud-old). In the training set I have about 3000 English words that are correctly translated. Each English word has about 1-6 possible Dutch translations to choose from. $\endgroup$ Commented Sep 23, 2014 at 8:50
  • $\begingroup$ Do you mind sharing some or all of your data file? I would be helpful to play with a bit to test my answer. $\endgroup$
    – wwwslinger
    Commented Sep 24, 2014 at 2:59
  • $\begingroup$ What do you call "optimal" translation? Is it the translation which is the most probably correct? $\endgroup$
    – user31264
    Commented Sep 26, 2014 at 4:55

3 Answers 3

1
$\begingroup$

Data can't be handled like that for a problem of this nature. Instead I would model each word like this. Each different existent word is accounted as a separate variable. (you might look up on efficient ways to represent a sparse dataset like this.)

Word        Achttien  Goed  Braaf  Eerlijk  Bejaard  Oud  ... | Class
---------------------------------------------------------     | 
Eighteen       1      0      0       0        0      0         Achttien
Good           0     0.45   0.25    0.3       0      0         Goed
Old            0       0      0       0      0.25   0.75       Oud
...                                                             ...

Normalizing the Frequency variable like I did would be a good idea to avoid scale problems, $freq_{n,i} = \frac{freq_{n,i}}{\sum{_{i=1}^j} (freq_{n,i})}$.

The order variables should also be included, but I would also try some normalization on them, namely by range, like this: $ord_{n,i} = 1 - \frac{ord_{n,i}-1}{max(ord_n) - 1}$. (higher order words are attributed less value).

I would then try to apply different machine learning methods, logistic regression, svm's or even neuronal networks (which will likely cost you much more given the problem dimensions). You might also check out multi class classification (one vs all method), you are gonna need it for this problem.

Hope this answer point you into the right direction.

$\endgroup$
1
$\begingroup$

Frankly, you don't need to worry about i.i.d since you're not concerned with the accuracy of your coefficients or standard errors. I do not intend to be inflammatory, but merely prudent. You will almost certainly fare best if you use an ensemble of trees for your classification. This will maximize the accuracy of your model. Here is some R code that can get you started:

library(gbm) #Gradient Boosted Tree models
df <- read.csv(...)
fit <- gbm(correct ~ frequency + order + levenshteinDist, 
           data=df,
           n.trees=2000,
           interaction.depth=2,
           family='bernoulli')
$\endgroup$
0
$\begingroup$

Unable to comment, so trying to ask a few questions and give some thoughts here.

What kind of model are you using? Since, I don't know this, I will be giving my thoughts in general on this issue.

It is better to incorporate this preference in your translation model itself. In particular, if you are using a probabilistic translation model, you can incorporate the preferable translations of the words using their estimated occurrence probabilities in Dutch data as priors. Further, you can even incorporate context by taking bi-gram probabilities or HMMs, i.e. if Braaf is preferable to Goed when it is preceded/succeeded by a particular word.

If this line of thought is acceptable, I can elaborate.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.