summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-29 13:27:40 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-29 13:27:40 +0000
commit27cf52aff1ee66c645d4fa5c93853f1dea93a75e (patch)
treeef2c3b9a8057baff1a750ca395c3d2261a6dae3d
parentf66b5d38c6e5761c84ed35cd020eda973473a06e (diff)
automatic import of python-pysle
-rw-r--r--.gitignore1
-rw-r--r--python-pysle.spec425
-rw-r--r--sources1
3 files changed, 427 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..4cbf5eb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pysle-4.0.0.tar.gz
diff --git a/python-pysle.spec b/python-pysle.spec
new file mode 100644
index 0000000..4cd19ee
--- /dev/null
+++ b/python-pysle.spec
@@ -0,0 +1,425 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pysle
+Version: 4.0.0
+Release: 1
+Summary: An interface to ISLEX, an IPA pronunciation dictionary for English with stress and syllable markings.
+License: LICENSE
+URL: https://github.com/timmahrt/pysle
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/f8/3e/7a84898b1af341547155ed6db9284313e5fbbcf8ca4d5f3fa2ee8983b7a2/pysle-4.0.0.tar.gz
+BuildArch: noarch
+
+Requires: python3-praatio
+Requires: python3-typing-extensions
+
+%description
+Pronounced like 'p' + 'isle'.
+An interface to a pronunciation dictionary with stress markings
+(ISLEX - the international speech lexicon),
+along with some tools for working with comparing and aligning
+pronunciations (e.g. a list of phones someone said versus a standard or
+canonical dictionary pronunciation).
+# Table of contents
+1. [Documentation](#documentation)
+2. [Tutorials](#tutorials)
+3. [Version History](#version-history)
+4. [Requirements](#requirements)
+5. [ISLE Dictionary](#isle-dictionary)
+6. [Installation](#installation)
+7. [Version 3 to 4 Migration](#version-3-to-4-migration)
+8. [Usage](#usage)
+9. [Common Use Cases](#common-use-cases)
+10. [Tests](#tests)
+11. [Citing psyle](#citing-pysle)
+12. [Acknowledgements](#acknowledgements)
+## Documentation
+Automatically generated pdocs can be found here:
+http://timmahrt.github.io/pysle/
+The documentation is generated with the following command:
+`pdoc ./pysle -d google -o docs`
+## Tutorials
+There are tutorials available for learning how to use Pysle. These
+are in the form of IPython Notebooks which can be found in the /tutorials/
+folder distributed with Pysle.
+You can view them online using the external website Jupyter:
+[Tutorial 1: Introduction to Pysle](<https://nbviewer.jupyter.org/github/timmahrt/pysle/blob/main/tutorials/tutorial1_intro_to_pysle.ipynb>)
+## Version History
+*Pysle uses semantic versioning (Major.Minor.Patch)*
+Please view [CHANGELOG.md](https://github.com/timmahrt/pysle/blob/main/CHANGELOG.md) for version history.
+## Requirements
+The following python modules are required. They should be installed automatically but you can
+install them manually if you have any problems.
+- [typing-extensions](`https://pypi.org/project/typing-extensions/`)
+- [praatIO](<https://github.com/timmahrt/praatIO>)
+``Python 3.7.*`` or above
+[Click here to visit travis-ci and see the specific versions of python that pysle is currently tested under](<https://app.travis-ci.com/github/timmahrt/pysle>)
+If you are using ``Python 2.x`` or ``Python < 3.7``, you can use `Pysle 3.x`.
+## ISLE Dictionary
+pysle requires the ISLEdict pronunciation dictionary
+(copyright Mark Hasegawa-Johnson, licensed under the MIT open source license).
+This is bundled with psyle. However, you may want to use a subset of the pronunciations
+or you may want to add your own pronunciations.
+In that case, please get the original file.
+ [ISLEX github page](<https://github.com/uiuc-sst/g2ps>)
+ [Direct link to the ISLEX file used in this project](<https://raw.githubusercontent.com/uiuc-sst/g2ps/master/English/ISLEdict.txt>) (ISLEdict.txt)
+See `examples/isletool_examples.py` for an example of how to load a custom ISLEdict file.
+## Installation
+Pysle is on pypi and can be installed or upgraded from the command-line shell with pip like so
+ python -m pip install pysle --upgrade
+Otherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and type
+ python setup.py install
+If python is not in your path, you'll need to enter the full path e.g.
+ C:\Python36\python.exe setup.py install
+## Version 3 to 4 Migration
+The iterface to isle dictionaries, praattools, and pronunciationtools haven't changed so
+much except for a bit of renaming.
+The expected return types have completely changed however--shifting to datatypes now defined
+in `phonetics.py`. If you are struggling with migrating to version 4, please let me know.
+Looking over changes to the example files may help show the changes that need to be made
+to get the same results.
+## Usage
+Here is a typical usage
+```python
+from pysle import isletool
+isle = isletool.Isle()
+print(isle.lookup('catatonic')[0].toList()) # Get the first entry's pronunciation
+# >> [[['k', 'ˌæ'], ['ɾ', 'ə'], ['t', 'ˈɑ'], ['n', 'ɪ', 'k']]]
+```
+and another
+```python
+from pysle import isletool
+from pysle import pronunciationtools
+isle = isletool.Isle()
+searchWord = 'another'
+phoneList = ['n', 'ʌ', 'ð', 'ɚ']
+returnList = pronunciationtools.findBestSyllabification(isle, searchWord, phoneList)
+syllableList = returnList[2]
+print(syllableList)
+# >> [["''"], ['n', 'ʌ'], ['ð', 'ɚ']]
+```
+Please see \\examples for example usage
+## Common Use Cases
+What can you do with this library?
+- look up the list of phones and syllables for canonical pronunciations
+ of a word
+ ```python
+ isletool.LexicalTool('ISLEdict.txt').lookup('cat')
+ ```
+- map an actual pronunciation to a dictionary pronunciation (can be used
+ to automatically find speech errors)
+ ```python
+ pronunciationtools.findClosestEntryForPhones(isleDict, 'cat', ['k', 'æ',])
+ ```
+- automatically syllabify a praat textgrid (see [praatIO](<https://github.com/timmahrt/praatIO>))
+ containing words and phones (e.g. force-aligned text)
+ ```python
+ pysle.syllabifyTextgrid(isleDict, praatioTextgrid, "words", "phones")
+ ```
+## Tests
+I run tests with the following command (this requires pytest and pytest-cov to be installed):
+`pytest --cov=pysle tests/`
+## Citing pysle
+Pysle is general purpose coding and doesn't need to be cited
+(you should cite the
+[ISLEX project](<http://www.isle.illinois.edu/speech_web_lg/data/g2ps/>)
+instead) but if you would like to, it can be cited like so:
+Tim Mahrt. Pysle. https://github.com/timmahrt/pysle, 2016.
+## Acknowledgements
+Development of Pysle was possible thanks to NSF grant **IIS 07-03624**
+to Jennifer Cole and Mark Hasegawa-Johnson, NSF grant **BCS 12-51343**
+to Jennifer Cole, José Hualde, and Caroline Smith, and
+to the A*MIDEX project (n° **ANR-11-IDEX-0001-02**) to James Sneed German
+funded by the Investissements d'Avenir French Government program, managed
+by the French National Research Agency (ANR).
+
+%package -n python3-pysle
+Summary: An interface to ISLEX, an IPA pronunciation dictionary for English with stress and syllable markings.
+Provides: python-pysle
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pysle
+Pronounced like 'p' + 'isle'.
+An interface to a pronunciation dictionary with stress markings
+(ISLEX - the international speech lexicon),
+along with some tools for working with comparing and aligning
+pronunciations (e.g. a list of phones someone said versus a standard or
+canonical dictionary pronunciation).
+# Table of contents
+1. [Documentation](#documentation)
+2. [Tutorials](#tutorials)
+3. [Version History](#version-history)
+4. [Requirements](#requirements)
+5. [ISLE Dictionary](#isle-dictionary)
+6. [Installation](#installation)
+7. [Version 3 to 4 Migration](#version-3-to-4-migration)
+8. [Usage](#usage)
+9. [Common Use Cases](#common-use-cases)
+10. [Tests](#tests)
+11. [Citing psyle](#citing-pysle)
+12. [Acknowledgements](#acknowledgements)
+## Documentation
+Automatically generated pdocs can be found here:
+http://timmahrt.github.io/pysle/
+The documentation is generated with the following command:
+`pdoc ./pysle -d google -o docs`
+## Tutorials
+There are tutorials available for learning how to use Pysle. These
+are in the form of IPython Notebooks which can be found in the /tutorials/
+folder distributed with Pysle.
+You can view them online using the external website Jupyter:
+[Tutorial 1: Introduction to Pysle](<https://nbviewer.jupyter.org/github/timmahrt/pysle/blob/main/tutorials/tutorial1_intro_to_pysle.ipynb>)
+## Version History
+*Pysle uses semantic versioning (Major.Minor.Patch)*
+Please view [CHANGELOG.md](https://github.com/timmahrt/pysle/blob/main/CHANGELOG.md) for version history.
+## Requirements
+The following python modules are required. They should be installed automatically but you can
+install them manually if you have any problems.
+- [typing-extensions](`https://pypi.org/project/typing-extensions/`)
+- [praatIO](<https://github.com/timmahrt/praatIO>)
+``Python 3.7.*`` or above
+[Click here to visit travis-ci and see the specific versions of python that pysle is currently tested under](<https://app.travis-ci.com/github/timmahrt/pysle>)
+If you are using ``Python 2.x`` or ``Python < 3.7``, you can use `Pysle 3.x`.
+## ISLE Dictionary
+pysle requires the ISLEdict pronunciation dictionary
+(copyright Mark Hasegawa-Johnson, licensed under the MIT open source license).
+This is bundled with psyle. However, you may want to use a subset of the pronunciations
+or you may want to add your own pronunciations.
+In that case, please get the original file.
+ [ISLEX github page](<https://github.com/uiuc-sst/g2ps>)
+ [Direct link to the ISLEX file used in this project](<https://raw.githubusercontent.com/uiuc-sst/g2ps/master/English/ISLEdict.txt>) (ISLEdict.txt)
+See `examples/isletool_examples.py` for an example of how to load a custom ISLEdict file.
+## Installation
+Pysle is on pypi and can be installed or upgraded from the command-line shell with pip like so
+ python -m pip install pysle --upgrade
+Otherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and type
+ python setup.py install
+If python is not in your path, you'll need to enter the full path e.g.
+ C:\Python36\python.exe setup.py install
+## Version 3 to 4 Migration
+The iterface to isle dictionaries, praattools, and pronunciationtools haven't changed so
+much except for a bit of renaming.
+The expected return types have completely changed however--shifting to datatypes now defined
+in `phonetics.py`. If you are struggling with migrating to version 4, please let me know.
+Looking over changes to the example files may help show the changes that need to be made
+to get the same results.
+## Usage
+Here is a typical usage
+```python
+from pysle import isletool
+isle = isletool.Isle()
+print(isle.lookup('catatonic')[0].toList()) # Get the first entry's pronunciation
+# >> [[['k', 'ˌæ'], ['ɾ', 'ə'], ['t', 'ˈɑ'], ['n', 'ɪ', 'k']]]
+```
+and another
+```python
+from pysle import isletool
+from pysle import pronunciationtools
+isle = isletool.Isle()
+searchWord = 'another'
+phoneList = ['n', 'ʌ', 'ð', 'ɚ']
+returnList = pronunciationtools.findBestSyllabification(isle, searchWord, phoneList)
+syllableList = returnList[2]
+print(syllableList)
+# >> [["''"], ['n', 'ʌ'], ['ð', 'ɚ']]
+```
+Please see \\examples for example usage
+## Common Use Cases
+What can you do with this library?
+- look up the list of phones and syllables for canonical pronunciations
+ of a word
+ ```python
+ isletool.LexicalTool('ISLEdict.txt').lookup('cat')
+ ```
+- map an actual pronunciation to a dictionary pronunciation (can be used
+ to automatically find speech errors)
+ ```python
+ pronunciationtools.findClosestEntryForPhones(isleDict, 'cat', ['k', 'æ',])
+ ```
+- automatically syllabify a praat textgrid (see [praatIO](<https://github.com/timmahrt/praatIO>))
+ containing words and phones (e.g. force-aligned text)
+ ```python
+ pysle.syllabifyTextgrid(isleDict, praatioTextgrid, "words", "phones")
+ ```
+## Tests
+I run tests with the following command (this requires pytest and pytest-cov to be installed):
+`pytest --cov=pysle tests/`
+## Citing pysle
+Pysle is general purpose coding and doesn't need to be cited
+(you should cite the
+[ISLEX project](<http://www.isle.illinois.edu/speech_web_lg/data/g2ps/>)
+instead) but if you would like to, it can be cited like so:
+Tim Mahrt. Pysle. https://github.com/timmahrt/pysle, 2016.
+## Acknowledgements
+Development of Pysle was possible thanks to NSF grant **IIS 07-03624**
+to Jennifer Cole and Mark Hasegawa-Johnson, NSF grant **BCS 12-51343**
+to Jennifer Cole, José Hualde, and Caroline Smith, and
+to the A*MIDEX project (n° **ANR-11-IDEX-0001-02**) to James Sneed German
+funded by the Investissements d'Avenir French Government program, managed
+by the French National Research Agency (ANR).
+
+%package help
+Summary: Development documents and examples for pysle
+Provides: python3-pysle-doc
+%description help
+Pronounced like 'p' + 'isle'.
+An interface to a pronunciation dictionary with stress markings
+(ISLEX - the international speech lexicon),
+along with some tools for working with comparing and aligning
+pronunciations (e.g. a list of phones someone said versus a standard or
+canonical dictionary pronunciation).
+# Table of contents
+1. [Documentation](#documentation)
+2. [Tutorials](#tutorials)
+3. [Version History](#version-history)
+4. [Requirements](#requirements)
+5. [ISLE Dictionary](#isle-dictionary)
+6. [Installation](#installation)
+7. [Version 3 to 4 Migration](#version-3-to-4-migration)
+8. [Usage](#usage)
+9. [Common Use Cases](#common-use-cases)
+10. [Tests](#tests)
+11. [Citing psyle](#citing-pysle)
+12. [Acknowledgements](#acknowledgements)
+## Documentation
+Automatically generated pdocs can be found here:
+http://timmahrt.github.io/pysle/
+The documentation is generated with the following command:
+`pdoc ./pysle -d google -o docs`
+## Tutorials
+There are tutorials available for learning how to use Pysle. These
+are in the form of IPython Notebooks which can be found in the /tutorials/
+folder distributed with Pysle.
+You can view them online using the external website Jupyter:
+[Tutorial 1: Introduction to Pysle](<https://nbviewer.jupyter.org/github/timmahrt/pysle/blob/main/tutorials/tutorial1_intro_to_pysle.ipynb>)
+## Version History
+*Pysle uses semantic versioning (Major.Minor.Patch)*
+Please view [CHANGELOG.md](https://github.com/timmahrt/pysle/blob/main/CHANGELOG.md) for version history.
+## Requirements
+The following python modules are required. They should be installed automatically but you can
+install them manually if you have any problems.
+- [typing-extensions](`https://pypi.org/project/typing-extensions/`)
+- [praatIO](<https://github.com/timmahrt/praatIO>)
+``Python 3.7.*`` or above
+[Click here to visit travis-ci and see the specific versions of python that pysle is currently tested under](<https://app.travis-ci.com/github/timmahrt/pysle>)
+If you are using ``Python 2.x`` or ``Python < 3.7``, you can use `Pysle 3.x`.
+## ISLE Dictionary
+pysle requires the ISLEdict pronunciation dictionary
+(copyright Mark Hasegawa-Johnson, licensed under the MIT open source license).
+This is bundled with psyle. However, you may want to use a subset of the pronunciations
+or you may want to add your own pronunciations.
+In that case, please get the original file.
+ [ISLEX github page](<https://github.com/uiuc-sst/g2ps>)
+ [Direct link to the ISLEX file used in this project](<https://raw.githubusercontent.com/uiuc-sst/g2ps/master/English/ISLEdict.txt>) (ISLEdict.txt)
+See `examples/isletool_examples.py` for an example of how to load a custom ISLEdict file.
+## Installation
+Pysle is on pypi and can be installed or upgraded from the command-line shell with pip like so
+ python -m pip install pysle --upgrade
+Otherwise, to manually install, after downloading the source from github, from a command-line shell, navigate to the directory containing setup.py and type
+ python setup.py install
+If python is not in your path, you'll need to enter the full path e.g.
+ C:\Python36\python.exe setup.py install
+## Version 3 to 4 Migration
+The iterface to isle dictionaries, praattools, and pronunciationtools haven't changed so
+much except for a bit of renaming.
+The expected return types have completely changed however--shifting to datatypes now defined
+in `phonetics.py`. If you are struggling with migrating to version 4, please let me know.
+Looking over changes to the example files may help show the changes that need to be made
+to get the same results.
+## Usage
+Here is a typical usage
+```python
+from pysle import isletool
+isle = isletool.Isle()
+print(isle.lookup('catatonic')[0].toList()) # Get the first entry's pronunciation
+# >> [[['k', 'ˌæ'], ['ɾ', 'ə'], ['t', 'ˈɑ'], ['n', 'ɪ', 'k']]]
+```
+and another
+```python
+from pysle import isletool
+from pysle import pronunciationtools
+isle = isletool.Isle()
+searchWord = 'another'
+phoneList = ['n', 'ʌ', 'ð', 'ɚ']
+returnList = pronunciationtools.findBestSyllabification(isle, searchWord, phoneList)
+syllableList = returnList[2]
+print(syllableList)
+# >> [["''"], ['n', 'ʌ'], ['ð', 'ɚ']]
+```
+Please see \\examples for example usage
+## Common Use Cases
+What can you do with this library?
+- look up the list of phones and syllables for canonical pronunciations
+ of a word
+ ```python
+ isletool.LexicalTool('ISLEdict.txt').lookup('cat')
+ ```
+- map an actual pronunciation to a dictionary pronunciation (can be used
+ to automatically find speech errors)
+ ```python
+ pronunciationtools.findClosestEntryForPhones(isleDict, 'cat', ['k', 'æ',])
+ ```
+- automatically syllabify a praat textgrid (see [praatIO](<https://github.com/timmahrt/praatIO>))
+ containing words and phones (e.g. force-aligned text)
+ ```python
+ pysle.syllabifyTextgrid(isleDict, praatioTextgrid, "words", "phones")
+ ```
+## Tests
+I run tests with the following command (this requires pytest and pytest-cov to be installed):
+`pytest --cov=pysle tests/`
+## Citing pysle
+Pysle is general purpose coding and doesn't need to be cited
+(you should cite the
+[ISLEX project](<http://www.isle.illinois.edu/speech_web_lg/data/g2ps/>)
+instead) but if you would like to, it can be cited like so:
+Tim Mahrt. Pysle. https://github.com/timmahrt/pysle, 2016.
+## Acknowledgements
+Development of Pysle was possible thanks to NSF grant **IIS 07-03624**
+to Jennifer Cole and Mark Hasegawa-Johnson, NSF grant **BCS 12-51343**
+to Jennifer Cole, José Hualde, and Caroline Smith, and
+to the A*MIDEX project (n° **ANR-11-IDEX-0001-02**) to James Sneed German
+funded by the Investissements d'Avenir French Government program, managed
+by the French National Research Agency (ANR).
+
+%prep
+%autosetup -n pysle-4.0.0
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-pysle -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 4.0.0-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..3c41b7d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+1488a94049a9d649966b1447c9a30f14 pysle-4.0.0.tar.gz