%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/)


## __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?__
Method |
Args |
Description |
.generate() |
None |
This will return a randomly generated word |
.getList(num_of_words) |
num_of_words |
This will return list of random words |
## __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)
```
Args |
Data Type |
Default |
Description |
max_word_size |
int |
10 |
Represents maximum length of randomly generated word |
constant_word_size |
bool |
True |
Represents word length of randomly generated word |
include_digits |
bool |
False |
Represents whether or not to include digits in generated words |
special_chars |
regex/string |
r"@_!#$%^&*()<>?/\\ |}{~:" |
Represents a regex string of all specials character you want to include in generated words |
include_special_chars |
bool |
False |
Represents inclusion of special characters in generated words |
## __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/)


## __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?__
Method |
Args |
Description |
.generate() |
None |
This will return a randomly generated word |
.getList(num_of_words) |
num_of_words |
This will return list of random words |
## __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)
```
Args |
Data Type |
Default |
Description |
max_word_size |
int |
10 |
Represents maximum length of randomly generated word |
constant_word_size |
bool |
True |
Represents word length of randomly generated word |
include_digits |
bool |
False |
Represents whether or not to include digits in generated words |
special_chars |
regex/string |
r"@_!#$%^&*()<>?/\\ |}{~:" |
Represents a regex string of all specials character you want to include in generated words |
include_special_chars |
bool |
False |
Represents inclusion of special characters in generated words |
## __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/)


## __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?__
Method |
Args |
Description |
.generate() |
None |
This will return a randomly generated word |
.getList(num_of_words) |
num_of_words |
This will return list of random words |
## __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)
```
Args |
Data Type |
Default |
Description |
max_word_size |
int |
10 |
Represents maximum length of randomly generated word |
constant_word_size |
bool |
True |
Represents word length of randomly generated word |
include_digits |
bool |
False |
Represents whether or not to include digits in generated words |
special_chars |
regex/string |
r"@_!#$%^&*()<>?/\\ |}{~:" |
Represents a regex string of all specials character you want to include in generated words |
include_special_chars |
bool |
False |
Represents inclusion of special characters in generated words |
## __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
* Tue May 30 2023 Python_Bot - 1.3-1
- Package Spec generated