summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 13:25:07 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 13:25:07 +0000
commit66431b56d12fc00944f316c445590a315ea3e89c (patch)
tree832d189355f8710dddd941911afa7e54db8317ec
parent9b9a6abad134d145aad882a4f13315cade2e9f2d (diff)
automatic import of python-seqeval
-rw-r--r--.gitignore1
-rw-r--r--python-seqeval.spec417
-rw-r--r--sources1
3 files changed, 419 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..77191cd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/seqeval-1.2.2.tar.gz
diff --git a/python-seqeval.spec b/python-seqeval.spec
new file mode 100644
index 0000000..c40411d
--- /dev/null
+++ b/python-seqeval.spec
@@ -0,0 +1,417 @@
+%global _empty_manifest_terminate_build 0
+Name: python-seqeval
+Version: 1.2.2
+Release: 1
+Summary: Testing framework for sequence labeling
+License: MIT
+URL: https://github.com/chakki-works/seqeval
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9d/2d/233c79d5b4e5ab1dbf111242299153f3caddddbb691219f363ad55ce783d/seqeval-1.2.2.tar.gz
+BuildArch: noarch
+
+
+%description
+# seqeval
+
+seqeval is a Python framework for sequence labeling evaluation.
+seqeval can evaluate the performance of chunking tasks such as named-entity recognition, part-of-speech tagging, semantic role labeling and so on.
+
+This is well-tested by using the Perl script [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt),
+which can be used for measuring the performance of a system that has processed the CoNLL-2000 shared task data.
+
+## Support features
+
+seqeval supports following schemes:
+
+- IOB1
+- IOB2
+- IOE1
+- IOE2
+- IOBES(only in strict mode)
+- BILOU(only in strict mode)
+
+and following metrics:
+
+| metrics | description |
+|---|---|
+| accuracy_score(y\_true, y\_pred) | Compute the accuracy. |
+| precision_score(y\_true, y\_pred) | Compute the precision. |
+| recall_score(y\_true, y\_pred) | Compute the recall. |
+| f1_score(y\_true, y\_pred) | Compute the F1 score, also known as balanced F-score or F-measure. |
+| classification_report(y\_true, y\_pred, digits=2) | Build a text report showing the main classification metrics. `digits` is number of digits for formatting output floating point values. Default value is `2`. |
+
+## Usage
+
+seqeval supports the two evaluation modes. You can specify the following mode to each metrics:
+
+- default
+- strict
+
+The default mode is compatible with [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt). If you want to use the default mode, you don't need to specify it:
+
+```python
+>>> from seqeval.metrics import accuracy_score
+>>> from seqeval.metrics import classification_report
+>>> from seqeval.metrics import f1_score
+>>> y_true = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
+>>> y_pred = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
+>>> f1_score(y_true, y_pred)
+0.50
+>>> classification_report(y_true, y_pred)
+ precision recall f1-score support
+
+ MISC 0.00 0.00 0.00 1
+ PER 1.00 1.00 1.00 1
+
+ micro avg 0.50 0.50 0.50 2
+ macro avg 0.50 0.50 0.50 2
+weighted avg 0.50 0.50 0.50 2
+```
+
+In strict mode, the inputs are evaluated according to the specified schema. The behavior of the strict mode is different from the default one which is designed to simulate conlleval. If you want to use the strict mode, please specify `mode='strict'` and `scheme` arguments at the same time:
+
+```python
+>>> from seqeval.scheme import IOB2
+>>> classification_report(y_true, y_pred, mode='strict', scheme=IOB2)
+ precision recall f1-score support
+
+ MISC 0.00 0.00 0.00 1
+ PER 1.00 1.00 1.00 1
+
+ micro avg 0.50 0.50 0.50 2
+ macro avg 0.50 0.50 0.50 2
+weighted avg 0.50 0.50 0.50 2
+```
+
+A minimum case to explain differences between the default and strict mode:
+
+```python
+>>> from seqeval.metrics import classification_report
+>>> from seqeval.scheme import IOB2
+>>> y_true = [['B-NP', 'I-NP', 'O']]
+>>> y_pred = [['I-NP', 'I-NP', 'O']]
+>>> classification_report(y_true, y_pred)
+ precision recall f1-score support
+ NP 1.00 1.00 1.00 1
+ micro avg 1.00 1.00 1.00 1
+ macro avg 1.00 1.00 1.00 1
+weighted avg 1.00 1.00 1.00 1
+>>> classification_report(y_true, y_pred, mode='strict', scheme=IOB2)
+ precision recall f1-score support
+ NP 0.00 0.00 0.00 1
+ micro avg 0.00 0.00 0.00 1
+ macro avg 0.00 0.00 0.00 1
+weighted avg 0.00 0.00 0.00 1
+```
+
+## Installation
+
+To install seqeval, simply run:
+
+```bash
+pip install seqeval
+```
+
+## License
+
+[MIT](https://github.com/chakki-works/seqeval/blob/master/LICENSE)
+
+## Citation
+
+```tex
+@misc{seqeval,
+ title={{seqeval}: A Python framework for sequence labeling evaluation},
+ url={https://github.com/chakki-works/seqeval},
+ note={Software available from https://github.com/chakki-works/seqeval},
+ author={Hiroki Nakayama},
+ year={2018},
+}
+```
+
+%package -n python3-seqeval
+Summary: Testing framework for sequence labeling
+Provides: python-seqeval
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-seqeval
+# seqeval
+
+seqeval is a Python framework for sequence labeling evaluation.
+seqeval can evaluate the performance of chunking tasks such as named-entity recognition, part-of-speech tagging, semantic role labeling and so on.
+
+This is well-tested by using the Perl script [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt),
+which can be used for measuring the performance of a system that has processed the CoNLL-2000 shared task data.
+
+## Support features
+
+seqeval supports following schemes:
+
+- IOB1
+- IOB2
+- IOE1
+- IOE2
+- IOBES(only in strict mode)
+- BILOU(only in strict mode)
+
+and following metrics:
+
+| metrics | description |
+|---|---|
+| accuracy_score(y\_true, y\_pred) | Compute the accuracy. |
+| precision_score(y\_true, y\_pred) | Compute the precision. |
+| recall_score(y\_true, y\_pred) | Compute the recall. |
+| f1_score(y\_true, y\_pred) | Compute the F1 score, also known as balanced F-score or F-measure. |
+| classification_report(y\_true, y\_pred, digits=2) | Build a text report showing the main classification metrics. `digits` is number of digits for formatting output floating point values. Default value is `2`. |
+
+## Usage
+
+seqeval supports the two evaluation modes. You can specify the following mode to each metrics:
+
+- default
+- strict
+
+The default mode is compatible with [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt). If you want to use the default mode, you don't need to specify it:
+
+```python
+>>> from seqeval.metrics import accuracy_score
+>>> from seqeval.metrics import classification_report
+>>> from seqeval.metrics import f1_score
+>>> y_true = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
+>>> y_pred = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
+>>> f1_score(y_true, y_pred)
+0.50
+>>> classification_report(y_true, y_pred)
+ precision recall f1-score support
+
+ MISC 0.00 0.00 0.00 1
+ PER 1.00 1.00 1.00 1
+
+ micro avg 0.50 0.50 0.50 2
+ macro avg 0.50 0.50 0.50 2
+weighted avg 0.50 0.50 0.50 2
+```
+
+In strict mode, the inputs are evaluated according to the specified schema. The behavior of the strict mode is different from the default one which is designed to simulate conlleval. If you want to use the strict mode, please specify `mode='strict'` and `scheme` arguments at the same time:
+
+```python
+>>> from seqeval.scheme import IOB2
+>>> classification_report(y_true, y_pred, mode='strict', scheme=IOB2)
+ precision recall f1-score support
+
+ MISC 0.00 0.00 0.00 1
+ PER 1.00 1.00 1.00 1
+
+ micro avg 0.50 0.50 0.50 2
+ macro avg 0.50 0.50 0.50 2
+weighted avg 0.50 0.50 0.50 2
+```
+
+A minimum case to explain differences between the default and strict mode:
+
+```python
+>>> from seqeval.metrics import classification_report
+>>> from seqeval.scheme import IOB2
+>>> y_true = [['B-NP', 'I-NP', 'O']]
+>>> y_pred = [['I-NP', 'I-NP', 'O']]
+>>> classification_report(y_true, y_pred)
+ precision recall f1-score support
+ NP 1.00 1.00 1.00 1
+ micro avg 1.00 1.00 1.00 1
+ macro avg 1.00 1.00 1.00 1
+weighted avg 1.00 1.00 1.00 1
+>>> classification_report(y_true, y_pred, mode='strict', scheme=IOB2)
+ precision recall f1-score support
+ NP 0.00 0.00 0.00 1
+ micro avg 0.00 0.00 0.00 1
+ macro avg 0.00 0.00 0.00 1
+weighted avg 0.00 0.00 0.00 1
+```
+
+## Installation
+
+To install seqeval, simply run:
+
+```bash
+pip install seqeval
+```
+
+## License
+
+[MIT](https://github.com/chakki-works/seqeval/blob/master/LICENSE)
+
+## Citation
+
+```tex
+@misc{seqeval,
+ title={{seqeval}: A Python framework for sequence labeling evaluation},
+ url={https://github.com/chakki-works/seqeval},
+ note={Software available from https://github.com/chakki-works/seqeval},
+ author={Hiroki Nakayama},
+ year={2018},
+}
+```
+
+%package help
+Summary: Development documents and examples for seqeval
+Provides: python3-seqeval-doc
+%description help
+# seqeval
+
+seqeval is a Python framework for sequence labeling evaluation.
+seqeval can evaluate the performance of chunking tasks such as named-entity recognition, part-of-speech tagging, semantic role labeling and so on.
+
+This is well-tested by using the Perl script [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt),
+which can be used for measuring the performance of a system that has processed the CoNLL-2000 shared task data.
+
+## Support features
+
+seqeval supports following schemes:
+
+- IOB1
+- IOB2
+- IOE1
+- IOE2
+- IOBES(only in strict mode)
+- BILOU(only in strict mode)
+
+and following metrics:
+
+| metrics | description |
+|---|---|
+| accuracy_score(y\_true, y\_pred) | Compute the accuracy. |
+| precision_score(y\_true, y\_pred) | Compute the precision. |
+| recall_score(y\_true, y\_pred) | Compute the recall. |
+| f1_score(y\_true, y\_pred) | Compute the F1 score, also known as balanced F-score or F-measure. |
+| classification_report(y\_true, y\_pred, digits=2) | Build a text report showing the main classification metrics. `digits` is number of digits for formatting output floating point values. Default value is `2`. |
+
+## Usage
+
+seqeval supports the two evaluation modes. You can specify the following mode to each metrics:
+
+- default
+- strict
+
+The default mode is compatible with [conlleval](https://www.clips.uantwerpen.be/conll2002/ner/bin/conlleval.txt). If you want to use the default mode, you don't need to specify it:
+
+```python
+>>> from seqeval.metrics import accuracy_score
+>>> from seqeval.metrics import classification_report
+>>> from seqeval.metrics import f1_score
+>>> y_true = [['O', 'O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
+>>> y_pred = [['O', 'O', 'B-MISC', 'I-MISC', 'I-MISC', 'I-MISC', 'O'], ['B-PER', 'I-PER', 'O']]
+>>> f1_score(y_true, y_pred)
+0.50
+>>> classification_report(y_true, y_pred)
+ precision recall f1-score support
+
+ MISC 0.00 0.00 0.00 1
+ PER 1.00 1.00 1.00 1
+
+ micro avg 0.50 0.50 0.50 2
+ macro avg 0.50 0.50 0.50 2
+weighted avg 0.50 0.50 0.50 2
+```
+
+In strict mode, the inputs are evaluated according to the specified schema. The behavior of the strict mode is different from the default one which is designed to simulate conlleval. If you want to use the strict mode, please specify `mode='strict'` and `scheme` arguments at the same time:
+
+```python
+>>> from seqeval.scheme import IOB2
+>>> classification_report(y_true, y_pred, mode='strict', scheme=IOB2)
+ precision recall f1-score support
+
+ MISC 0.00 0.00 0.00 1
+ PER 1.00 1.00 1.00 1
+
+ micro avg 0.50 0.50 0.50 2
+ macro avg 0.50 0.50 0.50 2
+weighted avg 0.50 0.50 0.50 2
+```
+
+A minimum case to explain differences between the default and strict mode:
+
+```python
+>>> from seqeval.metrics import classification_report
+>>> from seqeval.scheme import IOB2
+>>> y_true = [['B-NP', 'I-NP', 'O']]
+>>> y_pred = [['I-NP', 'I-NP', 'O']]
+>>> classification_report(y_true, y_pred)
+ precision recall f1-score support
+ NP 1.00 1.00 1.00 1
+ micro avg 1.00 1.00 1.00 1
+ macro avg 1.00 1.00 1.00 1
+weighted avg 1.00 1.00 1.00 1
+>>> classification_report(y_true, y_pred, mode='strict', scheme=IOB2)
+ precision recall f1-score support
+ NP 0.00 0.00 0.00 1
+ micro avg 0.00 0.00 0.00 1
+ macro avg 0.00 0.00 0.00 1
+weighted avg 0.00 0.00 0.00 1
+```
+
+## Installation
+
+To install seqeval, simply run:
+
+```bash
+pip install seqeval
+```
+
+## License
+
+[MIT](https://github.com/chakki-works/seqeval/blob/master/LICENSE)
+
+## Citation
+
+```tex
+@misc{seqeval,
+ title={{seqeval}: A Python framework for sequence labeling evaluation},
+ url={https://github.com/chakki-works/seqeval},
+ note={Software available from https://github.com/chakki-works/seqeval},
+ author={Hiroki Nakayama},
+ year={2018},
+}
+```
+
+%prep
+%autosetup -n seqeval-1.2.2
+
+%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-seqeval -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..454502b
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+8b722ecf75550c587f79f2425e3a4d40 seqeval-1.2.2.tar.gz