GithubHelp home page GithubHelp logo

whuir / pdmm Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 3.0 18.71 MB

The java implementation of "Enhancing Topic Modeling for Short Texts with Auxiliary Word Embeddings" TOIS 2017, Chenliang Li, Yu Duan, Haoran Wang, Zhiqian Zhang, Aixin Sun, Zongyang Ma, https://dl.acm.org/citation.cfm?doid=3133943.3091108

Java 100.00%
topic-model short-text

pdmm's Introduction

PDMM

The implementation of "Enhancing Topic Modeling for Short Texts with Auxiliary Word Embeddings", TOIS 2017

The model PDMM proposed in this paper is an effective topic model for short texts.

The code is contributed by Yu Duan, who is a master in Wuhan University. If you want to contact him, please email to [email protected]

Description

This repository doesn't contain the preprocess steps. So if you want to use this code, you should prepare the data by yourself.

Also this repository doesn't contain the metric code for classification and PMI score.

The classification algorithm we used is SVM provided by scikit.

The PMI Coherence should calculated in external corpus, such as Wikipedia for English or Baidu Baike for Chinese.

The data format is described as follows:

docID \t category | content

example:

0 business|manufacture manufacturers suppliers supplier china directory products taiwan manufacturer


Anonther file you should prepare is the word similarity file. In our paper, we use the cosine similarity calculated on word embeddings. This can be prepared in advance.

You also need to provide word2id file for launching the program, the data format is described as follows:

word,id

Each line represents a word , the word and its id is separated by a comma

example:

apple,0

Parameter Explanation

beta: the hyper-parameter beta, and the alpha is calculated as 50/numTopic

namda: the hyper-parameter for Poisson distribution

maxTd: the max number of topics in a document

searchTopk : the search size of heuristic pruning strategy

initialFileName : the file of model's initlization

similarityFileName: the file of words' similarity

weight: the promotion of similar word

threshold: the similar threshold for constructing similar word set

filterSize: the filter size for filtering similar word set

numIter: the number of iteration for gibbs sampling progress

Model Result Explanation

*_pdz.txt: the topic-level representation for each document. Each line is a topic distribution for one document. This is used for classification task.

*_phi.txt: the word-level representation for each topic. Each line is a word distribution for one topic. This is used for PMI Coherence task.

*_words.txt: word, wordID map information. This is used for PMI Coherence task.

pdmm's People

Contributors

lichenliang-whu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.