Skip to content

Commit

Permalink
jieba -> cjieba
Browse files Browse the repository at this point in the history
  • Loading branch information
sudoskys committed Sep 6, 2023
1 parent ce73b9b commit 0dd9368
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions middleware/filter/reduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# @Software: PyCharm
from typing import List, Any

import jieba
import cjieba
import numpy as np
from sklearn.cluster import Birch
from sklearn.feature_extraction.text import CountVectorizer
Expand All @@ -26,7 +26,7 @@ def init(self, sentence_list):
for line in sentence_list:
title = line.strip()
self.title_dict[index] = title
output = ' '.join(['%s' % x for x in list(jieba.cut(title, cut_all=False))]).encode('utf-8') # 空格拼接
output = ' '.join(['%s' % x for x in list(cjieba.cut(title, cut_all=False))]).encode('utf-8') # 空格拼接
index += 1
corpus.append(output.strip())
_vectorizer = CountVectorizer()
Expand Down

0 comments on commit 0dd9368

Please sign in to comment.