textmining-tutorial icon indicating copy to clipboard operation
textmining-tutorial copied to clipboard

튜토리얼 진행상 문제

Open taehyun-lim opened this issue 5 years ago • 5 comments

안녕하세요, 한국어 텍스트 분석을 하고 싶어서 찾아왔습니다. 좋은 패키지 감사합니다. nounextractor-v2_usage.ipynb 튜토리얼을 따라하고 있는데요, 세번째 셀 "%%time noun_extractor = LRNounExtractor_v2(verbose=True, extract_compound=True) noun_extractor.train(sents) nouns = noun_extractor.extract()" 에서 다음과 같은 에러가 납니다: [Noun Extractor] use default predictors [Noun Extractor] num features: pos=3929, neg=2321, common=107 [Noun Extractor] counting eojeols local variable 'f' referenced before assignment 어떻게 해야 할까요? 감사합니다.

taehyun-lim avatar Feb 19 '20 02:02 taehyun-lim

Error message 를 수정하지 않아서 어떤 오류인지 알아보시기 어려웠을거라 생각합니다. 해당 에러는 corpus 를 만들 때 이용한 텍스트 파일의 주소가 틀렸을 때 발생하는 에러입니다. 해당 파일 주소를 다시 한 번 확인해 보시기 바랍니다.

On Feb 19, 2020, at 11:35 AM, limth85 [email protected] wrote:

안녕하세요, 한국어 텍스트 분석을 하고 싶어서 찾아왔습니다. 좋은 패키지 감사합니다. nounextractor-v2_usage.ipynb 튜토리얼을 따라하고 있는데요, 세번째 셀 "%%time noun_extractor = LRNounExtractor_v2(verbose=True, extract_compound=True) noun_extractor.train(sents) nouns = noun_extractor.extract()" 에서 다음과 같은 에러가 납니다: [Noun Extractor] use default predictors [Noun Extractor] num features: pos=3929, neg=2321, common=107 [Noun Extractor] counting eojeols local variable 'f' referenced before assignment 어떻게 해야 할까요? 감사합니다.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lovit/textmining-tutorial/issues/3?email_source=notifications&email_token=AAZ6OZW5FJBTUOLGCEU4RNDRDSLIBA5CNFSM4KXQNVB2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IOP6S4Q, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ6OZX77IQYXWBJSHAK7GDRDSLIBANCNFSM4KXQNVBQ.

lovit avatar Feb 19 '20 11:02 lovit

감사합니다! 해결하였습니다.

제 데이터로 시행해보고 있는데요, 다른건 다 잘되는 것 같은데 몇개의 명사가 추출이 되지 않는 것 같습니다. 예를들어 '고령화가'가 5번 들어있는데 '고령'도 '고령화'도 추출되지 않습니다. '고령화'를 추출할 수 있게 바꿀 수 있는 방법이 혹시 있을까요?

감사합니다!

taehyun-lim avatar Feb 20 '20 01:02 taehyun-lim

명사 추출 방법이 명사의 오른쪽에 등장하는 조사 분포를 이용하기 때문에 알려주신 정보만으로는 정확히 원인을 알지 못합니다. 만약 데이터에서 "고령화" 라는 단어가 여러 개의 조사와 함께 사용된 적이 거의 없다면 (하나의 단어가 하나의 어절을 이루었다면) 해당 방법만으로는 추출하기가 어려울 것입니다. 이는 차후에 다른 모델로 해결해보려 하고 있습니다.

당장의 현실적인 방법은 "N+화" 같은 방법으로 접미사 "화" 앞의 substring 이 명사라면 "N+화"도 명사로 추출하는 방법이 좋을듯합니다. 아니라면 알고리즘을 고쳐야 할 것으로 생각됩니다.

해당 이슈는 따로 soynlp 의 이슈로 등록해두도록 하겠습니다. 레포팅 해주셔서 감사합니다.

Hyunjoong Kim

github : https://github.com/lovit/ blog : https://lovit.github.io/

2020년 2월 20일 (목) 오전 10:05, limth85 [email protected]님이 작성:

감사합니다! 해결하였습니다.

제 데이터로 시행해보고 있는데요, 다른건 다 잘되는 것 같은데 몇개의 명사가 추출이 되지 않는 것 같습니다. 예를들어 '고령화가'가 5번 들어있는데 '고령'도 '고령화'도 추출되지 않습니다. '고령화'를 추출할 수 있게 바꿀 수 있는 방법이 혹시 있을까요?

감사합니다!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lovit/textmining-tutorial/issues/3?email_source=notifications&email_token=AAZ6OZSJUX6KT5ZGHFLTZKLRDXJMTA5CNFSM4KXQNVB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMKKU5Y#issuecomment-588556919, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ6OZRVI5T3RBILOXQ3ME3RDXJMTANCNFSM4KXQNVBQ .

lovit avatar Feb 20 '20 02:02 lovit

말씀하신대로 '고령화'에 다른 조사들도 붙여보니 추출이 되네요. 감사합니다!

taehyun-lim avatar Feb 20 '20 02:02 taehyun-lim

저도 감사합니다.

Hyunjoong Kim

github : https://github.com/lovit/ blog : https://lovit.github.io/

2020년 2월 20일 (목) 오전 11:48, limth85 [email protected]님이 작성:

말씀하신대로 '고령화'에 다른 조사들도 붙여보니 추출이 되네요. 감사합니다!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/lovit/textmining-tutorial/issues/3?email_source=notifications&email_token=AAZ6OZU6DPDFFM2LNK5OKYTRDXVRNA5CNFSM4KXQNVB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMKQ2JY#issuecomment-588582183, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZ6OZWRNIDCV3L5DLZ52ALRDXVRNANCNFSM4KXQNVBQ .

lovit avatar Feb 20 '20 05:02 lovit