Commit
·
21d27ae
1
Parent(s):
732d800
feat: Add WordCloudExtractor class
Browse files- text_visualization.py +11 -0
text_visualization.py
ADDED
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from sklearn import TfIdfVectorizer
|
2 |
+
import wordcloud
|
3 |
+
from pydantic import BaseModel
|
4 |
+
|
5 |
+
|
6 |
+
class WordCloudExtractor:
|
7 |
+
|
8 |
+
tfidf_params: Dict[str, Any]
|
9 |
+
|
10 |
+
def extract_from_corpus(self, texts: Iterable[str], n_words: int) -> wordcloud.WordCloud:
|
11 |
+
pass
|