summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 09:52:04 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 09:52:04 +0000
commitd9e3913edbcd33b7a4fd27f0880d4e439fffe9bd (patch)
treeff9b00c2c37c14aa9b3e281937108a7a9fc104c0
parent6df80fe6d4d63e641bb459dd933b979174007173 (diff)
automatic import of python-antx
-rw-r--r--.gitignore1
-rw-r--r--python-antx.spec274
-rw-r--r--sources1
3 files changed, 276 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..5eb0136 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/antx-0.1.11.tar.gz
diff --git a/python-antx.spec b/python-antx.spec
new file mode 100644
index 0000000..65a4acc
--- /dev/null
+++ b/python-antx.spec
@@ -0,0 +1,274 @@
+%global _empty_manifest_terminate_build 0
+Name: python-antx
+Version: 0.1.11
+Release: 1
+Summary: Transfer annotations from source text to destination using diff match patch.
+License: Apache2
+URL: https://github.com/Esukhia/annotation_transfer
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/e3/44/5107f83c13d070962349826fdec3e528e8438cf18d74bb3f09ba693fade5/antx-0.1.11.tar.gz
+BuildArch: noarch
+
+Requires: python3-diff-match-patch
+Requires: python3-PyYAML
+Requires: python3-regex
+Requires: python3-requests
+
+%description
+# antx - Annotation Transfer
+Transfer annotations from source text to destination using diff match patch.
+
+![Test](https://github.com/Esukhia/annotation_transfer/workflows/Test/badge.svg)
+[![PyPI version](https://badge.fury.io/py/antx.svg)](https://badge.fury.io/py/antx)
+
+## Usage
+
+### Install using pip.
+```
+$ pip install antx
+```
+
+### Import
+```
+from antx import transfer
+```
+
+### Transfer
+```
+new_target = transfer(source_text, annotations, target_text, output="txt")
+```
+**source_text** := contains source text
+
+**annotations** := contains list of annotations in source text that you want to transfer to target text
+
+**target_text** := contains target text
+
+**output** := Flag to indicate type of output. It can be txt or yaml.
+
+
+**Example**
+
+```python
+source_text = """༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+<𰵀auམཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །>
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+""
+```
+```python
+target_text = """༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+མཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+༄༅། །གྲུབ་བརྒྱའི་སྤྱི་མེས་མར་མི་དྭགས་གསུམ་ནས། །དཔལ་ལྡན་དུས་གསུམ་མཁྱེན་པའི་བཀའ་བརྒྱུད་ནི།
+"""
+```
+```python
+annotations = [['author_start', r"(\<[𰵀-󴉱]?au)"], ['author_end', r"(\>)"]]
+```
+```python
+result = transfer(src, annotations, trg, output="txt")
+
+Annotation transfer started...
+Mapping annotations to tofu-IDs
+[INFO] Computing diffs ...
+[INFO] Diff computed!
+Transfering annotations...
+```
+```python
+print(result)
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+<𰵀auམཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །>
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+༄༅། །གྲུབ་བརྒྱའི་སྤྱི་མེས་མར་མི་དྭགས་གསུམ་ནས། །དཔལ་ལྡན་དུས་གསུམ་མཁྱེན་པའི་བཀའ་བརྒྱུད་ནི།
+
+
+
+
+%package -n python3-antx
+Summary: Transfer annotations from source text to destination using diff match patch.
+Provides: python-antx
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-antx
+# antx - Annotation Transfer
+Transfer annotations from source text to destination using diff match patch.
+
+![Test](https://github.com/Esukhia/annotation_transfer/workflows/Test/badge.svg)
+[![PyPI version](https://badge.fury.io/py/antx.svg)](https://badge.fury.io/py/antx)
+
+## Usage
+
+### Install using pip.
+```
+$ pip install antx
+```
+
+### Import
+```
+from antx import transfer
+```
+
+### Transfer
+```
+new_target = transfer(source_text, annotations, target_text, output="txt")
+```
+**source_text** := contains source text
+
+**annotations** := contains list of annotations in source text that you want to transfer to target text
+
+**target_text** := contains target text
+
+**output** := Flag to indicate type of output. It can be txt or yaml.
+
+
+**Example**
+
+```python
+source_text = """༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+<𰵀auམཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །>
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+""
+```
+```python
+target_text = """༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+མཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+༄༅། །གྲུབ་བརྒྱའི་སྤྱི་མེས་མར་མི་དྭགས་གསུམ་ནས། །དཔལ་ལྡན་དུས་གསུམ་མཁྱེན་པའི་བཀའ་བརྒྱུད་ནི།
+"""
+```
+```python
+annotations = [['author_start', r"(\<[𰵀-󴉱]?au)"], ['author_end', r"(\>)"]]
+```
+```python
+result = transfer(src, annotations, trg, output="txt")
+
+Annotation transfer started...
+Mapping annotations to tofu-IDs
+[INFO] Computing diffs ...
+[INFO] Diff computed!
+Transfering annotations...
+```
+```python
+print(result)
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+<𰵀auམཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །>
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+༄༅། །གྲུབ་བརྒྱའི་སྤྱི་མེས་མར་མི་དྭགས་གསུམ་ནས། །དཔལ་ལྡན་དུས་གསུམ་མཁྱེན་པའི་བཀའ་བརྒྱུད་ནི།
+
+
+
+
+%package help
+Summary: Development documents and examples for antx
+Provides: python3-antx-doc
+%description help
+# antx - Annotation Transfer
+Transfer annotations from source text to destination using diff match patch.
+
+![Test](https://github.com/Esukhia/annotation_transfer/workflows/Test/badge.svg)
+[![PyPI version](https://badge.fury.io/py/antx.svg)](https://badge.fury.io/py/antx)
+
+## Usage
+
+### Install using pip.
+```
+$ pip install antx
+```
+
+### Import
+```
+from antx import transfer
+```
+
+### Transfer
+```
+new_target = transfer(source_text, annotations, target_text, output="txt")
+```
+**source_text** := contains source text
+
+**annotations** := contains list of annotations in source text that you want to transfer to target text
+
+**target_text** := contains target text
+
+**output** := Flag to indicate type of output. It can be txt or yaml.
+
+
+**Example**
+
+```python
+source_text = """༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+<𰵀auམཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །>
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+""
+```
+```python
+target_text = """༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+མཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+༄༅། །གྲུབ་བརྒྱའི་སྤྱི་མེས་མར་མི་དྭགས་གསུམ་ནས། །དཔལ་ལྡན་དུས་གསུམ་མཁྱེན་པའི་བཀའ་བརྒྱུད་ནི།
+"""
+```
+```python
+annotations = [['author_start', r"(\<[𰵀-󴉱]?au)"], ['author_end', r"(\>)"]]
+```
+```python
+result = transfer(src, annotations, trg, output="txt")
+
+Annotation transfer started...
+Mapping annotations to tofu-IDs
+[INFO] Computing diffs ...
+[INFO] Diff computed!
+Transfering annotations...
+```
+```python
+print(result)
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+<𰵀auམཛད་པ་པོ། འཇམ་མགོན་ཀོང་སྤྲུལ་བློ་གྲོས་མཐའ་ཡས། །>
+༄༅། །ཕྱག་ཆེན་སྔོན་འགྲོ་བཞི་སྦྱོར་དང་དངོས་གཞིའི་ཁྲིད་རིམ་མདོར་བསྡུས་ངེས་དོན་སྒྲོན་མེ་ཞེས་བྱ་བ་བཞུགས་སོ། །
+༄༅། །གྲུབ་བརྒྱའི་སྤྱི་མེས་མར་མི་དྭགས་གསུམ་ནས། །དཔལ་ལྡན་དུས་གསུམ་མཁྱེན་པའི་བཀའ་བརྒྱུད་ནི།
+
+
+
+
+%prep
+%autosetup -n antx-0.1.11
+
+%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-antx -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.11-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..0ada194
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+0a677cb148d875c0b9f23fbaaecfe183 antx-0.1.11.tar.gz