Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


AutoSense Model for Word Sense Induction

This code was used in the experiments of the research paper

Reinald Kim Amplayo, Seung-won Hwang, and Min Song. AutoSense Model for Word Sense Induction. AAAI, 2019.

The src/models folder contains one Java file containing the GAS class. The GAS (Granularity-Agnostic Sense Model) refers to the AutoSense model. To use the model, create an object of GAS using the following line:

GAS gas = new GAS(data, target, numSenses, numTopics, alpha, beta, gamma);


  • data: is a list of data instances
  • target: is the target word
  • numSenses: is the number of senses hyperparameter
  • numTopics: is the number of topics hyperparameter
  • alpha: is the Dirichlet prior of the topic distribution (set to 0.1 in the paper)
  • beta: is the Dirichlet prior of the sense distribution (set to 0.01 in the paper)
  • gamma: is the Dirichlet prior of the switch distribution (set to 0.3 in the paper)

Then, you would need to run the Gibbs sampler using the following lines of code:


where numIters is the number of iterations (set to 2000 in the paper).

To print the results, use the line:

gas.printSemEval(filename, target);

To cite the paper/code, please use this BibTex:

	Author = {Reinald Kim Amplayo and Seung-won Hwang and Min Song},
	Booktitle = {AAAI},
	Location = {Honolulu, HI},
	Year = {2019},
	Title = {AutoSense Model for Word Sense Induction},

If you have questions, send me an email: at ed dot ac dot uk