Skip to content

Commit

Permalink
fix(sentiment): specify utf-8 encoding in file open
Browse files Browse the repository at this point in the history
  • Loading branch information
entelecheia committed Apr 7, 2023
1 parent 893f755 commit 9968ff1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ekonlpy/sentiment/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ def get_wordset(self, files):
def get_vocab(self, file):
vocab = {}
vocab_path = os.path.join(LEXICON_PATH, file)
with open(vocab_path) as f:
with open(vocab_path, "r", encoding="utf-8") as f:
for i, line in enumerate(f):
w = line.strip().split()
if len(w[0]) > 0:
Expand Down

0 comments on commit 9968ff1

Please sign in to comment.