Coder Social home page Coder Social logo

wo31415927 / viterbi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hankcs/viterbi

0.0 1.0 0.0 15 KB

An implementation of HMM-Viterbi Algorithm 通用的维特比算法实现

Home Page: http://www.hankcs.com/nlp/hmm-and-segmentation-tagging-named-entity-recognition.html

License: Apache License 2.0

Java 100.00%

viterbi's Introduction

Viterbi

An implementation of HMM-Viterbi Algorithm

  • How to Use
public static void main(String[] args)
{
     int[] result = Viterbi.compute(observations, states, start_probability, transititon_probability, emission_probability);
     for (int r : result)
     {
        System.out.print(Weather.values()[r] + " ");
     }
}
  • About the algorithm

See Wiki

Viterbi

通用维特比算法的Java实现

  • 调用方法
public static void main(String[] args)
{
     int[] result = Viterbi.compute(observations, states, start_probability, transititon_probability, emission_probability);
     for (int r : result)
     {
        System.out.print(Weather.values()[r] + " ");
     }
}
  • 算法详解

代码本身没什么新意,看到Git上没有好用的Viterbi的Java实现,所以补个缺。特点是简单好懂,一个方法搞定。调用简单,往compute方法里填充HMM的五元组就能得到最佳标注序列。 附赠一个对经典天气预测问题的求解,问题的描述和思路详见前文: 详见《HMM与分词、词性标注、命名实体识别》

viterbi's People

Contributors

hankcs avatar wo31415927 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.