시작하기무료로 시작하기

사용자 지정 불용어 추가하기

twitter_data에서 정보성이 떨어져 최종 단어 목록에서 제거해야 할 단어들이 여럿 보였어요. 이번 연습에서는 몇몇 단어를 custom_stop_words 데이터 프레임에 추가하겠습니다.

이 연습은 강의의 일부입니다

R로 시작하는 텍스트 분석

강의 보기

연습 안내

  • 사용자 지정 불용어용 새 데이터 프레임의 열 이름은 stop_words와 같아야 해요.
  • http, win, t.co를 사용자 지정 불용어로 추가하세요.
  • 사용자 지정 불용어를 stop_words에 행 방향으로 바인딩하세요.

실습형 인터랙티브 연습

이 예제를 이 샘플 코드를 완성하여 풀어보세요.

custom_stop_words <- tribble(
  # Column names should match stop_words
  ___, ___,
  # Add http, win, and t.co as custom stop words
  ___, "CUSTOM",
  ___, "CUSTOM",
  ___, "CUSTOM"
)

# Bind the custom stop words to stop_words
stop_words2 <- stop_words %>% 
  ___(___)
코드 편집 및 실행