You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm currently running your code in my VSCode, and I came across this error:
Traceback (most recent call last):
File "path\name\nlp.py", line 8, in <module>
model = py_vncorenlp.VnCoreNLP(save_dir='/models')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\py_vncorenlp\vncorenlp.py", line 53, in __init__
from jnius import autoclass
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\jnius\__init__.py", line 18, in <module>
java = get_java_setup(sys.platform)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\jnius\env.py", line 60, in get_java_setup
JAVA_HOME = get_jdk_home(platform)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user\AppData\Local\Programs\Python\Python312\Lib\site-packages\jnius\env.py", line 335, in get_jdk_home
raise Exception('Unable to find JAVA_HOME')
Exception: Unable to find JAVA_HOME
I really don't get it. Please help.
P/S: The code I'm using:
import py_vncorenlp
import os
import shutil
# Load VnCoreNLP model
model = py_vncorenlp.VnCoreNLP(save_dir='/models')
# Annotate a raw text
text = "Ông Nguyễn Khắc Chúc đang làm việc tại Đại học Quốc gia Hà Nội. Bà Lan, vợ ông Chúc, cũng làm việc tại đây."
annotated_text = model.annotate(text)
print(annotated_text)
# Annotate a file
input_file_path = "/input.txt"
output_file_path = "/output.txt"
model.annotate_file(input_file=input_file_path, output_file=output_file_path)
The text was updated successfully, but these errors were encountered:
Hi, I'm currently running your code in my VSCode, and I came across this error:
I really don't get it. Please help.
P/S: The code I'm using:
The text was updated successfully, but these errors were encountered: