오늘은 R 정규표현식 문자 분석하는 방법에 대해 알아보겠습니다. 문자 파싱은 여러 다양한 형태를 요구하기 때문에 정규식을 제대로 이해하고 사용할 줄 알아야 텍스트 마이닝에서 좋은 데이타를 얻을 수 있습니다. 쉼표 등…
문자열의 패턴을 간결하게 기술하는 방식을 정규표현식이라고 합니다. 특정 패턴의 텍스트 분석을 하기 위해서는 해당 표현을 이해하고 작성할 수 있어야 코드양과 비용과 시간을 줄일 수 있습니다. 이제 정규표현식에 대해 살펴보겠습니다. 일반적인…
이전 시간에 이어 R 언어를 활용하여 영화 시나리오 분석하는 프로젝트를 진행해보도록 하겠습니다. R 영화 시나리오 씬구분 작업을 진행해보겠습니다. 로딩한 시나리오 샘플데이타를 씬 별로 분류해서 데이타를 생성하는 방법을 알아보겠습니다. 시나리오 로딩에…
R을 활용하여 영화 시나리오 분석하는 프로젝트를 진행해보도록 하겠습니다. 데이타 분석에 많이 활용하는 R 언어를 이용해보고자 합니다. 먼저 R 영화 시나리오 로딩을 진행해보겠습니다. 작업 디렉토리를 설정하고 대본의 형식을 간략히 살펴본 후…
R 토픽 모델링이란 LDA 알고리즘을 활용해 문서를 특정 토픽으로 분류하고 문서들을 나누는 기법입니다. 문서의 의미와 맥락을 이해하는 되며 LDA는 토픽 모델링에 가장 많이 사용되는 방법입니다. 1. 토픽 모델링 개념 알아보기…
R로 하는 감정 분석에 대해 알아보겠습니다. 감정분석할 텍스트를 로딩한 후 긍정 https://github.com/park1200656/KnuSentiLex 1. 감정 사전 활용하기 문장의 감정 점수 구하기 2. 단어에 감정 점수 부여하기 3. 문장별로 감정 점수 합산하기…
두 텍스트를 비교 분석하기 위해 합치는 과정이 필요합니다. 각 텍스트를 불러와서 합친 후 여러가지 방법으로 텍스트를 비교하는 방법을 알아보도록 하겠습니다. 1. 단어 빈도 비교하기 2. 오즈비-상대적으로 중요한 R 단어 비교하기…
R 형태소 분석기를 활용하여 단어의 빈도수를 확인하는 방법을 알아보도록 하겠습니다. 단어를 추출하고 명사로 분류하여 문장, 글에서 해당 명사가 어떤 비중을 차지하는지 빈도수를 계산해보겠습니다. 1. R 형태소 분석 2. 명사 빈도…
R 단어 빈도 분석에 대해 알아보도록 하겠습니다. R은 텍스트 마이닝에 대한 유용한 라이브러리를 제공합니다. 단어의 빈도수를 확인하여 문장내에서 어떤 비중을 차지하고 있는지 확인해보도록 하겠습니다. 1.텍스트 전처리 2. 토큰화하기 3. R…