{"id":15442911,"url":"https://github.com/sfischer13/python-arpa","last_synced_at":"2025-06-13T08:07:17.738Z","repository":{"id":34021664,"uuid":"37779505","full_name":"sfischer13/python-arpa","owner":"sfischer13","description":":snake: Python library for n-gram models in ARPA format","archived":false,"fork":false,"pushed_at":"2022-12-08T07:42:35.000Z","size":206,"stargazers_count":40,"open_issues_count":8,"forks_count":13,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-17T05:16:22.902Z","etag":null,"topics":["arpa","computational-linguistics","language-model","library","lm","nlp","python","python-3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sfischer13.png","metadata":{"files":{"readme":"README.md","changelog":"HISTORY.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-20T17:49:22.000Z","updated_at":"2024-11-18T18:30:04.000Z","dependencies_parsed_at":"2023-01-15T04:00:37.896Z","dependency_job_id":null,"html_url":"https://github.com/sfischer13/python-arpa","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/sfischer13/python-arpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfischer13%2Fpython-arpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfischer13%2Fpython-arpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfischer13%2Fpython-arpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfischer13%2Fpython-arpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sfischer13","download_url":"https://codeload.github.com/sfischer13/python-arpa/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sfischer13%2Fpython-arpa/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259606977,"owners_count":22883559,"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":["arpa","computational-linguistics","language-model","library","lm","nlp","python","python-3"],"created_at":"2024-10-01T19:31:30.794Z","updated_at":"2025-06-13T08:07:17.711Z","avatar_url":"https://github.com/sfischer13.png","language":"Python","readme":"Python ARPA Package\n===================\n\nPython library for reading ARPA n-gram models.  \n\n-   [Documentation](https://arpa.readthedocs.io/en/latest/) is available.\n-   [Changes](https://github.com/sfischer13/python-arpa/blob/master/HISTORY.md) between releases are documented.\n-   [Bugs](https://github.com/sfischer13/python-arpa/issues) can be reported on the issue tracker.\n-   [Questions](mailto:sfischer13@ymail.com) can be asked via e-mail.\n-   [Source code](https://github.com/sfischer13/python-arpa) is tracked on GitHub.\n\nSetup\n-----\n\n### Python 3.4+\n\n[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/arpa.svg)](https://pypi.python.org/pypi/arpa) [![PyPI Version](https://img.shields.io/pypi/v/arpa.svg)](https://pypi.python.org/pypi/arpa)\n\nIn order to install the Python 3 version:\n\n    $ pip install --user -U arpa\n\n### Python 2.7\n\n[![PyPI Python Versions](https://img.shields.io/pypi/pyversions/arpa-backport.svg)](https://pypi.python.org/pypi/arpa-backport) [![PyPI Version](https://img.shields.io/pypi/v/arpa-backport.svg)](https://pypi.python.org/pypi/arpa-backport)\n\nIn order to install the Python 2.7 version:\n\n    $ pip install --user -U arpa-backport\n\nUsage\n-----\n\nThe package may be imported directly:\n\n    import arpa  # Python 3.4+\n    # OR\n    import arpa_backport as arpa  # Python 2.7\n\n    models = arpa.loadf(\"foo.arpa\")\n    lm = models[0]  # ARPA files may contain several models.\n\n    # probability p(end|in, the)\n    lm.p(\"in the end\")\n    lm.log_p(\"in the end\")\n\n    # sentence score w/ sentence markers\n    lm.s(\"This is the end .\")\n    lm.log_s(\"This is the end .\")\n\n    # sentence score w/o sentence markers\n    lm.s(\"This is the end .\", sos=False, eos=False)\n    lm.log_s(\"This is the end .\", sos=False, eos=False)\n\nDevelopment\n-----------\n\n[![Travis](https://img.shields.io/travis/sfischer13/python-arpa.svg)](https://travis-ci.org/sfischer13/python-arpa) [![Documentation Status](https://readthedocs.org/projects/arpa/badge/?version=latest)](https://arpa.readthedocs.io/en/latest/?badge=latest) [![Coverage Status](https://coveralls.io/repos/sfischer13/python-arpa/badge.svg?branch=master\u0026service=github)](https://coveralls.io/github/sfischer13/python-arpa?branch=master)\n\n*Contributions are welcome!*  \nWrite a bug report or send a pull request.  \nOther [contributors](https://github.com/sfischer13/python-arpa/graphs/contributors) have done so before.\n\nLicense\n-------\n\nCopyright (c) 2015-2018 Stefan Fischer  \nThe source code is available under the **MIT License**.  \nSee [LICENSE](https://github.com/sfischer13/python-arpa/blob/master/LICENSE) for further details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfischer13%2Fpython-arpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsfischer13%2Fpython-arpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsfischer13%2Fpython-arpa/lists"}