I am trying to translate Ukrainian and Russian hashtags from the Twitter REST API. When I pass the vector to translateR I get the following error:
Warning message:
The content appears to be in RUSSIAN-KOI8_R. However, the language code you provided
suggests that the text is in UKRAINIAN. If you entered the wrong language code, stop
the process. Otherwise, translateR will treat the text as UKRAINIAN.
Script:
library('translateR')
Shell script to translate Ukrainian and Russian Hashtags
I am trying to translate Ukrainian and Russian hashtags from the Twitter REST API. When I pass the vector to translateR I get the following error:
Warning message: The content appears to be in RUSSIAN-KOI8_R. However, the language code you provided suggests that the text is in UKRAINIAN. If you entered the wrong language code, stop the process. Otherwise, translateR will treat the text as UKRAINIAN.
Script:
library('translateR')
Shell script to translate Ukrainian and Russian Hashtags
ht=read.csv('hashtag_100.csv',stringsAsFactors=FALSE)
google_api_key='AIzaSyAl0hpfIYlOca3iEPjra6mgbtfRemtOxYo' microsoft_id='CASOS_translator' microsoft_secret='GgNh291hhbsp6evumeYFyYgW6p2SSJ3cRNQxmKLYFAY' translate(content.vec=ht$x,google.api.key=google_api_key,source.lang='uk',target.lang='en')
"x" "донецк" "украина" "ато" "ukraine" "новости" "россия" "banderakaratel" "крым" "горловка" "freesavchenko" "україна" "днр" "новини" "mh17" "одесса" "vata_v_ban" "путин" "євромайдан" "russia" "авдеевка" "сбу" "харьков" "луганск" "донбасс" "рф" "война" "russiainvadedukraine" "порошенко" "славянск" "киев" "лнр" "мариуполь" "київ" "стоптеррор" "москва" "сакварелидзегенпрокурор" "мукачево" "крымнаш" "марьинка" "львів" "worldwakeuprussiainvadedukraine" "дзержинск" "news" "тсн" "donetsk" "сша" "rt" "севастополь" "краматорск" "россиястранаfake" "макеевка" "харків" "ukraineunderattack" "донецьк" "крим" "banrussiafromswift" "дебальцево" "рада8" "putin" "крымреалии" "полк_азов" "саакашвили" "electricyerevan" "днепр" "майдан" "ukrop" "euromaidan" "бандеракаратель" "війна" "русскиймир" "зрада" "апутінхуйло" "савченко" "kyiv" "вата" "мо" "широкино" "обсе" "putinkiller" "нетособомустатусудонбасса" "евромайдан" "царнаев" "crimea" "докучаевск" "minsk" "ахметовакответу" "russiakilledmh17" "апутинхуйло" "всу" "stoprussianaggression" "205округ" "всеплохо" "санкции" "юмор" "подмосковье" "днепропетровск" "belarus" "запорожье" "донбас" "twiby"