Topic modeling is a machine-learning method.
“Machine learning” means that the program is designed to identify patterns (rather than defining them from the outset). In topic modeling, the patterns concern the occurrence of words across a large corpus, and they are called “latent” because their appearance depends on the application of the computer algorithm. The patterns relate to the likelihood or probability of words occurring together in the same document, with this co-occurrence of words is referred to as a “topic”. One good thing about topic modeling is that it can show the same word as having different meanings depending on the other words that (are likely to) co-occur in the same document. For example, all of the below topics feature the word “blood” quite prominently, but it has different meanings depending on whether it is alongside words about king, church and people (lineage), men, battle, and killed (bloodshed), or strange night-time horrors (bloodcurdling).