From bff043bc3748be64aaaed8a150dfc18287c3ce1b Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 15 May 2023 05:13:57 +0000 Subject: automatic import of python-text2ipa --- .gitignore | 1 + python-text2ipa.spec | 374 +++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 376 insertions(+) create mode 100644 python-text2ipa.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..47c3fec 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/text2ipa-2.0.2.tar.gz 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 +

+ + +

+ + + +## 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 + +

+ + +%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 +

+ + +

+ + + +## 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 + +

+ + +%package help +Summary: Development documents and examples for text2ipa +Provides: python3-text2ipa-doc +%description help +

+ + +

+ + + +## 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 + +

+ + +%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 - 2.0.2-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..aa7be30 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +ba0be26825f6e6a9bfacb3694df895e7 text2ipa-2.0.2.tar.gz -- cgit v1.2.3