This code generates a bipartite graph representation of the Mallet topic modelling topic composition output. This file can be generated by passing the --output-doc-topics
parameter to the Mallet topic modelling command.
Running this code generates two CSV files:
- A node list
- An edge list
These two files can be imported into the Gephi tool using the Import Spreadsheet function available in the Data Laboratory tab.