{"id":18527498,"url":"https://github.com/aurelius84/n-gram","last_synced_at":"2026-02-26T02:39:13.635Z","repository":{"id":112060211,"uuid":"74197970","full_name":"Aurelius84/N-gram","owner":"Aurelius84","description":"A project of N-gram model comparing FMM/BMM","archived":false,"fork":false,"pushed_at":"2022-10-17T09:32:53.000Z","size":2768,"stargazers_count":17,"open_issues_count":1,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T04:41:46.881Z","etag":null,"topics":["bmm","dp","fmm","ngram","segment"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aurelius84.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-11-19T08:59:58.000Z","updated_at":"2024-12-15T03:57:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"5e0f037b-5aff-4bd0-98a7-04f703f22073","html_url":"https://github.com/Aurelius84/N-gram","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Aurelius84/N-gram","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aurelius84%2FN-gram","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aurelius84%2FN-gram/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aurelius84%2FN-gram/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aurelius84%2FN-gram/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aurelius84","download_url":"https://codeload.github.com/Aurelius84/N-gram/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aurelius84%2FN-gram/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29848634,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T22:37:40.667Z","status":"online","status_checked_at":"2026-02-26T02:00:06.774Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bmm","dp","fmm","ngram","segment"],"created_at":"2024-11-06T17:55:17.879Z","updated_at":"2026-02-26T02:39:13.621Z","avatar_url":"https://github.com/Aurelius84.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# N-gram\nA project of N-gram model comparing FMM/BMM\nDocument:[CocoNLP](https://www.cnblogs.com/CocoML/p/12725988.html)\n\n### Usage\nFirstly, you should download the data '199801.txt' from Internet and put it in the project dir.\nUse as followed:\n```\npython statistic.py\n```\nAnd you will get result like this:\n```\nsuccessfully to split corpus by train = 0.900000 test = 0.100000\nthe total number of words is:53260\nThe total number of bigram is : 403121.\nsuccessfully witten-Bell smoothing! smooth_value:1.3372788850370981e-05\nthe total number of punction is:47\n召回率为:0.962036929819092\n准确率为:0.9401303935308096\nF值为:0.950957517059212\n```\n\n### Result\n\n\n|指标   |  FMM |  BMM | Unigram  | Bigram|\n|:------:|:------:|:------:|:------------:|:--:|\n|准确率 |91.54%|92.13%|   93.20%   |  94.01% |\n|召回率 |94.66%|95.07%|   96.14%   |  96.20% |\n|F1值  |93.07%|93.58%|   94.64%   |  95.10%|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurelius84%2Fn-gram","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faurelius84%2Fn-gram","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurelius84%2Fn-gram/lists"}