{"id":18786502,"url":"https://github.com/tetsuok/py-srilm-interpolator","last_synced_at":"2025-12-22T07:30:14.136Z","repository":{"id":146612774,"uuid":"6709846","full_name":"tetsuok/py-srilm-interpolator","owner":"tetsuok","description":"A python wrapper for determining interpolation weights with SRILM.","archived":false,"fork":false,"pushed_at":"2012-11-16T22:32:40.000Z","size":136,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T05:51:38.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tetsuok.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":"2012-11-15T19:04:51.000Z","updated_at":"2022-09-09T06:42:34.000Z","dependencies_parsed_at":"2023-03-24T05:13:11.394Z","dependency_job_id":null,"html_url":"https://github.com/tetsuok/py-srilm-interpolator","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/tetsuok%2Fpy-srilm-interpolator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuok%2Fpy-srilm-interpolator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuok%2Fpy-srilm-interpolator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tetsuok%2Fpy-srilm-interpolator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tetsuok","download_url":"https://codeload.github.com/tetsuok/py-srilm-interpolator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239703087,"owners_count":19683204,"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":[],"created_at":"2024-11-07T20:51:44.349Z","updated_at":"2025-12-22T07:30:14.090Z","avatar_url":"https://github.com/tetsuok.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"py-srilm-interpolator\n=====================\n\nA python wrapper for determining interpolation weights with SRILM.\nThis package provides two features:\n\n- Determine interpolation weights of multiple language models.\n- Mix the models together in a single file.\n\nNote that you should prepare for individual language models you want\nto interpolate with SRILM before using this package.\nPlease also note that *this script does NOT work without SRILM*.  You need\nto install SRILM on your machine first.\n\nI have tested scripts on Linux and OS X (10.8.2).  OS X users might\nwant to install `gawk` since `interpolator.py` (it calls internally\nSRI's `compute-best-mix`) depends on `gawk`.\n\n## Software Requirements ##\n\n- [SRILM](http://www.speech.sri.com/projects/srilm/download.html)\n- python [setuptools](http://pypi.python.org/pypi/setuptools) (optional)\n\n## Installation ##\n\nThe installation process is not necessary. Just download this package on your favorite place.\n\n    $ git clone git://github.com/tetsuok/py-srilm-interpolator.git\n\nUsage\n-----\n\nThere are three steps to create an interpolated language model.  To\nrun python scripts, you need to prepare for a config file first.\n\n### Prepare for a config file ###\n\nHere is a config file format you should prepare for first:\n\n    [SRILM]\n    # This is a comment. You need to edit the following line.\n    home=/path/to/srilm\n\n    # You need to edit the order of language model according to\n    # the language models you want to mix together.\n    opt=-order 3 -unk\n\n    # Do not edit this option!\n    [perplexity]\n    opt=-debug 2\n\n    [devset]\n    # Edit the following path.\n    path=/path/to/devset\n\n    [language models]\n    # Edit the following path.\n    lm1=/path/to/lm1\n    lm2=/path/to/lm2\n\nWARNING: Basically you can change only values in the config file except the options in the\nsection \"language models.\" In other words, do not change the name of 'sections' and\n'options'; Python scripts will find the given sections and options.\n\nLines beginning with '#' or ';' are ignored and treated as comments.\n\nPlease see an example config file `example/example.cfg`.\n\nIn most cases, it will suffice to copy `example/example.cfg` and to\nedit the path to SRILM, order of language models, and path to language\nmodels.\n\nI recommend using the absolute path to SRILM and language models when\nyou edit path to them.\n\n### Determine interpolation weights ###\n\nWe assume that you have already prepared for a config file.\n\n    $ ls\n    config  py-srilm-interpolator\n    $ py-srilm-interpolator/srilm/interpolator.py -c config [--cpus 2 ]\n\nPlease note that you need to specify `-c config`.\n\n### Mix the models ###\n\n    $ py-srilm-interpolator/srilm/combiner.py -c config best-mix.ppl\n\nPlease note that you need to specify `-c config`.\n`best-mix.ppl` is a file which has been generated by the previous step.\n\nReferences\n----------\n\n[Joshua Building large LMs with SRILM](http://joshua-decoder.org/4.0/large-lms.html)\n\n## License ##\n\nThis code is distributed under the New BSD License. See the file LICENSE.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetsuok%2Fpy-srilm-interpolator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftetsuok%2Fpy-srilm-interpolator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftetsuok%2Fpy-srilm-interpolator/lists"}