| Algorithm 1 Latent Dirichlet Allocation Generative Process | |
| 1. | For each document w in a corpus D: |
| 1.1 | Choose |
| 1.2 | Choose |
| 1.3 | For each of the N words wn: |
| 1.3.1 | Choose a topic |
| 1.3.2 | Choose a word wn from , a multinomial probability related to the topic zn |