{"id":17968385,"url":"https://github.com/travisbrown/itm","last_synced_at":"2025-03-25T09:30:49.045Z","repository":{"id":2988992,"uuid":"4005331","full_name":"travisbrown/itm","owner":"travisbrown","description":"Interactive topic modeling","archived":false,"fork":false,"pushed_at":"2012-05-22T20:39:05.000Z","size":6280,"stargazers_count":24,"open_issues_count":0,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-20T00:40:59.275Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://umiacs.umd.edu/~jbg/docs/itm.pdf","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/travisbrown.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-04-12T14:06:16.000Z","updated_at":"2021-10-08T19:19:45.000Z","dependencies_parsed_at":"2022-08-27T06:41:51.234Z","dependency_job_id":null,"html_url":"https://github.com/travisbrown/itm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fitm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fitm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fitm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/travisbrown%2Fitm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/travisbrown","download_url":"https://codeload.github.com/travisbrown/itm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245435044,"owners_count":20614817,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-29T14:21:11.752Z","updated_at":"2025-03-25T09:30:49.033Z","avatar_url":"https://github.com/travisbrown.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Interactive tree topic modeling\n===============================\n\nYuening Hu, Jordan Boyd-Graber, and Brianna Satinoff.\n[Interactive Topic Modeling](http://umiacs.umd.edu/~jbg/docs/itm.pdf).\n_Association for Computational Linguistics_, 2011.\n\nTopic models have been used extensively as a tool for corpus exploration, and\na cottage industry has developed to tweak topic models to better encode human\nintuitions or to better model data. However, creating such extensions requires\nexpertise in machine learning unavailable to potential end-users of topic\nmodeling software. In this work, we develop a framework for allowing users to\niteratively refine the topics discovered by models such as latent Dirichlet\nallocation (LDA) by adding constraints that enforce that sets of words must\nappear together in the same topic.\n\n------------------------------------------------------------------------------\n\nThe project code has been Mavenified and lightly edited by Travis Brown. All\ndependencies are now managed by Maven and are not packaged with the project.\nThe Java source files have also been moved out of the MALLET namespace, and it\nis no longer necessary to merge them manually with the MALLET source.\n\nCompiling\n---------\n\n[Apache Maven](http://maven.apache.org/) is required to build this project.\nThe following command will download all dependencies (as necessary) and\ncompile the code:\n\n    mvn compile\n\nThe class files will now be available in `target/classes`, and will be used\nwhen you run the `bin/mallet` script in subsequent steps.\n\nImporting documents\n-------------------\n\nThe following command will convert documents into the MALLET format as\ndescribed [in the MALLET documentation](http://mallet.cs.umass.edu/import.php):\n\n    bin/mallet import-dir --input ../../../data/synthetic/synth_word \\\n      --output input/synthetic-topic-input.mallet --keep-sequence\n\nNote that for this synthetic data set we do not use `--remove-stopwords`, but\nin general you would want to include it here. Note also that the `input`\ndirectory contains the `synthetic-topic-input.mallet` file, so you can skip\nthis step and continue directly to the steps below.\n\nGenerating vocabulary file\n--------------------------\n\n    bin/mallet train-topics --input input/synthetic-topic-input.mallet \\\n      --use-tree-lda true --generate-vocab true --vocab input/synthetic/synthetic.voc\n\nGenerating the tree\n-------------------\n\nThe following command requires Python 2, so you may need to change the\n`python` command if Python 3 is the default on your system.\n\n    python tree/ontology_writer_wordleaf.py --vocab=input/synthetic/synthetic.voc \\\n      --constraints=input/empty.cons --write_wordnet=False \\\n      --write_constraints=True --wnname=input/synthetic/synthetic.wn\n\nNote that the constraints file can be empty, in which case the output is a\ntree with symmetric priors, working as in normal LDA.\n\nYou can check the generated tree structure with the following commands (note\nthat Protobuf 2.3 is required):\n\n    cat input/synthetic/synthetic.wn.0 | protoc tree/lib/proto/wordnet_file.proto \\\n      --decode=topicmod_projects_ldawn.WordNetFile \\\n      --proto_path=tree/lib/proto/ \u003e input/synthetic/tmp0.txt\n\n    cat input/synthetic/synthetic.wn.1 | protoc tree/lib/proto/wordnet_file.proto \\\n      --decode=topicmod_projects_ldawn.WordNetFile \\\n      --proto_path=tree/lib/proto/ \u003e input/synthetic/tmp1.txt\n\nTraining the tree topic model\n-----------------------------\n\n    bin/mallet train-topics --input input/synthetic-topic-input.mallet --num-topics 5 \\\n      --num-iterations 300 --alpha 0.5 --random-seed 0 --output-interval 10 \\\n      --output-dir output/model --use-tree-lda True --tree-model-type fast \\\n      --tree input/synthetic/synthetic.wn --tree-hyperparameters input/tree_hyperparams \\\n      --vocab input/synthetic/synthetic.voc --clear-type term --constraint input/empty.cons\n\nResuming the tree topic model\n-----------------------------\n\n    bin/mallet train-topics --input input/synthetic-topic-input.mallet --num-topics 5 \\\n      --num-iterations 600 --alpha 0.5 --random-seed 0 --output-interval 10 \\\n      --output-dir output/model --use-tree-lda True \\\n      --tree input/synthetic/synthetic.wn --tree-hyperparameters input/tree_hyperparams \\\n      --vocab input/synthetic/synthetic.voc --clear-type term --constraint input/empty.cons \\\n      --resume true --resume-dir output/model\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisbrown%2Fitm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftravisbrown%2Fitm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftravisbrown%2Fitm/lists"}