diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-29 10:54:31 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-29 10:54:31 +0000 |
commit | 75dc0bb571e2791f238b85c15639d4484cb336cf (patch) | |
tree | dba296bd4943251a663c09be1368951c3cf55209 | |
parent | 5ad98b47cf89d2ecf530f69cf14afc940da4ea89 (diff) |
automatic import of python-random-word-generator
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-random-word-generator.spec | 669 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 671 insertions, 0 deletions
@@ -0,0 +1 @@ +/Random-Word-Generator-1.3.tar.gz diff --git a/python-random-word-generator.spec b/python-random-word-generator.spec new file mode 100644 index 0000000..8a1840d --- /dev/null +++ b/python-random-word-generator.spec @@ -0,0 +1,669 @@ +%global _empty_manifest_terminate_build 0 +Name: python-Random-Word-Generator +Version: 1.3 +Release: 1 +Summary: This is a random word generator module +License: MIT License +URL: https://github.com/AbhishekSalian/Random-Word-Generator +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/8b/60/088c690d74a401525e12c122c6f55657d4fab3d5a979c5dd3c740d8d2f17/Random-Word-Generator-1.3.tar.gz +BuildArch: noarch + + +%description +# Random Word Generator + +[](https://opensource.org/licenses/MIT) + + + +[](https://www.python.org/) +[](https://pypi.org/project/Random-Word-Generator/) + + + +<h1 align="center"> + <img src="https://github.com/AbhishekSalian/Random-Word-Generator/blob/master/image/rwg.png?raw=true" alt="logo"/> +</h1> + +## __How to install this library?__ +``` +pip3 install Random-Word-Generator + +OR + +pip install Random-Word-Generator +``` + +## __Which other python packages are needed to be installed?__ +* No need of any external packages +* Only Python version >= 3 is required + + +## __What this library does?__ +It helps us to generate random words i.e random noise in text data which is helpful in many text augmentation based tasks, NER, etc. + +## __Which methods are available currently in this library?__ +<table class="tg"> +<thead> + <tr> + <th class="tg-d9cy">Method</th> + <th class="tg-d9cy">Args</th> + <th class="tg-d9cy">Description</th> + </tr> +</thead> +<tbody> + <tr> + <td class="tg-d9cy">.generate()</td> + <td class="tg-d9cy">None</td> + <td class="tg-d9cy"><span style="font-weight:400;font-style:normal">This will return a randomly generated word</span></td> + </tr> + <tr> + <td class="tg-d9cy">.getList(num_of_words)</td> + <td class="tg-d9cy">num_of_words</td> + <td class="tg-d9cy"><span style="font-weight:400;font-style:normal">This will return list of random words</span></td> + </tr> +</tbody> +</table> + + +## __Setting to look out before generating random words__ + +### Basic +``` +from RandomWordGenerator import RandomWord + +# Creating a random word object +rw = RandomWord(max_word_size, + constant_word_size=True, + include_digits=False, + special_chars=r"@_!#$%^&*()<>?/\|}{~:", + include_special_chars=False) +``` +<table class="tg" style="undefined;table-layout: fixed; width: 538px"> +<colgroup> +<col style="width: 149px"> +<col style="width: 85px"> +<col style="width: 80px"> +<col style="width: 189px"> +</colgroup> +<thead> + <tr> + <th class="tg-cbj7">Args</th> + <th class="tg-cbj7">Data Type</th> + <th class="tg-cbj7">Default</th> + <th class="tg-oj67">Description</th> + </tr> +</thead> +<tbody> + <tr> + <td class="tg-oj67">max_word_size</td> + <td class="tg-oj67">int</td> + <td class="tg-oj67">10</td> + <td class="tg-oj67">Represents maximum length of randomly generated word</td> + </tr> + <tr> + <td class="tg-oj67">constant_word_size</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">True</td> + <td class="tg-oj67">Represents word length of<br>randomly generated word</td> + </tr> + <tr> + <td class="tg-oj67">include_digits</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">False</td> + <td class="tg-oj67">Represents whether or not to include digits in generated words</td> + </tr> + <tr> + <td class="tg-oj67">special_chars</td> + <td class="tg-oj67">regex/string</td> + <td class="tg-oj67">r"@_!#$%^&*()<>?/\\<br>|}{~:"</td> + <td class="tg-oj67">Represents a regex string of all specials character you want to include in generated words</td> + </tr> + <tr> + <td class="tg-oj67">include_special_chars</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">False</td> + <td class="tg-oj67">Represents inclusion of special characters in generated words</td> + </tr> +</tbody> +</table> + + + + +## __How to get started with this library?__ + +1. Simple random word generation with constant word size + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > hdsjq + ``` + +2. Simple random word generation with variable word size + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=False) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > gw + ``` +3. Random word generation with constant word size and including special character included + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=True, + special_chars=r"@#$%.*", + include_special_chars=True) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > gsd$ + ``` +4. If we want randomly generated words in list we just have to input the argument with number of words we want + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=False) + + print(rw.getList(num_of_random_words=3)) + ``` + ``` + Output will be some random word like + > ['adjse', 'qytqw', ' klsdf', 'ywete', 'klljs'] + + ``` + +## __Application__ + +* In cases where we need to add random noise in text +* Name Entity Relation extraction based tasks +* Text Data Augmentation based tasks + + +## Author +I will be happy to connect with you guys!! + +[Linkedin](https://www.linkedin.com/in/abhishek-c-salian/) + +[Twitter](https://www.twitter.com/@ACSalian) + + +**Any suggestions are most welcome.** + +# + + + + +%package -n python3-Random-Word-Generator +Summary: This is a random word generator module +Provides: python-Random-Word-Generator +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-Random-Word-Generator +# Random Word Generator + +[](https://opensource.org/licenses/MIT) + + + +[](https://www.python.org/) +[](https://pypi.org/project/Random-Word-Generator/) + + + +<h1 align="center"> + <img src="https://github.com/AbhishekSalian/Random-Word-Generator/blob/master/image/rwg.png?raw=true" alt="logo"/> +</h1> + +## __How to install this library?__ +``` +pip3 install Random-Word-Generator + +OR + +pip install Random-Word-Generator +``` + +## __Which other python packages are needed to be installed?__ +* No need of any external packages +* Only Python version >= 3 is required + + +## __What this library does?__ +It helps us to generate random words i.e random noise in text data which is helpful in many text augmentation based tasks, NER, etc. + +## __Which methods are available currently in this library?__ +<table class="tg"> +<thead> + <tr> + <th class="tg-d9cy">Method</th> + <th class="tg-d9cy">Args</th> + <th class="tg-d9cy">Description</th> + </tr> +</thead> +<tbody> + <tr> + <td class="tg-d9cy">.generate()</td> + <td class="tg-d9cy">None</td> + <td class="tg-d9cy"><span style="font-weight:400;font-style:normal">This will return a randomly generated word</span></td> + </tr> + <tr> + <td class="tg-d9cy">.getList(num_of_words)</td> + <td class="tg-d9cy">num_of_words</td> + <td class="tg-d9cy"><span style="font-weight:400;font-style:normal">This will return list of random words</span></td> + </tr> +</tbody> +</table> + + +## __Setting to look out before generating random words__ + +### Basic +``` +from RandomWordGenerator import RandomWord + +# Creating a random word object +rw = RandomWord(max_word_size, + constant_word_size=True, + include_digits=False, + special_chars=r"@_!#$%^&*()<>?/\|}{~:", + include_special_chars=False) +``` +<table class="tg" style="undefined;table-layout: fixed; width: 538px"> +<colgroup> +<col style="width: 149px"> +<col style="width: 85px"> +<col style="width: 80px"> +<col style="width: 189px"> +</colgroup> +<thead> + <tr> + <th class="tg-cbj7">Args</th> + <th class="tg-cbj7">Data Type</th> + <th class="tg-cbj7">Default</th> + <th class="tg-oj67">Description</th> + </tr> +</thead> +<tbody> + <tr> + <td class="tg-oj67">max_word_size</td> + <td class="tg-oj67">int</td> + <td class="tg-oj67">10</td> + <td class="tg-oj67">Represents maximum length of randomly generated word</td> + </tr> + <tr> + <td class="tg-oj67">constant_word_size</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">True</td> + <td class="tg-oj67">Represents word length of<br>randomly generated word</td> + </tr> + <tr> + <td class="tg-oj67">include_digits</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">False</td> + <td class="tg-oj67">Represents whether or not to include digits in generated words</td> + </tr> + <tr> + <td class="tg-oj67">special_chars</td> + <td class="tg-oj67">regex/string</td> + <td class="tg-oj67">r"@_!#$%^&*()<>?/\\<br>|}{~:"</td> + <td class="tg-oj67">Represents a regex string of all specials character you want to include in generated words</td> + </tr> + <tr> + <td class="tg-oj67">include_special_chars</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">False</td> + <td class="tg-oj67">Represents inclusion of special characters in generated words</td> + </tr> +</tbody> +</table> + + + + +## __How to get started with this library?__ + +1. Simple random word generation with constant word size + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > hdsjq + ``` + +2. Simple random word generation with variable word size + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=False) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > gw + ``` +3. Random word generation with constant word size and including special character included + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=True, + special_chars=r"@#$%.*", + include_special_chars=True) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > gsd$ + ``` +4. If we want randomly generated words in list we just have to input the argument with number of words we want + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=False) + + print(rw.getList(num_of_random_words=3)) + ``` + ``` + Output will be some random word like + > ['adjse', 'qytqw', ' klsdf', 'ywete', 'klljs'] + + ``` + +## __Application__ + +* In cases where we need to add random noise in text +* Name Entity Relation extraction based tasks +* Text Data Augmentation based tasks + + +## Author +I will be happy to connect with you guys!! + +[Linkedin](https://www.linkedin.com/in/abhishek-c-salian/) + +[Twitter](https://www.twitter.com/@ACSalian) + + +**Any suggestions are most welcome.** + +# + + + + +%package help +Summary: Development documents and examples for Random-Word-Generator +Provides: python3-Random-Word-Generator-doc +%description help +# Random Word Generator + +[](https://opensource.org/licenses/MIT) + + + +[](https://www.python.org/) +[](https://pypi.org/project/Random-Word-Generator/) + + + +<h1 align="center"> + <img src="https://github.com/AbhishekSalian/Random-Word-Generator/blob/master/image/rwg.png?raw=true" alt="logo"/> +</h1> + +## __How to install this library?__ +``` +pip3 install Random-Word-Generator + +OR + +pip install Random-Word-Generator +``` + +## __Which other python packages are needed to be installed?__ +* No need of any external packages +* Only Python version >= 3 is required + + +## __What this library does?__ +It helps us to generate random words i.e random noise in text data which is helpful in many text augmentation based tasks, NER, etc. + +## __Which methods are available currently in this library?__ +<table class="tg"> +<thead> + <tr> + <th class="tg-d9cy">Method</th> + <th class="tg-d9cy">Args</th> + <th class="tg-d9cy">Description</th> + </tr> +</thead> +<tbody> + <tr> + <td class="tg-d9cy">.generate()</td> + <td class="tg-d9cy">None</td> + <td class="tg-d9cy"><span style="font-weight:400;font-style:normal">This will return a randomly generated word</span></td> + </tr> + <tr> + <td class="tg-d9cy">.getList(num_of_words)</td> + <td class="tg-d9cy">num_of_words</td> + <td class="tg-d9cy"><span style="font-weight:400;font-style:normal">This will return list of random words</span></td> + </tr> +</tbody> +</table> + + +## __Setting to look out before generating random words__ + +### Basic +``` +from RandomWordGenerator import RandomWord + +# Creating a random word object +rw = RandomWord(max_word_size, + constant_word_size=True, + include_digits=False, + special_chars=r"@_!#$%^&*()<>?/\|}{~:", + include_special_chars=False) +``` +<table class="tg" style="undefined;table-layout: fixed; width: 538px"> +<colgroup> +<col style="width: 149px"> +<col style="width: 85px"> +<col style="width: 80px"> +<col style="width: 189px"> +</colgroup> +<thead> + <tr> + <th class="tg-cbj7">Args</th> + <th class="tg-cbj7">Data Type</th> + <th class="tg-cbj7">Default</th> + <th class="tg-oj67">Description</th> + </tr> +</thead> +<tbody> + <tr> + <td class="tg-oj67">max_word_size</td> + <td class="tg-oj67">int</td> + <td class="tg-oj67">10</td> + <td class="tg-oj67">Represents maximum length of randomly generated word</td> + </tr> + <tr> + <td class="tg-oj67">constant_word_size</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">True</td> + <td class="tg-oj67">Represents word length of<br>randomly generated word</td> + </tr> + <tr> + <td class="tg-oj67">include_digits</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">False</td> + <td class="tg-oj67">Represents whether or not to include digits in generated words</td> + </tr> + <tr> + <td class="tg-oj67">special_chars</td> + <td class="tg-oj67">regex/string</td> + <td class="tg-oj67">r"@_!#$%^&*()<>?/\\<br>|}{~:"</td> + <td class="tg-oj67">Represents a regex string of all specials character you want to include in generated words</td> + </tr> + <tr> + <td class="tg-oj67">include_special_chars</td> + <td class="tg-oj67">bool</td> + <td class="tg-oj67">False</td> + <td class="tg-oj67">Represents inclusion of special characters in generated words</td> + </tr> +</tbody> +</table> + + + + +## __How to get started with this library?__ + +1. Simple random word generation with constant word size + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > hdsjq + ``` + +2. Simple random word generation with variable word size + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=False) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > gw + ``` +3. Random word generation with constant word size and including special character included + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=True, + special_chars=r"@#$%.*", + include_special_chars=True) + + print(rw.generate()) + ``` + ``` + Output will be some random word like + > gsd$ + ``` +4. If we want randomly generated words in list we just have to input the argument with number of words we want + ``` + from RandomWordGenerator import RandomWord + + rw = RandomWord(max_word_size=5, + constant_word_size=False) + + print(rw.getList(num_of_random_words=3)) + ``` + ``` + Output will be some random word like + > ['adjse', 'qytqw', ' klsdf', 'ywete', 'klljs'] + + ``` + +## __Application__ + +* In cases where we need to add random noise in text +* Name Entity Relation extraction based tasks +* Text Data Augmentation based tasks + + +## Author +I will be happy to connect with you guys!! + +[Linkedin](https://www.linkedin.com/in/abhishek-c-salian/) + +[Twitter](https://www.twitter.com/@ACSalian) + + +**Any suggestions are most welcome.** + +# + + + + +%prep +%autosetup -n Random-Word-Generator-1.3 + +%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-Random-Word-Generator -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 29 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3-1 +- Package Spec generated @@ -0,0 +1 @@ +48ca519208fd8af3e63088e192cf0ad0 Random-Word-Generator-1.3.tar.gz |