arpa-backport 0.1.0b4
Library for reading ARPA n-gram models with Python 2.7.
License: MIT
Requires Python: ~=2.7
Keywords: A,R,P,A, ,n,-,g,r,a,m, ,n,g,r,a,m, ,l,a,n,g,u,a,g,e, ,m,o,d,e,l, ,L,M, ,l,a,n,g,u,a,g,e, ,t,e,c,h,n,o,l,o,g,y, ,L,T, ,c,o,m,p,u,t,a,t,i,o,n,a,l, ,l,i,n,g,u,i,s,t,i,c,s, ,C,L, ,n,a,t,u,r,a,l, ,l,a,n,g,u,a,g,e, ,p,r,o,c,e,s,s,i,n,g, ,N,L,P, ,u,n,i,g,r,a,m, ,b,i,g,r,a,m, ,t,r,i,g,r,a,m

Python ARPA Package
===================

Python library for reading ARPA n-gram models.  

-   [Documentation](https://arpa.readthedocs.io/en/latest/) is available.
-   [Changes](https://github.com/sfischer13/python-arpa/blob/master/HISTORY.md) between releases are documented.
-   [Bugs](https://github.com/sfischer13/python-arpa/issues) can be reported on the issue tracker.
-   [Questions](mailto:sfischer13@ymail.com) can be asked via e-mail.
-   [Source code](https://github.com/sfischer13/python-arpa) is tracked on GitHub.

Setup
-----

### Python 3.4+

[![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)

In order to install the Python 3 version:

    $ pip install --user -U arpa

### Python 2.7

[![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)

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
-----------

[![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&service=github)](https://coveralls.io/github/sfischer13/python-arpa?branch=master)

*Contributions are welcome!*  
Write a bug report or send a pull request.  
Other [contributors](https://github.com/sfischer13/python-arpa/graphs/contributors) have done so before.

License
-------

Copyright (c) 2015-2018 Stefan Fischer  
The source code is available under the **MIT License**.  
See [LICENSE](https://github.com/sfischer13/python-arpa/blob/master/LICENSE) for further details.


History
=======

All notable changes to this project will be documented in this file.  
This project adheres to [Semantic Versioning](https://semver.org/).  
You should [Keep a CHANGELOG](https://keepachangelog.com/), too!

[Next Release](https://github.com/sfischer13/python-arpa/compare/0.1.0b3-py2...python2.7)
-----------------------------------------------------------------------------------------

### Added

### Changed

### Deprecated

### Fixed

### Removed

### Security

[0.1.0b4](https://github.com/sfischer13/python-arpa/compare/0.1.0b3-py2...0.1.0b4-py2) - 2018-12-12
---------------------------------------------------------------------------------------------------

[0.1.0b3](https://github.com/sfischer13/python-arpa/compare/0.1.0b3...0.1.0b3-py2) - 2018-12-06
-----------------------------------------------------------------------------------------------

First release on PyPI.