์ƒˆ์†Œ์‹

๐ŸŒ  Trouble Shooting

Konlpy o matching overloads found for constructor java.lang.Boolean(bool) ์—๋Ÿฌ ํ•ด๊ฒฐ๋ฒ•

  • -

๋‰ด์Šค ์ •๋ณด๋“ค์„ ํฌ๋กค๋งํ•˜์—ฌ ํ˜•ํƒœ์†Œ ๋ถ„์„ํ•œ ๋’ค, ๋นˆ๋„์ˆ˜๊ฐ€ ๊ฐ€์žฅ ๋†’์€ ๋‹จ์–ด๋ฅผ ์ถ”์ถœํ•˜๊ธฐ ์œ„ํ•ด,

konlpy๋ผ๋Š” ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ–ˆ์Šต๋‹ˆ๋‹ค.

 

1
2
3
4
5
6
7
8
# -*- coding: cp949 -*-
from konlpy.tag import Twitter
 
sentance = "์ €๋Š” 21์‚ด ํ•™์ƒ์ž…๋‹ˆ๋‹ค~"
twt = Twitter()
tagging = twt.pos(sentance)
 
print(tagging)
 

์ฝ”๋“œ๋Š” ์ด๋ ‡๊ฒŒ ์ž‘์„ฑํ•˜์˜€์Šต๋‹ˆ๋‹ค. ์‹คํ–‰์‹œํ‚ค์ž๋งˆ์ž ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ–ˆ๋Š”๋ฐ

 

jupyter notebook์—์„œ ์‹คํ–‰ํ•  ๋• 

์ด๋ ‡๊ฒŒ No matching overloads found for constructor java.lang.Boolean(bool), options are: public java.lang.Boolean(java.lang.String) public java.lang.Boolean(boolean)์—๋Ÿฌ๊ฐ€ ๋–ด์Šต๋‹ˆ๋‹ค.

 

ํ˜น์‹œ ๋ชฐ๋ผ์„œ cmd์—์„œ python์„ ์‹คํ–‰์‹œ์ผœ ์ฝ”๋“œ๋ฅผ ์ž‘์„ฑํ•ด๋ณด๋‹ˆ

 

warn('"Twitter" has changed to "Okt" since KoNLPy v0.4.5.')
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\bsjo9\AppData\Local\Programs\Python\Python37\lib\site-packages\konlpy\tag\_okt.py", line 17, in Twitter
    return Okt(jvmpath)
  File "C:\Users\bsjo9\AppData\Local\Programs\Python\Python37\lib\site-packages\konlpy\tag\_okt.py", line 91, in __init__
    jvm.init_jvm(jvmpath, max_heap_size)
  File "C:\Users\bsjo9\AppData\Local\Programs\Python\Python37\lib\site-packages\konlpy\jvm.py", line 67, in init_jvm
    convertStrings=True)
  File "C:\Users\bsjo9\AppData\Local\Programs\Python\Python37\lib\site-packages\jpype\_core.py", line 227, in startJVM
    _jpype.startup(jvmpath, tuple(args), ignoreUnrecognized, convertStrings)
RuntimeError: java.lang.ClassNotFoundException: org.jpype.Utility

 

์š”๋Ÿฐ ์—๋Ÿฌ๊ฐ€....

 

์ €๋Š” ํ•ญ์ƒ ์—๋Ÿฌ ๋‚ด์šฉ์„ ๋ณผ๋•Œ ๋งˆ์ง€๋ง‰์ค„์„ ๊ตฌ๊ธ€์— ๋ณต๋ถ™ํ•ด์„œ ๋‹ต์„ ์–ป์Šต๋‹ˆ๋‹ค.

๊ทธ๋ž˜์„œ ํ•ญ์ƒ ๊ทธ๋ž˜์™”๋“ฏ ๊ตฌ๊ธ€๋ง์„ ํ•œ ๊ฒฐ๊ณผ, 

์ž๋ฐ” 1.7๋กœ ์—…๋ฐ์ดํŠธ, JPype ๋ฅผ ์—…๋ฐ์ดํŠธ ๋“ฑ๋“ฑ ๋ฉ”๋‰ด์–ผ๋Œ€๋กœ ํ•ด๋ณด์•˜์ง€๋งŒ ์—๋Ÿฌ๋Š” ๋™์ผํ•˜๊ฒŒ ํ„ฐ์ง€๊ณ  ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค..,..

 

๊ทธ๋ž˜์„œ cmd python ์—๋Ÿฌ๋ฅผ ์œ„์—์„œ๋ถ€ํ„ฐ ์ฐฌ์ฐฌํžˆ ์‚ดํŽด๋ณธ ๊ฒฐ๊ณผ ,

warn('"Twitter" has changed to "Okt" since KoNLPy v0.4.5.') 

์ด ์ด๋ถ€๋ถ„์„ ๋ณด๊ฒŒ ๋˜์—ˆ์Šต๋‹ˆ๋‹ค!!

 

๊ทธ๋ž˜์„œ ์ฝ”๋“œ๋ฅผ

1
2
3
4
5
6
7
# -*- coding: cp949 -*-
from konlpy.tag import Okt
 
sentance = "์ €๋Š” 21์‚ด ํ•™์ƒ์ž…๋‹ˆ๋‹ค~"
twt = Okt()
 
 
 

 

์ด๋ ‡๊ฒŒ ๋ฐ”๊พธ์–ด ๋ณด๋‹ˆ ๊น”๋”ํ•˜๊ฒŒ ํ•ด๊ฒฐํ–ˆ์Šต๋‹ˆ๋‹ค ใ…Žใ…Žใ…Ž

 

์˜ค๋Š˜์˜ ๊ตํ›ˆ์€ ์—๋Ÿฌ๋ฉ”์‹œ์ง€๋Š” ๊ผผ๊ผผํ•˜๊ฒŒ ์ฝ์–ด๋ณด๊ธฐ๋„ ํ•ด์•ผํ•œ๋‹ค ๋„ค์š”...ใ…‹ใ…‹ใ…‹ใ…‹

Konlpy๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์‚ฌ์šฉํ•˜์‹œ๋ ค๋‹ค ์ €๋ž‘ ๋˜‘๊ฐ™์€ ์—๋Ÿฌ๋•Œ๋ฌธ์— ๊ณ ์ƒํ•˜์‹œ๋Š” ๋ถ„๋“ค

์ด ๊ธ€์ฝ๊ณ  ๊ท€์ค‘ํ•œ ์‹œ๊ฐ„๋‚ญ๋น„ ์•ˆํ•˜์…จ์œผ๋ฉด ํ•ด์š”~

'๐ŸŒ  Trouble Shooting' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

Konlpy Mecab ์„ค์น˜ ๋ฐฉ๋ฒ•  (0) 2020.02.22
Contents

ํฌ์ŠคํŒ… ์ฃผ์†Œ๋ฅผ ๋ณต์‚ฌํ–ˆ์Šต๋‹ˆ๋‹ค

์ด ๊ธ€์ด ๋„์›€์ด ๋˜์—ˆ๋‹ค๋ฉด ๊ณต๊ฐ ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค.