lexikos


Namelexikos JSON
Version 0.0.1rc7 PyPI version JSON
download
home_pagehttps://github.com/bookbot-hive/lexikos
SummaryA collection of pronunciation dictionaries and neural grapheme-to-phoneme models.
upload_time2024-04-02 08:22:02
maintainerNone
docs_urlNone
authorw11wo
requires_pythonNone
licenseApache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
keywords linguistics pronunciation-dictionary g2p grapheme-to-phoneme neural-g2p
VCS
bugtrack_url
requirements inflect nltk onnx onnxruntime optimum
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lexikos - λεξικός /lek.si.kós/

A collection of pronunciation dictionaries and neural grapheme-to-phoneme models.

<p align="center">
    <img src="https://github.com/bookbot-hive/lexikos/raw/main/assets/lexikos.png" alt="logo" width="300"/>
</p>

## Install Lexikos

Install from PyPI

```sh
pip install lexikos
```

Editable install from Source

```sh
git clone https://github.com/bookbot-hive/lexikos.git
pip install -e lexikos
```

## Usage

### Lexicon

```py
>>> from lexikos import Lexicon
>>> lexicon = Lexicon()
>>> print(lexicon["added"])
{'ˈæ d ɪ d', 'ˈæ ɾ ə d', 'æ ɾ ɪ d', 'a d ɪ d', 'ˈa d ɪ d', 'æ ɾ ə d', 'ˈa d ə d', 'a d ə d', 'ˈæ d ə d', 'æ d ə d', 'æ d ɪ d', 'ˈæ ɾ ɪ d'}
>>> print(lexicon["runner"])
{'ɹ ʌ n ɚ', 'ɹ ʌ n ə', 'ɹ ʌ n ɝ', 'ˈr ʌ n ɝ'}
>>> print(lexicon["water"])
{'ˈʋ aː ʈ ə r ɯ', 'ˈw oː t ə', 'w ɑ t ə ɹ', 'ˈw aː ʈ ə r ɯ', 'ˈw ɔ t ɝ', 'w ɔ t ə ɹ', 'ˈw ɑ t ə ɹ', 'w ɔ t ɝ', 'w ɑ ɾ ɚ', 'ˈw ɑ ɾ ɚ', 'ˈʋ ɔ ʈ ə r', 'w ɔ ɾ ɚ', 'w ɔː t ə', 'ˈw oː ɾ ə', 'ˈw ɔ ʈ ə r'}
```

To get a lexicon where phonemes are normalized (diacritics removed, digraphs split):

```py
>>> from lexikos import Lexicon
>>> lexicon = Lexicon(normalize_phonemes=True)
>>> print(lexicon["added"])
{'æ ɾ ɪ d', 'a d ɪ d', 'a d ə d', 'æ ɾ ə d', 'æ d ə d', 'æ d ɪ d'}
>>> print(lexicon["runner"])
{'ɹ ʌ n ɚ', 'ɹ ʌ n ə', 'r ʌ n ɝ', 'ɹ ʌ n ɝ'}
>>> print(lexicon["water"])
{'w o ɾ ə', 'w ɔ t ə', 'ʋ ɔ ʈ ə r', 'w a ʈ ə r ɯ', 'w ɔ t ə ɹ', 'ʋ a ʈ ə r ɯ', 'w ɑ ɾ ɚ', 'w o t ə', 'w ɔ t ɝ', 'w ɔ ʈ ə r', 'w ɔ ɾ ɚ', 'w ɑ t ə ɹ'}
```

To include synthetic (non-dictionary-based) pronunciations:

```py
>>> from lexikos import Lexicon
>>> lexicon = Lexicon(include_synthetic=True)
>>> print(lexicon["athletic"])
{'æ t l ɛ t ɪ k', 'æ θ ˈl ɛ t ɪ k', 'æ θ l ɛ t ɪ k'}
```

### Phonemization

```py
>>> from lexikos import G2p
>>> g2p = G2p(lang="en-us")
>>> g2p("Hello there! $100 is not a lot of money in 2023.")
['h ɛ l o ʊ', 'ð ɛ ə ɹ', 'w ʌ n', 'h ʌ n d ɹ ɪ d', 'd ɑ l ɚ z', 'ɪ z', 'n ɒ t', 'ə', 'l ɑ t', 'ʌ v', 'm ʌ n i', 'ɪ n', 't w ɛ n t i', 't w ɛ n t i', 'θ ɹ iː']
>>> g2p = G2p(lang="en-au")
>>> g2p("Hi there mate! Have a g'day!")
['h a ɪ', 'θ ɛ ə ɹ', 'm e ɪ t', 'h e ɪ v', 'ə', 'ɡ ə ˈd æ ɪ']
```

## Dictionaries & Models

### English `(en)`

| Language | Dictionary | Phone Set | Corpus                                       | G2P Model                                                                                           |
| -------- | ---------- | --------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| en       | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn.tsv) | [bookbot/byt5-small-wikipron-eng-latn](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn) |

### English `(en-US)`

| Language       | Dictionary   | Phone Set | Corpus                                                                                                                     | G2P Model                                                                                                             |
| -------------- | ------------ | --------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| en-US          | CMU Dict     | ARPA      | [External Link](https://github.com/microsoft/CNTK/blob/master/Examples/SequenceToSequence/CMUDict/Data/cmudict-0.7b.train) | [bookbot/byt5-small-cmudict](https://huggingface.co/bookbot/byt5-small-cmudict)                                       |
| en-US          | CMU Dict IPA | IPA       | [External Link](https://github.com/menelik3/cmudict-ipa/blob/master/cmudict-0.7b-ipa.txt)                                  |                                                                                                                       |
| en-US          | CharsiuG2P   | IPA       | [External Link](https://github.com/lingjzhu/CharsiuG2P/blob/main/dicts/eng-us.tsv)                                         | [charsiu/g2p_multilingual_byT5_small_100](https://huggingface.co/charsiu/g2p_multilingual_byT5_small_100)             |
| en-US (Broad)  | Wikipron     | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_us_broad.tsv)                     | [bookbot/byt5-small-wikipron-eng-latn-us-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-us-broad) |
| en-US (Narrow) | Wikipron     | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_us_narrow.tsv)                    |
| en-US          | LibriSpeech  | IPA       | [Link](./lexikos/dict/cmudict-ipa/librispeech-lexicon-200k-allothers-g2p-ipa.tsv)                                          |                                                                                                                       |

### English `(en-UK)`

| Language       | Dictionary | Phone Set | Corpus                                                                                                  | G2P Model                                                                                                             |
| -------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| en-UK          | CharsiuG2P | IPA       | [External Link](https://github.com/lingjzhu/CharsiuG2P/blob/main/dicts/eng-uk.tsv)                      | [charsiu/g2p_multilingual_byT5_small_100](https://huggingface.co/charsiu/g2p_multilingual_byT5_small_100)             |
| en-UK (Broad)  | Wikipron   | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_uk_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-uk-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-uk-broad) |
| en-UK (Narrow) | Wikipron   | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_uk_narrow.tsv) |                                                                                                                       |

### English `(en-AU)`

| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |
| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| en-AU (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_au_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-au-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-au-broad) |
| en-AU (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_au_narrow.tsv) |                                                                                                                       |
| en-AU          | AusTalk    | IPA       | [Link](./lexikos/dict/asr-data/austalk_en_au.tsv)      |                                                                                                                       |
| en-AU          | SC-CW      | IPA       | [Link](./lexikos/dict/asr-data/sc_cw_en_au.tsv)        |                                                                                                                       |

### English `(en-CA)`

| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |
| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| en-CA (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_ca_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-ca-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-ca-broad) |
| en-CA (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_ca_narrow.tsv) |                                                                                                                       |

### English `(en-NZ)`

| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |
| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| en-NZ (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_nz_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-nz-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-nz-broad) |
| en-NZ (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_nz_narrow.tsv) |                                                                                                                       |

### English `(en-IN)`

| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |
| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |
| en-IN (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_in_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-in-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-in-broad) |
| en-IN (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_in_narrow.tsv) |                                                                                                                       |


## Training G2P Model

We modified the sequence-to-sequence training script of [🤗 HuggingFace](https://github.com/huggingface/transformers/blob/main/examples/pytorch/translation/run_translation.py) for the purpose of training G2P models. Refer to their [installation requirements](https://github.com/huggingface/transformers/tree/main/examples/pytorch/translation) for more details.

Training a new G2P model generally follow this recipe:

```diff
python run_translation.py \
+   --model_name_or_path $PRETRAINED_MODEL \
+   --dataset_name $DATASET_NAME \
    --output_dir $OUTPUT_DIR \
    --per_device_train_batch_size 128 \
    --per_device_eval_batch_size 32 \
    --learning_rate 2e-4 \
    --lr_scheduler_type linear \
    --warmup_ratio 0.1 \
    --num_train_epochs 10 \
    --evaluation_strategy epoch \
    --save_strategy epoch \
    --logging_strategy epoch \
    --max_source_length 64 \
    --max_target_length 64 \
    --val_max_target_length 64 \
    --pad_to_max_length True \
    --overwrite_output_dir \
    --do_train --do_eval \
    --bf16 \
    --predict_with_generate \
    --report_to tensorboard \
    --push_to_hub \
+   --hub_model_id $HUB_MODEL_ID \
    --use_auth_token
```

### Example: Fine-tune ByT5 on CMU Dict

```sh
python run_translation.py \
    --model_name_or_path google/byt5-small \
    --dataset_name bookbot/cmudict-0.7b \
    --output_dir ./byt5-small-cmudict \
    --per_device_train_batch_size 128 \
    --per_device_eval_batch_size 32 \
    --learning_rate 2e-4 \
    --lr_scheduler_type linear \
    --warmup_ratio 0.1 \
    --num_train_epochs 10 \
    --evaluation_strategy epoch \
    --save_strategy epoch \
    --logging_strategy epoch \
    --max_source_length 64 \
    --max_target_length 64 \
    --val_max_target_length 64 \
    --pad_to_max_length True \
    --overwrite_output_dir \
    --do_train --do_eval \
    --bf16 \
    --predict_with_generate \
    --report_to tensorboard \
    --push_to_hub \
    --hub_model_id bookbot/byt5-small-cmudict \
    --use_auth_token
```

## Evaluating G2P Model

Then to evaluate:

```diff
python eval.py \
+   --model $PRETRAINED_MODEL \
+   --dataset_name $DATASET_NAME \
    --source_text_column_name source \
    --target_text_column_name target \
    --max_length 64 \
    --batch_size 64
```

### Example: Evaluate ByT5 on CMU Dict

```sh
python eval.py \
    --model bookbot/byt5-small-cmudict \
    --dataset_name bookbot/cmudict-0.7b \
    --source_text_column_name source \
    --target_text_column_name target \
    --max_length 64 \
    --batch_size 64
```

## Corpus Roadmap

### Wikipron

| Language Family        | Code                              | Region                                                | Corpus | G2P Model |
| ---------------------- | --------------------------------- | ----------------------------------------------------- | :----: | :-------: |
| African English        | en-ZA                             | South Africa                                          |        |           |
| Australian English     | en-AU                             | Australia                                             |   ✅    |     ✅     |
| East Asian English     | en-CN, en-HK, en-JP, en-KR, en-TW | China, Hong Kong, Japan, South Korea, Taiwan          |        |           |
| European English       | en-UK, en-HU, en-IE               | United Kingdom, Hungary, Ireland                      |   🚧    |     🚧     |
| Mexican English        | en-MX                             | Mexico                                                |        |           |
| New Zealand English    | en-NZ                             | New Zealand                                           |   ✅    |     ✅     |
| North American         | en-CA, en-US                      | Canada, United States                                 |   ✅    |     ✅     |
| Middle Eastern English | en-EG, en-IL                      | Egypt, Israel                                         |        |           |
| Southeast Asian        | en-TH, en-ID, en-MY, en-PH, en-SG | Thailand, Indonesia, Malaysia, Philippines, Singapore |        |           |
| South Asian English    | en-IN                             | India                                                 |   ✅    |     ✅     |
  
## Resources

- [CharsiuG2P](https://github.com/lingjzhu/CharsiuG2P)
- [Microsoft CNTK](https://github.com/microsoft/CNTK/tree/master)
- [CMU Pronouncing Dictionary - IPA](https://github.com/menelik3/cmudict-ipa)
- [Wikipron](https://github.com/CUNY-CL/wikipron/tree/master)

## References

```bibtex
@inproceedings{lee-etal-2020-massively,
    title = "Massively Multilingual Pronunciation Modeling with {W}iki{P}ron",
    author = "Lee, Jackson L.  and
      Ashby, Lucas F.E.  and
      Garza, M. Elizabeth  and
      Lee-Sikka, Yeonju  and
      Miller, Sean  and
      Wong, Alan  and
      McCarthy, Arya D.  and
      Gorman, Kyle",
    booktitle = "Proceedings of LREC",
    year = "2020",
    publisher = "European Language Resources Association",
    pages = "4223--4228",
}
```

```bibtex
@misc{zhu2022byt5,
    title={ByT5 model for massively multilingual grapheme-to-phoneme conversion}, 
    author={Jian Zhu and Cong Zhang and David Jurgens},
    year={2022},
    eprint={2204.03067},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/bookbot-hive/lexikos",
    "name": "lexikos",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "linguistics, pronunciation-dictionary, g2p, grapheme-to-phoneme, neural-g2p",
    "author": "w11wo",
    "author_email": "w11wo <wilson@bookbotkids.com>, anantoj <gg.ananto@gmail.com>, DavidSamuell <davidsamuel.7878@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/d4/c3/05b54d465401fe357b22abe82fadbd3b71606f01807c2f3f88d03778578f/lexikos-0.0.1rc7.tar.gz",
    "platform": "linux",
    "description": "# Lexikos - \u03bb\u03b5\u03be\u03b9\u03ba\u03cc\u03c2 /lek.si.k\u00f3s/\n\nA collection of pronunciation dictionaries and neural grapheme-to-phoneme models.\n\n<p align=\"center\">\n    <img src=\"https://github.com/bookbot-hive/lexikos/raw/main/assets/lexikos.png\" alt=\"logo\" width=\"300\"/>\n</p>\n\n## Install Lexikos\n\nInstall from PyPI\n\n```sh\npip install lexikos\n```\n\nEditable install from Source\n\n```sh\ngit clone https://github.com/bookbot-hive/lexikos.git\npip install -e lexikos\n```\n\n## Usage\n\n### Lexicon\n\n```py\n>>> from lexikos import Lexicon\n>>> lexicon = Lexicon()\n>>> print(lexicon[\"added\"])\n{'\u02c8\u00e6 d \u026a d', '\u02c8\u00e6 \u027e \u0259 d', '\u00e6 \u027e \u026a d', 'a d \u026a d', '\u02c8a d \u026a d', '\u00e6 \u027e \u0259 d', '\u02c8a d \u0259 d', 'a d \u0259 d', '\u02c8\u00e6 d \u0259 d', '\u00e6 d \u0259 d', '\u00e6 d \u026a d', '\u02c8\u00e6 \u027e \u026a d'}\n>>> print(lexicon[\"runner\"])\n{'\u0279 \u028c n \u025a', '\u0279 \u028c n \u0259', '\u0279 \u028c n \u025d', '\u02c8r \u028c n \u025d'}\n>>> print(lexicon[\"water\"])\n{'\u02c8\u028b a\u02d0 \u0288 \u0259 r \u026f', '\u02c8w o\u02d0 t \u0259', 'w \u0251 t \u0259 \u0279', '\u02c8w a\u02d0 \u0288 \u0259 r \u026f', '\u02c8w \u0254 t \u025d', 'w \u0254 t \u0259 \u0279', '\u02c8w \u0251 t \u0259 \u0279', 'w \u0254 t \u025d', 'w \u0251 \u027e \u025a', '\u02c8w \u0251 \u027e \u025a', '\u02c8\u028b \u0254 \u0288 \u0259 r', 'w \u0254 \u027e \u025a', 'w \u0254\u02d0 t \u0259', '\u02c8w o\u02d0 \u027e \u0259', '\u02c8w \u0254 \u0288 \u0259 r'}\n```\n\nTo get a lexicon where phonemes are normalized (diacritics removed, digraphs split):\n\n```py\n>>> from lexikos import Lexicon\n>>> lexicon = Lexicon(normalize_phonemes=True)\n>>> print(lexicon[\"added\"])\n{'\u00e6 \u027e \u026a d', 'a d \u026a d', 'a d \u0259 d', '\u00e6 \u027e \u0259 d', '\u00e6 d \u0259 d', '\u00e6 d \u026a d'}\n>>> print(lexicon[\"runner\"])\n{'\u0279 \u028c n \u025a', '\u0279 \u028c n \u0259', 'r \u028c n \u025d', '\u0279 \u028c n \u025d'}\n>>> print(lexicon[\"water\"])\n{'w o \u027e \u0259', 'w \u0254 t \u0259', '\u028b \u0254 \u0288 \u0259 r', 'w a \u0288 \u0259 r \u026f', 'w \u0254 t \u0259 \u0279', '\u028b a \u0288 \u0259 r \u026f', 'w \u0251 \u027e \u025a', 'w o t \u0259', 'w \u0254 t \u025d', 'w \u0254 \u0288 \u0259 r', 'w \u0254 \u027e \u025a', 'w \u0251 t \u0259 \u0279'}\n```\n\nTo include synthetic (non-dictionary-based) pronunciations:\n\n```py\n>>> from lexikos import Lexicon\n>>> lexicon = Lexicon(include_synthetic=True)\n>>> print(lexicon[\"athletic\"])\n{'\u00e6 t l \u025b t \u026a k', '\u00e6 \u03b8 \u02c8l \u025b t \u026a k', '\u00e6 \u03b8 l \u025b t \u026a k'}\n```\n\n### Phonemization\n\n```py\n>>> from lexikos import G2p\n>>> g2p = G2p(lang=\"en-us\")\n>>> g2p(\"Hello there! $100 is not a lot of money in 2023.\")\n['h \u025b l o \u028a', '\u00f0 \u025b \u0259 \u0279', 'w \u028c n', 'h \u028c n d \u0279 \u026a d', 'd \u0251 l \u025a z', '\u026a z', 'n \u0252 t', '\u0259', 'l \u0251 t', '\u028c v', 'm \u028c n i', '\u026a n', 't w \u025b n t i', 't w \u025b n t i', '\u03b8 \u0279 i\u02d0']\n>>> g2p = G2p(lang=\"en-au\")\n>>> g2p(\"Hi there mate! Have a g'day!\")\n['h a \u026a', '\u03b8 \u025b \u0259 \u0279', 'm e \u026a t', 'h e \u026a v', '\u0259', '\u0261 \u0259 \u02c8d \u00e6 \u026a']\n```\n\n## Dictionaries & Models\n\n### English `(en)`\n\n| Language | Dictionary | Phone Set | Corpus                                       | G2P Model                                                                                           |\n| -------- | ---------- | --------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------- |\n| en       | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn.tsv) | [bookbot/byt5-small-wikipron-eng-latn](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn) |\n\n### English `(en-US)`\n\n| Language       | Dictionary   | Phone Set | Corpus                                                                                                                     | G2P Model                                                                                                             |\n| -------------- | ------------ | --------- | -------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| en-US          | CMU Dict     | ARPA      | [External Link](https://github.com/microsoft/CNTK/blob/master/Examples/SequenceToSequence/CMUDict/Data/cmudict-0.7b.train) | [bookbot/byt5-small-cmudict](https://huggingface.co/bookbot/byt5-small-cmudict)                                       |\n| en-US          | CMU Dict IPA | IPA       | [External Link](https://github.com/menelik3/cmudict-ipa/blob/master/cmudict-0.7b-ipa.txt)                                  |                                                                                                                       |\n| en-US          | CharsiuG2P   | IPA       | [External Link](https://github.com/lingjzhu/CharsiuG2P/blob/main/dicts/eng-us.tsv)                                         | [charsiu/g2p_multilingual_byT5_small_100](https://huggingface.co/charsiu/g2p_multilingual_byT5_small_100)             |\n| en-US (Broad)  | Wikipron     | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_us_broad.tsv)                     | [bookbot/byt5-small-wikipron-eng-latn-us-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-us-broad) |\n| en-US (Narrow) | Wikipron     | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_us_narrow.tsv)                    |\n| en-US          | LibriSpeech  | IPA       | [Link](./lexikos/dict/cmudict-ipa/librispeech-lexicon-200k-allothers-g2p-ipa.tsv)                                          |                                                                                                                       |\n\n### English `(en-UK)`\n\n| Language       | Dictionary | Phone Set | Corpus                                                                                                  | G2P Model                                                                                                             |\n| -------------- | ---------- | --------- | ------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |\n| en-UK          | CharsiuG2P | IPA       | [External Link](https://github.com/lingjzhu/CharsiuG2P/blob/main/dicts/eng-uk.tsv)                      | [charsiu/g2p_multilingual_byT5_small_100](https://huggingface.co/charsiu/g2p_multilingual_byT5_small_100)             |\n| en-UK (Broad)  | Wikipron   | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_uk_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-uk-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-uk-broad) |\n| en-UK (Narrow) | Wikipron   | IPA       | [External Link](https://github.com/CUNY-CL/wikipron/blob/master/data/scrape/tsv/eng_latn_uk_narrow.tsv) |                                                                                                                       |\n\n### English `(en-AU)`\n\n| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |\n| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |\n| en-AU (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_au_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-au-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-au-broad) |\n| en-AU (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_au_narrow.tsv) |                                                                                                                       |\n| en-AU          | AusTalk    | IPA       | [Link](./lexikos/dict/asr-data/austalk_en_au.tsv)      |                                                                                                                       |\n| en-AU          | SC-CW      | IPA       | [Link](./lexikos/dict/asr-data/sc_cw_en_au.tsv)        |                                                                                                                       |\n\n### English `(en-CA)`\n\n| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |\n| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |\n| en-CA (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_ca_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-ca-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-ca-broad) |\n| en-CA (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_ca_narrow.tsv) |                                                                                                                       |\n\n### English `(en-NZ)`\n\n| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |\n| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |\n| en-NZ (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_nz_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-nz-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-nz-broad) |\n| en-NZ (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_nz_narrow.tsv) |                                                                                                                       |\n\n### English `(en-IN)`\n\n| Language       | Dictionary | Phone Set | Corpus                                                 | G2P Model                                                                                                             |\n| -------------- | ---------- | --------- | ------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------- |\n| en-IN (Broad)  | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_in_broad.tsv)  | [bookbot/byt5-small-wikipron-eng-latn-in-broad](https://huggingface.co/bookbot/byt5-small-wikipron-eng-latn-in-broad) |\n| en-IN (Narrow) | Wikipron   | IPA       | [Link](./lexikos/dict/wikipron/eng_latn_in_narrow.tsv) |                                                                                                                       |\n\n\n## Training G2P Model\n\nWe modified the sequence-to-sequence training script of [\ud83e\udd17 HuggingFace](https://github.com/huggingface/transformers/blob/main/examples/pytorch/translation/run_translation.py) for the purpose of training G2P models. Refer to their [installation requirements](https://github.com/huggingface/transformers/tree/main/examples/pytorch/translation) for more details.\n\nTraining a new G2P model generally follow this recipe:\n\n```diff\npython run_translation.py \\\n+   --model_name_or_path $PRETRAINED_MODEL \\\n+   --dataset_name $DATASET_NAME \\\n    --output_dir $OUTPUT_DIR \\\n    --per_device_train_batch_size 128 \\\n    --per_device_eval_batch_size 32 \\\n    --learning_rate 2e-4 \\\n    --lr_scheduler_type linear \\\n    --warmup_ratio 0.1 \\\n    --num_train_epochs 10 \\\n    --evaluation_strategy epoch \\\n    --save_strategy epoch \\\n    --logging_strategy epoch \\\n    --max_source_length 64 \\\n    --max_target_length 64 \\\n    --val_max_target_length 64 \\\n    --pad_to_max_length True \\\n    --overwrite_output_dir \\\n    --do_train --do_eval \\\n    --bf16 \\\n    --predict_with_generate \\\n    --report_to tensorboard \\\n    --push_to_hub \\\n+   --hub_model_id $HUB_MODEL_ID \\\n    --use_auth_token\n```\n\n### Example: Fine-tune ByT5 on CMU Dict\n\n```sh\npython run_translation.py \\\n    --model_name_or_path google/byt5-small \\\n    --dataset_name bookbot/cmudict-0.7b \\\n    --output_dir ./byt5-small-cmudict \\\n    --per_device_train_batch_size 128 \\\n    --per_device_eval_batch_size 32 \\\n    --learning_rate 2e-4 \\\n    --lr_scheduler_type linear \\\n    --warmup_ratio 0.1 \\\n    --num_train_epochs 10 \\\n    --evaluation_strategy epoch \\\n    --save_strategy epoch \\\n    --logging_strategy epoch \\\n    --max_source_length 64 \\\n    --max_target_length 64 \\\n    --val_max_target_length 64 \\\n    --pad_to_max_length True \\\n    --overwrite_output_dir \\\n    --do_train --do_eval \\\n    --bf16 \\\n    --predict_with_generate \\\n    --report_to tensorboard \\\n    --push_to_hub \\\n    --hub_model_id bookbot/byt5-small-cmudict \\\n    --use_auth_token\n```\n\n## Evaluating G2P Model\n\nThen to evaluate:\n\n```diff\npython eval.py \\\n+   --model $PRETRAINED_MODEL \\\n+   --dataset_name $DATASET_NAME \\\n    --source_text_column_name source \\\n    --target_text_column_name target \\\n    --max_length 64 \\\n    --batch_size 64\n```\n\n### Example: Evaluate ByT5 on CMU Dict\n\n```sh\npython eval.py \\\n    --model bookbot/byt5-small-cmudict \\\n    --dataset_name bookbot/cmudict-0.7b \\\n    --source_text_column_name source \\\n    --target_text_column_name target \\\n    --max_length 64 \\\n    --batch_size 64\n```\n\n## Corpus Roadmap\n\n### Wikipron\n\n| Language Family        | Code                              | Region                                                | Corpus | G2P Model |\n| ---------------------- | --------------------------------- | ----------------------------------------------------- | :----: | :-------: |\n| African English        | en-ZA                             | South Africa                                          |        |           |\n| Australian English     | en-AU                             | Australia                                             |   \u2705    |     \u2705     |\n| East Asian English     | en-CN, en-HK, en-JP, en-KR, en-TW | China, Hong Kong, Japan, South Korea, Taiwan          |        |           |\n| European English       | en-UK, en-HU, en-IE               | United Kingdom, Hungary, Ireland                      |   \ud83d\udea7    |     \ud83d\udea7     |\n| Mexican English        | en-MX                             | Mexico                                                |        |           |\n| New Zealand English    | en-NZ                             | New Zealand                                           |   \u2705    |     \u2705     |\n| North American         | en-CA, en-US                      | Canada, United States                                 |   \u2705    |     \u2705     |\n| Middle Eastern English | en-EG, en-IL                      | Egypt, Israel                                         |        |           |\n| Southeast Asian        | en-TH, en-ID, en-MY, en-PH, en-SG | Thailand, Indonesia, Malaysia, Philippines, Singapore |        |           |\n| South Asian English    | en-IN                             | India                                                 |   \u2705    |     \u2705     |\n  \n## Resources\n\n- [CharsiuG2P](https://github.com/lingjzhu/CharsiuG2P)\n- [Microsoft CNTK](https://github.com/microsoft/CNTK/tree/master)\n- [CMU Pronouncing Dictionary - IPA](https://github.com/menelik3/cmudict-ipa)\n- [Wikipron](https://github.com/CUNY-CL/wikipron/tree/master)\n\n## References\n\n```bibtex\n@inproceedings{lee-etal-2020-massively,\n    title = \"Massively Multilingual Pronunciation Modeling with {W}iki{P}ron\",\n    author = \"Lee, Jackson L.  and\n      Ashby, Lucas F.E.  and\n      Garza, M. Elizabeth  and\n      Lee-Sikka, Yeonju  and\n      Miller, Sean  and\n      Wong, Alan  and\n      McCarthy, Arya D.  and\n      Gorman, Kyle\",\n    booktitle = \"Proceedings of LREC\",\n    year = \"2020\",\n    publisher = \"European Language Resources Association\",\n    pages = \"4223--4228\",\n}\n```\n\n```bibtex\n@misc{zhu2022byt5,\n    title={ByT5 model for massively multilingual grapheme-to-phoneme conversion}, \n    author={Jian Zhu and Cong Zhang and David Jurgens},\n    year={2022},\n    eprint={2204.03067},\n    archivePrefix={arXiv},\n    primaryClass={cs.CL}\n}\n```\n",
    "bugtrack_url": null,
    "license": "Apache License Version 2.0, January 2004 http://www.apache.org/licenses/  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION  1. Definitions.  \"License\" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.  \"Licensor\" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.  \"Legal Entity\" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, \"control\" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.  \"You\" (or \"Your\") shall mean an individual or Legal Entity exercising permissions granted by this License.  \"Source\" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.  \"Object\" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.  \"Work\" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).  \"Derivative Works\" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.  \"Contribution\" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, \"submitted\" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as \"Not a Contribution.\"  \"Contributor\" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.  2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.  3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.  4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:  (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and  (b) You must cause any modified files to carry prominent notices stating that You changed the files; and  (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and  (d) If the Work includes a \"NOTICE\" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.  You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.  5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.  6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.  7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.  8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.  9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.  END OF TERMS AND CONDITIONS  APPENDIX: How to apply the Apache License to your work.  To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets \"[]\" replaced with your own identifying information. (Don't include the brackets!)  The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same \"printed page\" as the copyright notice for easier identification within third-party archives.  Copyright [yyyy] [name of copyright owner]  Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  http://www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ",
    "summary": "A collection of pronunciation dictionaries and neural grapheme-to-phoneme models.",
    "version": "0.0.1rc7",
    "project_urls": {
        "Bug Tracker": "https://github.com/bookbot-hive/lexikos/issues",
        "Homepage": "https://github.com/bookbot-hive/lexikos"
    },
    "split_keywords": [
        "linguistics",
        " pronunciation-dictionary",
        " g2p",
        " grapheme-to-phoneme",
        " neural-g2p"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5939a98b2ec76d74b24877d4daf6fb0c55f8fe1e611581e221cfeeff0bbd2896",
                "md5": "72b66fef36119ea4db4ce54a1cba2ca0",
                "sha256": "8dc1d8d0055f8131f0b0c9d82c3fed7f74965c2f3932bedfe2f42beb87203691"
            },
            "downloads": -1,
            "filename": "lexikos-0.0.1rc7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72b66fef36119ea4db4ce54a1cba2ca0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5872744,
            "upload_time": "2024-04-02T08:21:28",
            "upload_time_iso_8601": "2024-04-02T08:21:28.563487Z",
            "url": "https://files.pythonhosted.org/packages/59/39/a98b2ec76d74b24877d4daf6fb0c55f8fe1e611581e221cfeeff0bbd2896/lexikos-0.0.1rc7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d4c305b54d465401fe357b22abe82fadbd3b71606f01807c2f3f88d03778578f",
                "md5": "ff168ec0119a3226caefcb49c1fbddb7",
                "sha256": "0ecc8eae4b740e82d7b8cee50e905bfe92519c67c55d532ba5c8f7236c89e38b"
            },
            "downloads": -1,
            "filename": "lexikos-0.0.1rc7.tar.gz",
            "has_sig": false,
            "md5_digest": "ff168ec0119a3226caefcb49c1fbddb7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5838367,
            "upload_time": "2024-04-02T08:22:02",
            "upload_time_iso_8601": "2024-04-02T08:22:02.967573Z",
            "url": "https://files.pythonhosted.org/packages/d4/c3/05b54d465401fe357b22abe82fadbd3b71606f01807c2f3f88d03778578f/lexikos-0.0.1rc7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-02 08:22:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bookbot-hive",
    "github_project": "lexikos",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "inflect",
            "specs": []
        },
        {
            "name": "nltk",
            "specs": []
        },
        {
            "name": "onnx",
            "specs": []
        },
        {
            "name": "onnxruntime",
            "specs": []
        },
        {
            "name": "optimum",
            "specs": []
        }
    ],
    "lcname": "lexikos"
}
        
Elapsed time: 0.52638s