{"id":16837853,"url":"https://github.com/hankcs/viterbi","last_synced_at":"2025-04-06T09:11:01.377Z","repository":{"id":20592842,"uuid":"23873629","full_name":"hankcs/Viterbi","owner":"hankcs","description":"An implementation of HMM-Viterbi Algorithm 通用的维特比算法实现","archived":false,"fork":false,"pushed_at":"2018-08-27T13:13:09.000Z","size":13,"stargazers_count":371,"open_issues_count":0,"forks_count":198,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-30T08:11:12.382Z","etag":null,"topics":["hmm","hmm-viterbi-algorithm","java","viterbi"],"latest_commit_sha":null,"homepage":"http://www.hankcs.com/nlp/hmm-and-segmentation-tagging-named-entity-recognition.html","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hankcs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-10T12:30:41.000Z","updated_at":"2025-03-25T18:05:28.000Z","dependencies_parsed_at":"2022-08-31T04:51:15.089Z","dependency_job_id":null,"html_url":"https://github.com/hankcs/Viterbi","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/hankcs%2FViterbi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankcs%2FViterbi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankcs%2FViterbi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hankcs%2FViterbi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hankcs","download_url":"https://codeload.github.com/hankcs/Viterbi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457803,"owners_count":20941906,"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":["hmm","hmm-viterbi-algorithm","java","viterbi"],"created_at":"2024-10-13T12:19:05.500Z","updated_at":"2025-04-06T09:11:01.358Z","avatar_url":"https://github.com/hankcs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"Viterbi\n========\n\nAn implementation of HMM-Viterbi Algorithm\n----------------------\n\n - How to Use\n \n```java\npublic static void main(String[] args)\n{\n     int[] result = Viterbi.compute(observations, states, start_probability, transititon_probability, emission_probability);\n     for (int r : result)\n     {\n        System.out.print(Weather.values()[r] + \" \");\n     }\n}\n```\n - About the algorithm\n \n See [Wiki][1]\n\n  [1]: https://en.wikipedia.org/wiki/Viterbi_algorithm#Example\n  \n  \nViterbi\n========\n\n通用维特比算法的Java实现\n----------------------\n\n - 调用方法\n \n```java\npublic static void main(String[] args)\n{\n     int[] result = Viterbi.compute(observations, states, start_probability, transititon_probability, emission_probability);\n     for (int r : result)\n     {\n        System.out.print(Weather.values()[r] + \" \");\n     }\n}\n```\n - 算法详解\n \n 代码本身没什么新意，看到Git上没有好用的Viterbi的Java实现，所以补个缺。特点是简单好懂，一个方法搞定。调用简单，往compute方法里填充HMM的五元组就能得到最佳标注序列。\n 附赠一个对经典天气预测问题的求解，问题的描述和思路详见前文：\n 详见[《HMM与分词、词性标注、命名实体识别》][2]\n\n  [2]: http://www.hankcs.com/nlp/hmm-and-segmentation-tagging-named-entity-recognition.html\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhankcs%2Fviterbi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhankcs%2Fviterbi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhankcs%2Fviterbi/lists"}