Reputation: 49
I really have a hard time trying to translate 1.5k responses to an open ended question from french to english. I want to use the R-Package "translateR" with the Microsoft-API. Microsoft because I got an Azure-Account due to my University without the need of spending Creditcard-Information.
Actually I am not sure if I am doing it wrong because of beeing unable to fill in the right parameter for "client id" and "client secret" or if its just outdated package which does not work with Microsoft API anymore due to migration by Microsoft or something. I researched some similar questions at stackoverflow but did not found any answer or solution already.
Here is some code to maybe replicate the problem. An exampledataset is used which is integrated in "translateR".
#install.packages("translateR")
library(translateR)
data(enron)
google.dataset.out <- translateR::translate(dataset = enron,
content.field = 'email',
microsoft.client.id = my.client.id,
microsoft.client.secret = my.client.secret,
source.lang = 'en',
target.lang = 'de')
I am constantly getting this output:
Error in function (type, msg, asError = TRUE) :
Could not resolve host: datamarket.accesscontrol.windows.net
I am quite new to using R-Language, pls be kind if I did something totaly stupid. Can anyone confirm that it is not possible to use "translateR" with microsoft API anymore? Can anyone give me advise how to deal with my data if translation is not possible with the package anymore?
Upvotes: 2
Views: 2669
Reputation: 49
The R-Package is outdated but the development version has been updated more recently. For installation the package "devtools" needs to be installed before using the following command:
###Install devtools###
install.packages("devtools")
###Install development version of translateR###
devtools::install_github("ChristopherLucas/translateR")
Within the development version the commandsyntax changed aswell.
library(translateR)
data(enron)
dataset.out <- translateR::translate(dataset = enron,
content.field = 'email',
microsoft.api.key = 'my.ms.api.key',
source.lang = 'en',
target.lang = 'de')
For more information read this:
translateR documentation update on github
Upvotes: 2