Unverified Commit 485da722 authored by Yohei Tamura's avatar Yohei Tamura Committed by GitHub
Browse files

fix error class instantiation (#6634)

parent 4230d30f
......@@ -199,7 +199,7 @@ class MecabTokenizer:
try:
import fugashi
except ModuleNotFoundError as error:
raise error(
raise error.__class__(
"You need to install fugashi to use MecabTokenizer."
"See https://pypi.org/project/fugashi/ for installation."
)
......@@ -211,7 +211,7 @@ class MecabTokenizer:
try:
import ipadic
except ModuleNotFoundError as error:
raise error(
raise error.__class__(
"The ipadic dictionary is not installed. "
"See https://github.com/polm/ipadic-py for installation."
)
......@@ -222,7 +222,7 @@ class MecabTokenizer:
try:
import unidic_lite
except ModuleNotFoundError as error:
raise error(
raise error.__class__(
"The unidic_lite dictionary is not installed. "
"See https://github.com/polm/unidic-lite for installation."
)
......@@ -233,7 +233,7 @@ class MecabTokenizer:
try:
import unidic
except ModuleNotFoundError as error:
raise error(
raise error.__class__(
"The unidic dictionary is not installed. "
"See https://github.com/polm/unidic-py for installation."
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment