summaryrefslogtreecommitdiff
path: root/python-text2ipa.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 05:13:57 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 05:13:57 +0000
commitbff043bc3748be64aaaed8a150dfc18287c3ce1b (patch)
treef0f4d45236b1dba7e0a97ad46a201ad999e27eaf /python-text2ipa.spec
parent28c36a2262a0d86a557a105df955900ac20dd14b (diff)
automatic import of python-text2ipa
Diffstat (limited to 'python-text2ipa.spec')
-rw-r--r--python-text2ipa.spec374
1 files changed, 374 insertions, 0 deletions
diff --git a/python-text2ipa.spec b/python-text2ipa.spec
new file mode 100644
index 0000000..276819b
--- /dev/null
+++ b/python-text2ipa.spec
@@ -0,0 +1,374 @@
+%global _empty_manifest_terminate_build 0
+Name: python-text2ipa
+Version: 2.0.2
+Release: 1
+Summary: Convert text to IPA for English and French
+License: Apache 2.0
+URL: https://github.com/tquangsdh20/text2ipa
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/1b/dd/451e7a41eef33c32de57a4dc234afc96e4210bc7721d4166d70ff0d3bc59/text2ipa-2.0.2.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-bs4
+
+%description
+<p align="center">
+<img src="https://raw.githubusercontent.com/tquangsdh20/text2ipa/master/.github/logo.gif">
+<img src="https://github.com/tquangsdh20/text2ipa/actions/workflows/test.yml/badge.svg?style=plastic"> <a href="https://app.codecov.io/gh/tquangsdh20/text2ipa/blob/af74004d58fb4cde15ea29b1184fc7a025ca9fc2/text2ipa/__main__.py"><img src="https://codecov.io/gh/tquangsdh20/text2ipa/branch/master/graphs/badge.svg?branch=master"></a> <img src="https://img.shields.io/pypi/implementation/text2ipa"> <img src = "https://img.shields.io/pypi/pyversions/text2ipa"> <img src="https://img.shields.io/badge/author-tquangsdh20-orange">
+</p>
+
+
+
+## Installation:
+
+**Windows**
+```
+python -m pip install text2ipa
+```
+**macOS**
+```
+sudo pip3 install text2ipa
+```
+**Linux**
+```
+pip install text2ipa
+```
+
+## Features
+
+- Convert English text to IPA using the [toPhonetic](https://tophonetics.com/)
+- Three options Language English UK, English US and French
+
+## Examples
+
+### Example 1: Convert a text
+
+#### Function:
+- `get_IPA()` : Converting a text to IPA with the following parameters
+
+#### Parameters:
+
+- `text` : The text you want to convert to IPA
+- `language` : Choose between English US, English UK and French ('am', 'br' or 'fr')
+- `proxy` : Optional parameter
+
+#### For instance:
+
+```python
+from text2ipa import get_IPA
+# Convert 'hello world' to English US International Alphabet
+text = 'hello world'
+language = 'am'
+ipa = get_IPA(text, language)
+# Convert 'je parle un peu français' to IPA
+text = 'je parle un peu français'
+language = 'fr'
+fr_ipa = get_IPA(text, language)
+print(ipa)
+print(fr_ipa)
+```
+```
+>> həˈloʊ wɜrld
+>> ʒə paʀle œ̃ pø fʀɑ̃̃sɛ
+```
+
+### Example 2: Convert a bulk
+
+#### Function:
+- `get_IPAs()` : Convert the list of texts to IPA return the list of IPAs
+
+#### Parameters:
+
+- `bulk` : The list of text want to convert to IPA
+- `language` : Choose between English US and English UK ('am', 'br' or 'fr')
+- `proxy` : Optional parameter
+
+#### For instance:
+
+```python
+from text2ipa import get_IPAs
+bulk = ['how are you?','how it\'s going?','that\'s good']
+language = 'br'
+# Convert a list of text to English UK IPA
+IPAs = get_IPAs(bulk,language)
+for ipa in IPAs:
+ print(ipa)
+```
+
+```
+>> haʊ ɑː juː?
+>> haʊ ɪts ˈgəʊɪŋ?
+>> ðæts gʊd
+```
+
+#### Log Changes
+
+V1.0.0 : Create new with 2 functions `get_IPA()` and `get_IPAs()`
+V1.2.0 : Update comment and guideline in functions, fixed ERROR for setup with the other Python versions
+V1.3.0 : Fixed MISSING install requires and update information for Python versions
+V1.4.0 : Update building & testing for this package
+V1.4.1 : Fixed Error Import `get_IPA()` and `get_IPAs`
+V2.0.1 : New feature working with French
+V2.0.2 : Update dependencies
+
+<a href="https://github.com/tquangsdh20/text2ipa"><p align="center"><img src="https://img.shields.io/badge/Github-tquangsdh20-orange?style=social&logo=github"></p></a>
+
+
+%package -n python3-text2ipa
+Summary: Convert text to IPA for English and French
+Provides: python-text2ipa
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-text2ipa
+<p align="center">
+<img src="https://raw.githubusercontent.com/tquangsdh20/text2ipa/master/.github/logo.gif">
+<img src="https://github.com/tquangsdh20/text2ipa/actions/workflows/test.yml/badge.svg?style=plastic"> <a href="https://app.codecov.io/gh/tquangsdh20/text2ipa/blob/af74004d58fb4cde15ea29b1184fc7a025ca9fc2/text2ipa/__main__.py"><img src="https://codecov.io/gh/tquangsdh20/text2ipa/branch/master/graphs/badge.svg?branch=master"></a> <img src="https://img.shields.io/pypi/implementation/text2ipa"> <img src = "https://img.shields.io/pypi/pyversions/text2ipa"> <img src="https://img.shields.io/badge/author-tquangsdh20-orange">
+</p>
+
+
+
+## Installation:
+
+**Windows**
+```
+python -m pip install text2ipa
+```
+**macOS**
+```
+sudo pip3 install text2ipa
+```
+**Linux**
+```
+pip install text2ipa
+```
+
+## Features
+
+- Convert English text to IPA using the [toPhonetic](https://tophonetics.com/)
+- Three options Language English UK, English US and French
+
+## Examples
+
+### Example 1: Convert a text
+
+#### Function:
+- `get_IPA()` : Converting a text to IPA with the following parameters
+
+#### Parameters:
+
+- `text` : The text you want to convert to IPA
+- `language` : Choose between English US, English UK and French ('am', 'br' or 'fr')
+- `proxy` : Optional parameter
+
+#### For instance:
+
+```python
+from text2ipa import get_IPA
+# Convert 'hello world' to English US International Alphabet
+text = 'hello world'
+language = 'am'
+ipa = get_IPA(text, language)
+# Convert 'je parle un peu français' to IPA
+text = 'je parle un peu français'
+language = 'fr'
+fr_ipa = get_IPA(text, language)
+print(ipa)
+print(fr_ipa)
+```
+```
+>> həˈloʊ wɜrld
+>> ʒə paʀle œ̃ pø fʀɑ̃̃sɛ
+```
+
+### Example 2: Convert a bulk
+
+#### Function:
+- `get_IPAs()` : Convert the list of texts to IPA return the list of IPAs
+
+#### Parameters:
+
+- `bulk` : The list of text want to convert to IPA
+- `language` : Choose between English US and English UK ('am', 'br' or 'fr')
+- `proxy` : Optional parameter
+
+#### For instance:
+
+```python
+from text2ipa import get_IPAs
+bulk = ['how are you?','how it\'s going?','that\'s good']
+language = 'br'
+# Convert a list of text to English UK IPA
+IPAs = get_IPAs(bulk,language)
+for ipa in IPAs:
+ print(ipa)
+```
+
+```
+>> haʊ ɑː juː?
+>> haʊ ɪts ˈgəʊɪŋ?
+>> ðæts gʊd
+```
+
+#### Log Changes
+
+V1.0.0 : Create new with 2 functions `get_IPA()` and `get_IPAs()`
+V1.2.0 : Update comment and guideline in functions, fixed ERROR for setup with the other Python versions
+V1.3.0 : Fixed MISSING install requires and update information for Python versions
+V1.4.0 : Update building & testing for this package
+V1.4.1 : Fixed Error Import `get_IPA()` and `get_IPAs`
+V2.0.1 : New feature working with French
+V2.0.2 : Update dependencies
+
+<a href="https://github.com/tquangsdh20/text2ipa"><p align="center"><img src="https://img.shields.io/badge/Github-tquangsdh20-orange?style=social&logo=github"></p></a>
+
+
+%package help
+Summary: Development documents and examples for text2ipa
+Provides: python3-text2ipa-doc
+%description help
+<p align="center">
+<img src="https://raw.githubusercontent.com/tquangsdh20/text2ipa/master/.github/logo.gif">
+<img src="https://github.com/tquangsdh20/text2ipa/actions/workflows/test.yml/badge.svg?style=plastic"> <a href="https://app.codecov.io/gh/tquangsdh20/text2ipa/blob/af74004d58fb4cde15ea29b1184fc7a025ca9fc2/text2ipa/__main__.py"><img src="https://codecov.io/gh/tquangsdh20/text2ipa/branch/master/graphs/badge.svg?branch=master"></a> <img src="https://img.shields.io/pypi/implementation/text2ipa"> <img src = "https://img.shields.io/pypi/pyversions/text2ipa"> <img src="https://img.shields.io/badge/author-tquangsdh20-orange">
+</p>
+
+
+
+## Installation:
+
+**Windows**
+```
+python -m pip install text2ipa
+```
+**macOS**
+```
+sudo pip3 install text2ipa
+```
+**Linux**
+```
+pip install text2ipa
+```
+
+## Features
+
+- Convert English text to IPA using the [toPhonetic](https://tophonetics.com/)
+- Three options Language English UK, English US and French
+
+## Examples
+
+### Example 1: Convert a text
+
+#### Function:
+- `get_IPA()` : Converting a text to IPA with the following parameters
+
+#### Parameters:
+
+- `text` : The text you want to convert to IPA
+- `language` : Choose between English US, English UK and French ('am', 'br' or 'fr')
+- `proxy` : Optional parameter
+
+#### For instance:
+
+```python
+from text2ipa import get_IPA
+# Convert 'hello world' to English US International Alphabet
+text = 'hello world'
+language = 'am'
+ipa = get_IPA(text, language)
+# Convert 'je parle un peu français' to IPA
+text = 'je parle un peu français'
+language = 'fr'
+fr_ipa = get_IPA(text, language)
+print(ipa)
+print(fr_ipa)
+```
+```
+>> həˈloʊ wɜrld
+>> ʒə paʀle œ̃ pø fʀɑ̃̃sɛ
+```
+
+### Example 2: Convert a bulk
+
+#### Function:
+- `get_IPAs()` : Convert the list of texts to IPA return the list of IPAs
+
+#### Parameters:
+
+- `bulk` : The list of text want to convert to IPA
+- `language` : Choose between English US and English UK ('am', 'br' or 'fr')
+- `proxy` : Optional parameter
+
+#### For instance:
+
+```python
+from text2ipa import get_IPAs
+bulk = ['how are you?','how it\'s going?','that\'s good']
+language = 'br'
+# Convert a list of text to English UK IPA
+IPAs = get_IPAs(bulk,language)
+for ipa in IPAs:
+ print(ipa)
+```
+
+```
+>> haʊ ɑː juː?
+>> haʊ ɪts ˈgəʊɪŋ?
+>> ðæts gʊd
+```
+
+#### Log Changes
+
+V1.0.0 : Create new with 2 functions `get_IPA()` and `get_IPAs()`
+V1.2.0 : Update comment and guideline in functions, fixed ERROR for setup with the other Python versions
+V1.3.0 : Fixed MISSING install requires and update information for Python versions
+V1.4.0 : Update building & testing for this package
+V1.4.1 : Fixed Error Import `get_IPA()` and `get_IPAs`
+V2.0.1 : New feature working with French
+V2.0.2 : Update dependencies
+
+<a href="https://github.com/tquangsdh20/text2ipa"><p align="center"><img src="https://img.shields.io/badge/Github-tquangsdh20-orange?style=social&logo=github"></p></a>
+
+
+%prep
+%autosetup -n text2ipa-2.0.2
+
+%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-text2ipa -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 2.0.2-1
+- Package Spec generated