Skip to content

Commit

Permalink
Change order of warning message in text (again)
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofuturiste committed Aug 23, 2023
1 parent 51e4f20 commit a0bf85c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lessons/tmpython.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,11 @@ lda_model = gensim.models.ldamodel.LdaModel(corpus=corpus,
# Print topics
lda_model.show_topics()
```
{: .warning}
> If you are not using Spyder via Anaconda, you may need to use `print(lda_model.show_topics())` instead of `lda_model.show_topics()` if you do not get any output from running the lines above.
Select the lines of code above and run the using the `F9` key. It should output a list of topics: clusters of words with their respective weights.

{: .warning}
> If you are not using Spyder via Anaconda, you may need to use `print(lda_model.show_topics())` instead of `lda_model.show_topics()` if you do not get any output from running the lines above.
<img src="../assets/img/tmpython/py-print-topics.png" alt="a screenshot of the values output by the lda_model.show_topics() line" width="100%">

The first time you run the code will be similar to a round of exploratory data analysis: you might find some interesting results but you are more likely to observe areas for improvement in your preprocessing steps. For example, do you need to go back to step 4. to remove some additional stopwords? Or do you have a lot of noise in the form of shorter terms, which can be addressed in step 6 with `min_len` in Gensim. Make your adjustments, and run the code from the beginning (`F5`).
Expand Down

0 comments on commit a0bf85c

Please sign in to comment.