1

Проблема с translate() из пакета translateR

Простой код:

library(translateR)
translate(dataset = NULL, 
          content.field = NULL, 
          content.vec = 'Hi', 
          google.api.key = NULL, 
          microsoft.client.id = my.microsoft.client.id, 
          microsoft.client.secret = my.microsoft.client.secret, 
          source.lang = 'no', 
          target.lang = 'de')

выдает ошибку:

Error in translate(dataset = NULL, content.field = NULL, content.vec = "Hi", : unused arguments (dataset = NULL, content.field = NULL, content.vec = "Hi", google.api.key = NULL, microsoft.client.id = my.microsoft.client.id, microsoft.client.secret = my.microsoft.client.secret, source.lang = "no", target.lang = "de")

Подскажите, что не так в моем коде.

1 ответ 1

2

Согласно Help:

microsoft.client.id --- To use the Microsoft API, a client id and a client secret value must be provided. For more information on getting these, see http://msdn.microsoft.com/en-us/library/hh454950.aspx. NOTE: you do not need to obtain an access token. translateR will retrieve a token internally.

microsoft.client.secret --- To use the Microsoft API, a client id and a client secret value must be provided. For more information on getting these, see http://msdn.microsoft.com/en-us/library/hh454950.aspx. The client secret value is a unique identifying string obtained when registering with Microsoft (see the link for more information). NOTE: you do not need to obtain an access token. translateR will retrieve a token internally.

Ты должен присвоить объектам microsoft.client.id и microsoft.client.secret информацию о своем id и секретном коде, которые тебе присвоил Майкрософт.

Ваш ответ

By clicking “Отправить ответ”, you agree to our terms of service and acknowledge you have read our privacy policy.

Всё ещё ищете ответ? Посмотрите другие вопросы с метками или задайте свой вопрос.