2

I am using R in RStudio. I have a data frame (df1) with 3 columns. One of the columns (comments) contain free texts.

I need to add a new column which will detect the language used in the "Comments" column. The data will not be used for sentiment analysis or any further analysis in R.

My next steps would be to create a new data frame from the above and export it as an Excel file.

Extract of data frame df1:

Reviewer    ReviewDate  Comments
1            Jan 20     Отдыхали с семьей в ноябре 2019г. Брали виллу. Просторная, со своим бассейном и двориком. Обслуживание просто класс, у каждой виллы свой дворецкий, поэтому любой вопрос решался очень быстро. Территория отеля шикарная.Еда вкусная и разнообразная. Хочу отметить качественную и оперативную работу менеджеров Сурена и Андрея. Вот именно такой подход к клиенту делает отдых незабываемым. Спасибо за прекрасный отдых!!!
2            Jan 20     We really enjoyed our stay and we loved the breakfast in particular it was beautifully presented and tasted good. We liked the idea of the water bottles that came in really useful. The amenities in the room were really nice especially the body scrub. Dinner was good too but service at lunch or dinner was quite slow and not as attentive as during breakfast.
3            Feb 20      IT is well known for being hospitable and we were given a warm welcome during our school visit. Keep on the good work. Thank you for every thing.
4            Feb 20      Стильный, красивый, с современной и полезной кухней, с прекрасным небольшим пляжем, уютный. Внимание персонала безупречное (отдельный привет и спасибо Мелани), большие и современные номера (без телевизора), косметика восхитительна......Был идеален для меня. Спасибо команде и вы не зря заслужили наград
5            Jan 20      10 jours parfaitschambre spacieuse et très bien agencée pour de longs séjourstrès bonne restaurationplage magnifiqueanimation au bar très sympaservice plutôt agréable Un grand merci à Antoine pour son implicationtrès bonne conciergerieNous reviendrons!
6            Feb 20       Trattamento speciale e delizioso dallo staff in particolare da Sanjay, sempre attento e premuroso. Situazione ideale per vacanza e lavoro. Ottimo rapporto qualità prezzo. Rispetto della natura con prodotti locali bio. Peccato partire.  Ci ritorneremo sicuramente.
7            Jan 20       Nous avons tout aimé: la gentillesse des personnes, la délicatesse et générosité des attentions, le soin apporté à limiter le gâchis, avec distribution de gourde réutilisable à notre arrivée par exemple, le Spa, les petits déjeuners et dîner fabuleux au bord de l’eau, tous les produits sont locaux et de qualité. Les cours de sport, sur l’eau ou au bord de l’eau, le yoga, stretching, foot sur la plage, kayak, snorkeling...

Expected Output: To have a new column in the above data frame called "Language".

I had a look at R packages like cld3, googleLanguageR but they seem to be overkill for my task at hand.

Which R package can help me achieve what I'm after?

zx8754
  • 52,746
  • 12
  • 114
  • 209
user3115933
  • 4,303
  • 15
  • 54
  • 94

0 Answers0