summaryrefslogtreecommitdiff
path: root/python-pyspellchecker.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 18:37:53 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 18:37:53 +0000
commit55d88d698f01e69e93a9d8f6806812411fcb93c6 (patch)
tree40d409afac432e313bb7041f68c2dde94895a9fb /python-pyspellchecker.spec
parent9db0196a9c6976d1621cf7978e80abcfc15f8c3b (diff)
automatic import of python-pyspellchecker
Diffstat (limited to 'python-pyspellchecker.spec')
-rw-r--r--python-pyspellchecker.spec120
1 files changed, 120 insertions, 0 deletions
diff --git a/python-pyspellchecker.spec b/python-pyspellchecker.spec
new file mode 100644
index 0000000..a27d937
--- /dev/null
+++ b/python-pyspellchecker.spec
@@ -0,0 +1,120 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pyspellchecker
+Version: 0.7.1
+Release: 1
+Summary: Pure python spell checker based on work by Peter Norvig
+License: MIT
+URL: https://pypi.org/project/pyspellchecker/
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b7/ab/35e489f32629a01ec4549bfece0daeedfcdd317c8dc5dceb33febe9091ba/pyspellchecker-0.7.1.tar.gz
+BuildArch: noarch
+
+
+%description
+Pure Python Spell Checking based on `Peter
+Norvig's <https://norvig.com/spell-correct.html>`__ blog post on setting
+up a simple spell checking algorithm.
+It uses a `Levenshtein Distance <https://en.wikipedia.org/wiki/Levenshtein_distance>`__
+algorithm to find permutations within an edit distance of 2 from the
+original word. It then compares all permutations (insertions, deletions,
+replacements, and transpositions) to known words in a word frequency
+list. Those words that are found more often in the frequency list are
+**more likely** the correct results.
+``pyspellchecker`` supports multiple languages including English, Spanish,
+German, French, and Portuguese. For information on how the dictionaries were
+created and how they can be updated and improved, please see the
+**Dictionary Creation and Updating** section of the readme!
+``pyspellchecker`` supports **Python 3**
+``pyspellchecker`` allows for the setting of the Levenshtein Distance (up to two) to check.
+For longer words, it is highly recommended to use a distance of 1 and not the
+default 2. See the quickstart to find how one can change the distance parameter.
+
+%package -n python3-pyspellchecker
+Summary: Pure python spell checker based on work by Peter Norvig
+Provides: python-pyspellchecker
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pyspellchecker
+Pure Python Spell Checking based on `Peter
+Norvig's <https://norvig.com/spell-correct.html>`__ blog post on setting
+up a simple spell checking algorithm.
+It uses a `Levenshtein Distance <https://en.wikipedia.org/wiki/Levenshtein_distance>`__
+algorithm to find permutations within an edit distance of 2 from the
+original word. It then compares all permutations (insertions, deletions,
+replacements, and transpositions) to known words in a word frequency
+list. Those words that are found more often in the frequency list are
+**more likely** the correct results.
+``pyspellchecker`` supports multiple languages including English, Spanish,
+German, French, and Portuguese. For information on how the dictionaries were
+created and how they can be updated and improved, please see the
+**Dictionary Creation and Updating** section of the readme!
+``pyspellchecker`` supports **Python 3**
+``pyspellchecker`` allows for the setting of the Levenshtein Distance (up to two) to check.
+For longer words, it is highly recommended to use a distance of 1 and not the
+default 2. See the quickstart to find how one can change the distance parameter.
+
+%package help
+Summary: Development documents and examples for pyspellchecker
+Provides: python3-pyspellchecker-doc
+%description help
+Pure Python Spell Checking based on `Peter
+Norvig's <https://norvig.com/spell-correct.html>`__ blog post on setting
+up a simple spell checking algorithm.
+It uses a `Levenshtein Distance <https://en.wikipedia.org/wiki/Levenshtein_distance>`__
+algorithm to find permutations within an edit distance of 2 from the
+original word. It then compares all permutations (insertions, deletions,
+replacements, and transpositions) to known words in a word frequency
+list. Those words that are found more often in the frequency list are
+**more likely** the correct results.
+``pyspellchecker`` supports multiple languages including English, Spanish,
+German, French, and Portuguese. For information on how the dictionaries were
+created and how they can be updated and improved, please see the
+**Dictionary Creation and Updating** section of the readme!
+``pyspellchecker`` supports **Python 3**
+``pyspellchecker`` allows for the setting of the Levenshtein Distance (up to two) to check.
+For longer words, it is highly recommended to use a distance of 1 and not the
+default 2. See the quickstart to find how one can change the distance parameter.
+
+%prep
+%autosetup -n pyspellchecker-0.7.1
+
+%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-pyspellchecker -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.1-1
+- Package Spec generated