Skip to main content

frhyme -- a toolkit to guess the last phonemes of a French word Repository URL: https://gitlab.com/a3nm/frhyme Python package name: frhyme

== 0. Author and license ==

frhyme is copyright (C) 2011-2019 by Antoine Amarilli

frhyme is free software, distributed under an MIT license: see the file LICENSE for details of the licensing terms that apply to frhyme.

Many thanks to Julien Romero who maintains the PyPI package for frhyme.

The file "frhyme.json" in the directory "frhyme" is a derivative work of the French lexical database Lexique http://www.lexique.org/, version 3.83, by Boris New http://psycho-usmb.fr/boris.new/ and Christophe Pallier http://www.pallier.org/. Hence, this file is under the same license as Lexique, namely, the license CC BY SA 4.0 (according to the file README-Lexique.txt in the downloadable archive of Lexique). The license in LICENSE does not apply to this file "frhyme/frhyme.json".

== 1. Features ==

frhyme is a tool to guess what the last phonemes of a French word are. It is trained on a list of words with associated pronunciation, and will infer a few likely possibilities for unseen words using known words with the longest common prefix, using a trie for internal representation.

== 2. Installation ==

You need a working Python3 environment to run frhyme.

You can install frhyme directly with pip by doing:

pip3 install frhyme

You can also manually clone the project repository and use frhyme directly from there.

== 3. Usage ==

You can either run

frhyme.py [NBEST]

giving one word per line in stdin and getting the NBEST top pronunciations on stdout (default is 5), or you can import frhyme in a Python program and call frhyme.lookup(word, NBEST) which returns the NBEST top pronunciations (default is 5).

The pronunciations returned are annotated with a confidence score (the number of occurrences in the training data). They should be sensible up to the longest prefix of the input word that occurs in the training data, but they may be prefixed by garbage.

The pronunciations are given in a variant of X-SAMPA which ensures that each phoneme is mapped to exactly one ASCII character: the substitutions are "A~" => "#", "O~" => "$", "E~" => ")", "9~" => "(".

== 4. Training ==

This section explains how the file "frhyme.json" can be prepared. You do not need to do this to use frhyme, but it can be useful if you want to create a pronunciation database from a different source.

The provided "fryhme.json" file was trained on a custom variant of the database Lexique http://www.lexique.org/, with some additions. You can regenerate it as follows:

git clone 'https://a3nm.net/git/lexique' cd scripts ./make.sh 4 <(cut -f 1,2 ../lexique/lexique_my_format | uniq) additions > ../frhyme/frhyme.json

The value "4" indicates the number of trailing phonemes to keep, and can be changed. Beware, this process can take up several hundred megabytes of RAM. The resulting file should be accurate on the French words of Lexique.

Metadata

Release files for frhyme 0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for frhyme 0.3
File Interpreter ABI Platform Actions
frhyme-0.3-py3-none-any.whl Python 3 none any Details for frhyme-0.3-py3-none-any.whl

Release files / frhyme-0.3-py3-none-any.whl

Download URL frhyme-0.3-py3-none-any.whl
Size 308.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a11571938fb743af25541269121dda78a0f0a2a521b9589e6e4926fe97c5c128
BLAKE2b-256 checksum
How to use checksums
a5ff85a73b2672fe8d40b870c92aa0908419c03025b27c4b30ee44eaf4218fdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.8

Security for frhyme 0.3

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.

Release history Release notifications | RSS feed

This release

0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page