We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aaa92e2 commit 4b90c20Copy full SHA for 4b90c20
examples/text_mining.py
@@ -5,7 +5,14 @@
5
6
df = pd.read_json('datasets/text/artm_test_dataset.json', orient='records')
7
documents = df['text'].tolist()
8
-corpus = Corpus.from_list(documents)
+
9
+try:
10
+ corpus = Corpus.from_list(documents)
11
+except LookupError:
12
+ import nltk
13
+ nltk.download('punkt')
14
+ nltk.download('stopwords')
15
16
17
algorithm = ParticleSwarmOptimization(population_size=200, seed=123)
18
metrics = ('support', 'confidence', 'aws')
0 commit comments