Giter VIP home page Giter VIP logo

pgibbs's Introduction

pgibbs - Parallelized Unsupervised word segmentation and POS tagging

by Graham Neubig

This package implements parallel Gibbs sampling for word segmentation and POS tagging using both blocked and multi-sampler methods. The two executables are src/bin/pgibbs-ws for word segmentation and src/bin/pgibbs-hmm for POS tagging. You can find more details in the following paper:

"Simple, Correct Parallelization for Blocked Gibbs Sampling". Graham Neubig. Technical Report. 2014.

Data Preparation

For HMM-based tagging, the input is divided into words:

上海 浦东 开发 与 法制 建设 同步

And for word-segmentation, the input is divided into characters:

上 海 浦 东 开 发 与 法 制 建 设 同 步

If you want to replicate experiments in the technical report, you must have the Chinese Treebank 5.0, which can be obtained from the LDC (details here).

Running Experiments

Both programs can be run with

pgibbs-{ws,hmm} [OPTIONS] INPUTDATA OUTPUTPREFIX

The input data is the previously mentioned files, and the output data is a prefix where the label files will be written. The major options used are as follows:

-iters 2000             // The number of iterations
-threads {1,2,4,8}      // The number of threads to use
-blocksize {1,2,4,10,20,40,100} // The size of a single block for blocked sampling
-sampmeth {block,parallel} // Whether to perform blocked or parallel sampling
-skipiters {0,2000}     // Will skip a Metropolis-Hastings rejection for a certain
                        //  number of iterations, when set equal to the number of
                        //  iterations, MH will not be performed

For word segmentation only:

-n 2                    // The n-gram size of the model

For HMM only:

-classes 30             // The number of classes in the model

pgibbs's People

Contributors

neubig avatar

Watchers

lizhang 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.