步驟 2:辨識文字來源
員工評論可能來自多種來源。若人資部門有足夠資源,你可以委託第三方舉辦焦點團體,訪談公司內部員工以及競爭對手的員工。
Forbes 與其他媒體會發表「最佳雇主」相關文章,可能會提到 Amazon 與 Google。另一個資訊來源是匿名的線上評論,例如 Indeed、Glassdoor 或 CareerBliss。
這裡我們將聚焦於一組匿名的線上評論。
本練習屬於課程
R 的 Bag-of-Words 文本探勘
練習說明
- 使用
str()檢視amzn的結構,以取得資料的維度與預覽。 - 從正面評論欄位
amzn$pros建立amzn_pros。 - 從負面評論欄位
amzn$cons建立amzn_cons。 - 使用
str()列印goog的結構,以取得資料的維度與預覽。 - 從正面評論欄位
goog$pros建立goog_pros。 - 從負面評論欄位
goog$cons建立goog_cons。
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Print the structure of amzn
___
# Create amzn_pros
___ <- ___
# Create amzn_cons
___ <- ___
# Print the structure of goog
___(___)
# Create goog_pros
___ <- ___
# Create goog_cons
___ <- ___