Browse Source

Update text.py

master
Yener GitHub 6 years ago
parent
commit
946be54041
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      jiagu/cluster/text.py

+ 1
- 3
jiagu/cluster/text.py View File

@@ -1,6 +1,4 @@
# coding: utf-8
from collections import OrderedDict

from .base import count_features, tfidf_features
from .dbscan import DBSCAN
from .kmeans import KMeans
@@ -48,7 +46,7 @@ def text_cluster(docs, features_method='tfidf', method="dbscan",
else:
raise ValueError("method invalid, please use 'k-means' or 'dbscan'")

clusters_out = OrderedDict()
clusters_out = {}

for label, examples in clusters.items():
c_docs = []


Loading…
Cancel
Save