summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--python-embeddings.spec104
-rw-r--r--sources1
3 files changed, 106 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..9f17a5a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/embeddings-0.0.8.tar.gz
diff --git a/python-embeddings.spec b/python-embeddings.spec
new file mode 100644
index 0000000..40b7d7b
--- /dev/null
+++ b/python-embeddings.spec
@@ -0,0 +1,104 @@
+%global _empty_manifest_terminate_build 0
+Name: python-embeddings
+Version: 0.0.8
+Release: 1
+Summary: Pretrained word embeddings in Python.
+License: MIT
+URL: https://github.com/vzhong/embeddings
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/b1/1f/2c6597fc0ecf694a0a6f9dd795935d85d9810c44da7ad0a506a7d021d746/embeddings-0.0.8.tar.gz
+BuildArch: noarch
+
+Requires: python3-tqdm
+Requires: python3-requests
+Requires: python3-numpy
+Requires: python3-check-manifest
+Requires: python3-sphinx
+Requires: python3-sphinx-rtd-theme
+Requires: python3-coverage
+Requires: python3-nose
+
+%description
+Embeddings is a python package that provides pretrained word embeddings for natural language processing and machine learning.
+Instead of loading a large file to query for embeddings, ``embeddings`` is backed by a database and fast to load and query:
+ >>> %timeit GloveEmbedding('common_crawl_840', d_emb=300)
+ 100 loops, best of 3: 12.7 ms per loop
+ >>> %timeit GloveEmbedding('common_crawl_840', d_emb=300).emb('canada')
+ 100 loops, best of 3: 12.9 ms per loop
+ >>> g = GloveEmbedding('common_crawl_840', d_emb=300)
+ >>> %timeit -n1 g.emb('canada')
+ 1 loop, best of 3: 38.2 µs per loop
+
+%package -n python3-embeddings
+Summary: Pretrained word embeddings in Python.
+Provides: python-embeddings
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-embeddings
+Embeddings is a python package that provides pretrained word embeddings for natural language processing and machine learning.
+Instead of loading a large file to query for embeddings, ``embeddings`` is backed by a database and fast to load and query:
+ >>> %timeit GloveEmbedding('common_crawl_840', d_emb=300)
+ 100 loops, best of 3: 12.7 ms per loop
+ >>> %timeit GloveEmbedding('common_crawl_840', d_emb=300).emb('canada')
+ 100 loops, best of 3: 12.9 ms per loop
+ >>> g = GloveEmbedding('common_crawl_840', d_emb=300)
+ >>> %timeit -n1 g.emb('canada')
+ 1 loop, best of 3: 38.2 µs per loop
+
+%package help
+Summary: Development documents and examples for embeddings
+Provides: python3-embeddings-doc
+%description help
+Embeddings is a python package that provides pretrained word embeddings for natural language processing and machine learning.
+Instead of loading a large file to query for embeddings, ``embeddings`` is backed by a database and fast to load and query:
+ >>> %timeit GloveEmbedding('common_crawl_840', d_emb=300)
+ 100 loops, best of 3: 12.7 ms per loop
+ >>> %timeit GloveEmbedding('common_crawl_840', d_emb=300).emb('canada')
+ 100 loops, best of 3: 12.9 ms per loop
+ >>> g = GloveEmbedding('common_crawl_840', d_emb=300)
+ >>> %timeit -n1 g.emb('canada')
+ 1 loop, best of 3: 38.2 µs per loop
+
+%prep
+%autosetup -n embeddings-0.0.8
+
+%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-embeddings -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.8-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..e66cf7f
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+be4bb4444f5fbdc7e2d2d7fb5d19fc7a embeddings-0.0.8.tar.gz