This release is a pre-release and may not be stable for production use.
Python ARPA Package
Python library for reading ARPA n-gram models.
- Documentation is available.
- Changes between releases are documented.
- Bugs can be reported on the issue tracker.
- Questions can be asked via e-mail.
- Source code is tracked on GitHub.
Setup
Python 3.4+
In order to install the Python 3 version:
$ pip install --user -U arpa
Python 2.7
In order to install the Python 2.7 version:
$ pip install --user -U arpa-backport
Usage
The package may be imported directly:
import arpa # Python 3.4+
# OR
import arpa_backport as arpa # Python 2.7
models = arpa.loadf("foo.arpa")
lm = models[0] # ARPA files may contain several models.
# probability p(end|in, the)
lm.p("in the end")
lm.log_p("in the end")
# sentence score w/ sentence markers
lm.s("This is the end .")
lm.log_s("This is the end .")
# sentence score w/o sentence markers
lm.s("This is the end .", sos=False, eos=False)
lm.log_s("This is the end .", sos=False, eos=False)
Development
Contributions are welcome!
Write a bug report or send a pull request.
Other contributors have done so before.
License
Copyright (c) 2015-2018 Stefan Fischer
The source code is available under the MIT License.
See LICENSE for further details.
History
All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
You should Keep a CHANGELOG, too!
Next Release
Added
Changed
Deprecated
Fixed
Removed
Security
0.1.0b4 - 2018-12-12
0.1.0b3 - 2018-12-06
First release on PyPI.
Metadata
Release files for arpa-backport 0.1.0b4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| arpa-backport-0.1.0b4.tar.gz | 29.7 kB | Without provenance | Details for arpa-backport-0.1.0b4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| arpa_backport-0.1.0b4-py2-none-any.whl | Python 2 | none | any | Details for arpa_backport-0.1.0b4-py2-none-any.whl |
Total release size: 40.1 kB
Release files / arpa-backport-0.1.0b4.tar.gz
| Download URL | arpa-backport-0.1.0b4.tar.gz |
|---|---|
| Size | 29.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3904a5c58aa1931f06cc4db7d14cc3f1e7989e91a0e866437eb5cc84287a4abc
|
|
BLAKE2b-256 checksum How to use checksums |
c91e3ccf9c3f9e589ec25829cc08372e3495dcb098f4d1a18a6fe019e74e5472
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15
|
Release files / arpa_backport-0.1.0b4-py2-none-any.whl
| Download URL | arpa_backport-0.1.0b4-py2-none-any.whl |
|---|---|
| Size | 10.4 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
0a376474fd32061f58c6863a78b1380243615efbf302f024305766c1055d4102
|
|
BLAKE2b-256 checksum How to use checksums |
2a474be379bca146ee175eab2ca828b2e7fe8e6c8b5e40b994f3fc600ca5f08d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15
|
Security for arpa-backport 0.1.0b4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.