프로그래밍 Programming
12. 등장빈도 및 단어간 상관도에 의거한 term 조회 Identifying Frequent Items and Associations
문장전달자
2014. 11. 25. 19:49
728x90
등장빈도에 따른 term 조회는 findFreqTerms()를 이용한다.
> findFreqTerms(dtm,lowfreq=1000) // 최소 1,000번 이상 등장한 term, 없다.
character(0)
> findFreqTerms(dtm,lowfreq=10) // 10번 이상 나온 term
[1] "about" "all" "and" "but" "draft" "have" "that" "the" "this"
[10] "will" "you"
We can also nd associations with a word, specifying a correlation limit.
특정 단어와의 상관도를 기준으로한 조회도 가능하다.
findAssocs() 를 이용하는 것으로, 두 단어가 항상 같이 등장하면 그 값은 1.0 그리고 절대 같이 등장하지 않으면 0.0 이다.
이를 통해 두 단어가 해당 corpus 내에서 얼마만큼의 상관성을 가지는지 알 수 있다.
> findAssocs(dtm, "way", corlimit=0.78)
way
yes. 0.85
strickland: 0.81
able 0.78
about 0.78
about, 0.78
absence 0.78
728x90