From a48c08bd3a172cd15f43dfc943a3bc91c4f7a07d Mon Sep 17 00:00:00 2001 From: Marie Roald Date: Sun, 1 Mar 2026 06:41:45 +0000 Subject: [PATCH] Add new example, fix logo background in dark mode and fix update so bumpversion works for the next release Co-authored-by: Yngve Mardal Moe --- Cargo.lock | 2 +- docs/source/_static/style.css | 3 + docs/source/bibliography.bib | 265 ++++++++++++++++++-- docs/source/conf.py | 2 + docs/source/index.rst | 1 + examples/scripts/plot_custom_confusables.py | 112 +++++++++ licenses/README.md | 3 + licenses/dinglehopper | 201 +++++++++++++++ pyproject.toml | 2 +- 9 files changed, 573 insertions(+), 18 deletions(-) create mode 100644 docs/source/_static/style.css create mode 100644 examples/scripts/plot_custom_confusables.py create mode 100644 licenses/README.md create mode 100644 licenses/dinglehopper diff --git a/Cargo.lock b/Cargo.lock index 9c651b9..3d39a13 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -258,7 +258,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "stringalign" -version = "0.1.3" +version = "0.1.4" dependencies = [ "numpy", "pyo3", diff --git a/docs/source/_static/style.css b/docs/source/_static/style.css new file mode 100644 index 0000000..63220f9 --- /dev/null +++ b/docs/source/_static/style.css @@ -0,0 +1,3 @@ +html[data-theme=dark] .bd-content img.stringalign-logo:not(.only-dark,.dark-light) { + background-color: transparent; +} diff --git a/docs/source/bibliography.bib b/docs/source/bibliography.bib index 1efbad6..1bd1439 100644 --- a/docs/source/bibliography.bib +++ b/docs/source/bibliography.bib @@ -1,7 +1,172 @@ +@article{wick_calamari_2020, + title = {Calamari - {A} {High}-{Performance} {Tensorflow}-based {Deep} {Learning} {Package} for {Optical} {Character} {Recognition}}, + volume = {14}, + number = {2}, + journal = {Digit. Humanit. Q.}, + author = {Wick, Christoph and Reul, Christian and Puppe, Frank}, + year = {2020}, +} + +@INPROCEEDINGS{8791206, + author={Nguyen, Thi-Tuyet-Hai and Jatowt, Adam and Coustaty, Mickael and Nguyen, Nhu-Van and Doucet, Antoine}, + booktitle={2019 ACM/IEEE Jt. Conf. Digit. Libr. (JCDL)}, + title={Deep Statistical Analysis of {OCR} Errors for Effective Post-{OCR} Processing}, + year={2019}, + volume={}, + number={}, + pages={29-38}, + keywords={Optical character recognition software;Libraries;Feature extraction;Character recognition;Error analysis;Transducers;Statistical analysis;OCR errors, OCR post-processing, post OCR text correction}, + doi={10.1109/JCDL.2019.00015}} + +@inproceedings{neudecker2019ocr, + title={{OCR-D}: An end-to-end open source {OCR} framework for historical printed documents}, + author={Neudecker, Clemens and Baierer, Konstantin and Federbusch, Maria and Boenig, Matthias and W{\"u}rzner, Kay-Michael and Hartmann, Volker and Herrmann, Elisa}, + booktitle={Proc. 3rd Int. Conf. Digit. Access Textual Cult. Herit.}, + pages={53--58}, + year={2019}, + doi={10.1145/3322905.3322917} +} + +@book{moran2018unicode, + title={The Unicode Cookbook for Linguists: Managing writing systems using orthography profiles}, + author={Moran, Steven and Cysouw, Michael}, + volume={10}, + year={2018}, + publisher={Language Science Press}, + series={Translation and Multilingual Natural Language Processing}, + doi={10.5281/zenodo.1300528} +} + +@inproceedings{maarand2022comprehensive, + title={A comprehensive comparison of open-source libraries for handwritten text recognition in Norwegian}, + author={Maarand, Martin and Beyer, Yngvil and K{\aa}sen, Andre and Fosseide, Knut T and Kermorvant, Christopher}, + booktitle={Int. Workshop on Doc. Anal. Syst.}, + pages={399--413}, + year={2022}, + organization={Springer}, + doi={10.1007/978-3-031-06555-2_27} +} + +@inproceedings{santos2019ocr, + title={{OCR} evaluation tools for the 21st century}, + author={Santos, Eddie Antonio}, + booktitle={Proc. 3rd Workshop Use Comput. Methods Study Endanger. Lang. Vol. 1 (Pap.)}, + pages={23--27}, + year={2019} +} + +@ARTICLE{11303599, + author={Garrido-Munoz, Carlos and Rios-Vila, Antonio and Calvo-Zaragoza, Jorge}, + journal={IEEE Trans. Pattern Anal. Mach. Intell.}, + title={Handwritten Text Recognition: A Survey}, + year={2025}, + volume={}, + number={}, + pages={1-20}, + keywords={Surveys;Complexity theory;Hidden Markov models;Text recognition;Transformers;Handwriting recognition;Deep learning;Computer architecture;Character recognition;Benchmark testing;Handwritten Text Recognition;Document Image Analysis;Document Processing;Benchmarking}, + doi={10.1109/TPAMI.2025.3646002}} + + +@inproceedings{wiechetek-etal-2024-ethical, + title = "The Ethical Question {--} Use of Indigenous Corpora for Large Language Models", + author = "Wiechetek, Linda and + Pirinen, Flammie and + Kappfjell, Maja Lisa and + Trosterud, Trond and + Gaup, B{\o}rre and + Moshagen, Sjur N{\o}rsteb{\o}", + booktitle = "Proc. 2024 Jt. Int. Conf. Comput. Linguist. Lang. Resour. Eval. (LREC-COLING 2024)", + month = may, + year = "2024", + address = "Torino, Italia", + publisher = "ELRA and ICCL", + pages = "15922--15931", +} + + +@inproceedings{enstad-etal-2025-comparative, + title = "Comparative analysis of optical character recognition methods for {S{\'a}mi} texts from the {National} {Library} of {Norway}", + author = "Enstad, Tita and + Trosterud, Trond and + R{\o}sok, Marie Iversdatter and + Beyer, Yngvil and + Roald, Marie", + booktitle = "Proc. Jt. 25th Nord. Conf. Comput. Linguist. 11th Balt. Conf. Hum. Lang. Technol. (NoDaLiDa/Balt.-HLT 2025)", + month = mar, + year = "2025", + address = "Tallinn, Estonia", + publisher = "University of Tartu Library", + pages = "98--108", + ISBN = "978-9908-53-109-0", +} + +@inproceedings{zha2023data, + title={Data-centric {AI}: Perspectives and challenges}, + author={Zha, Daochen and Bhat, Zaid Pervaiz and Lai, Kwei-Herng and Yang, Fan and Hu, Xia}, + booktitle={Proc. 2023 SIAM Int. Conf. Data Min. (SDM)}, + pages={945--948}, + year={2023}, + organization={SIAM}, + doi={10.1137/1.9781611977653.ch106} +} + +@article{10.1145/2347736.2347755, +author = {Domingos, Pedro}, +title = {A few useful things to know about machine learning}, +year = {2012}, +issue_date = {October 2012}, +publisher = {Association for Computing Machinery}, +address = {New York, NY, USA}, +volume = {55}, +number = {10}, +issn = {0001-0782}, + +doi = {10.1145/2347736.2347755}, +abstract = {Tapping into the "folk knowledge" needed to advance machine learning applications.}, +journal = {Commun. ACM}, +month = oct, +pages = {78–87}, +numpages = {10} +} + +@article{wilkinson2016fair, + title={The {FAIR} Guiding Principles for scientific data management and stewardship}, + author={Wilkinson, Mark D and Dumontier, Michel and Aalbersberg, IJsbrand Jan and Appleton, Gabrielle and Axton, Myles and Baak, Arie and Blomberg, Niklas and Boiten, Jan-Willem and da Silva Santos, Luiz Bonino and Bourne, Philip E and others}, + journal={Sci. data}, + volume={3}, + number={160018}, + pages={1--9}, + year={2016}, + publisher={Nature Publishing Group}, + doi={10.1038/sdata.2016.18} +} + +@article{barker2022introducing, + title={Introducing the {FAIR} Principles for research software}, + author={Barker, Michelle and Chue Hong, Neil P and Katz, Daniel S and Lamprecht, Anna-Lena and Martinez-Ortiz, Carlos and Psomopoulos, Fotis and Harrow, Jennifer and Castro, Leyla Jael and Gruenpeter, Morane and Martinez, Paula Andrea and others}, + journal={Sci. data}, + volume={9}, + number={622}, + pages={1--6}, + year={2022}, + publisher={Nature Publishing Group UK London}, + doi={10.1038/s41597-022-01710-x} +} + +@inproceedings{neudecker2021survey, + title={A survey of {OCR} evaluation tools and metrics}, + author={Neudecker, Clemens and Baierer, Konstantin and Gerber, Mike and Clausner, Christian and Antonacopoulos, Apostolos and Pletschacher, Stefan}, + booktitle={Proc. 6th Int. Workshop Hist. Doc. Imaging Process. (HIP '21)}, + pages={13--18}, + year={2021}, + doi={10.1145/3476887.3476888} +} + @techreport{unicode-standard, - title = {The Unicode® Standard Version 17.0 – Core Specification}, + title = {The {Unicode}® Standard Version 17.0}, + type = {Core Specification}, url = {https://www.unicode.org/versions/Unicode17.0.0/core-spec/}, - author = {Unicode Consortium}, + author = {{Unicode Consortium}}, institution = {Unicode Consortium}, month = sep, year = {2025} @@ -14,8 +179,8 @@ @techreport{unicode-annex-15 url = {https://unicode.org/reports/tr15/}, number = {UAX \#15}, urldate = {2025-07-30}, - institution = {Unicode Consortium}, - author = {Unicode Consortium}, + institution = {{Unicode Consortium}}, + author = {{Unicode Consortium}}, editor = {Whistler, Ken}, month = jul, year = {2025}, @@ -26,9 +191,9 @@ @techreport{unicode-annex-29 title = {Unicode Text Segmentation}, url = {https://unicode.org/reports/tr29/}, number = {UAX \#29}, - urldate = {2025-09-22}, - institution = {Unicode Consortium}, - author = {Unicode Consortium}, + urldate = {2025-08-17}, + institution = {{Unicode Consortium}}, + author = {{Unicode Consortium}}, editor = {Hadley, Josh}, month = aug, year = {2025}, @@ -40,8 +205,8 @@ @techreport{unicode-annex-39 url = {https://unicode.org/reports/tr39/}, number = {UAX \#39}, urldate = {2025-09-04}, - institution = {Unicode Consortium}, - author = {Unicode Consortium}, + institution = {{Unicode Consortium}}, + author = {{Unicode Consortium}}, editor = {Davis, Mark and Suignard, Michel}, month = sep, year = {2025}, @@ -52,25 +217,25 @@ @techreport{unicode-annex-51 title = {Unicode Emoji}, url = {https://www.unicode.org/reports/tr51/}, number = {UAX \#51}, - urldate = {2025-10-09}, - institution = {Unicode Consortium}, - author = {Unicode Consortium}, + urldate = {2025-09-04}, + institution = {{Unicode Consortium}}, + author = {{Unicode Consortium}}, editor = {Davis, Mark and Holbrook, Ned}, month = oct, year = {2025}, } + @article{navarro_guided_2001, title = {A guided tour to approximate string matching}, volume = {33}, issn = {0360-0300, 1557-7341}, - url = {https://dl.acm.org/doi/10.1145/375360.375365}, doi = {10.1145/375360.375365}, abstract = {We survey the current techniques to cope with the problem of string matching that allows errors. This is becoming a more and more relevant issue for many fast growing areas such as information retrieval and computational biology. We focus on online searching and mostly on edit distance, explaining the problem and its relevance, its statistical behavior, its history and current developments, and the central ideas of the algorithms and their complexities. We present a number of experiments to compare the performance of the different algorithms and show which are the best choices. We conclude with some directions for future work and open problems.}, language = {en}, number = {1}, urldate = {2025-10-04}, - journal = {ACM Computing Surveys}, + journal = {ACM Comput. Surv.}, author = {Navarro, Gonzalo}, month = mar, year = {2001}, @@ -80,10 +245,78 @@ @article{navarro_guided_2001 @article{needleman1970general, title={A general method applicable to the search for similarities in the amino acid sequence of two proteins}, author={Needleman, Saul B and Wunsch, Christian D}, - journal={Journal of molecular biology}, + journal={J. Mol. Biol.}, volume={48}, number={3}, pages={443--453}, year={1970}, - publisher={Elsevier} + publisher={Elsevier}, + doi={10.1016/0022-2836(70)90057-4} +} + +@article{levenshtein1965binary, + title={Binary codes capable of correcting spurious insertions and deletions of ones}, + author={Levenshtein, Vladimir}, + journal={Probl. Inf. Transm.}, + volume={1}, + pages={8--17}, + year={1965} +} + +@article{levenshtein1966binary, + title={Binary codes capable of correcting deletions, insertions and reversals}, + author={Levenshtein, Vladimir}, + journal={Sov. Phys. Dokl.}, + volume={10}, + number={8}, + pages={707--710}, + year={1966}, + note={Original in Russian in Dokl. Akad. Nauk SSSR 163, 4, 845–848, 1965} +} + +@techreport{rice1996isri, + title={The {ISRI} analytic tools for {OCR} evaluation Version 5.1}, + author={Rice, Stephen V and Nartker, Thomas A}, + institution={Information Science Research Institute}, + number={TR-96-02}, + year={1996} +} + +@article{UKKONEN1985100, +title = {Algorithms for approximate string matching}, +journal = {Inf. Control}, +volume = {64}, +number = {1}, +pages = {100-118}, +year = {1985}, +issn = {0019-9958}, +doi = {10.1016/S0019-9958(85)80046-2}, +author = {Esko Ukkonen} +} + +@inproceedings{10.1145/2501115.2501130, +author = {Papadopoulos, Christos and Pletschacher, Stefan and Clausner, Christian and Antonacopoulos, Apostolos}, +title = {The {IMPACT} dataset of historical document images}, +year = {2013}, +isbn = {9781450321150}, +publisher = {ACM}, +doi = {10.1145/2501115.2501130}, +booktitle = {Proc. 2nd Int. Workshop Hist. Doc. Imaging Process. (HIP '13)}, +pages = {123–130}, +numpages = {8}, +keywords = {historical documents, ground truth production, dataset production}, +location = {Washington, District of Columbia, USA} +} + +@article{Springmann_Reul_Dipper_Baiter_2018, +title={Ground Truth for training OCR engines on historical documents in German Fraktur and Early Modern Latin}, +volume={33}, +url={https://jlcl.org/article/view/220}, +DOI={10.21248/jlcl.33.2018.220}, +number={1}, +journal={Journal for Language Technology and Computational Linguistics}, +author={Springmann, Uwe and Reul, Christian and Dipper, Stefanie and Baiter, Johannes}, +year={2018}, +month={Jul.}, +pages={97--114} } diff --git a/docs/source/conf.py b/docs/source/conf.py index 6cab762..593e7a8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -43,6 +43,8 @@ html_logo = "images/bunting_flat.svg" html_favicon = "images/favicon.svg" html_title = "Stringalign" +html_static_path = ["_static"] +html_css_files = ["style.css"] nbsphinx_execute = "always" nbsphinx_allow_errors = False diff --git a/docs/source/index.rst b/docs/source/index.rst index d2c8626..761cd0b 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -2,6 +2,7 @@ Stringalign =========== .. image:: images/logo_flat.svg + :class: stringalign-logo :width: 600px :alt: Two cute caterpillars dancing under bunting with the letters 'STRING ALIGN' diff --git a/examples/scripts/plot_custom_confusables.py b/examples/scripts/plot_custom_confusables.py new file mode 100644 index 0000000..3d2db6e --- /dev/null +++ b/examples/scripts/plot_custom_confusables.py @@ -0,0 +1,112 @@ +""" +.. _custom_confusables: + +Resolving confusables and ligatures with custom lists +----------------------------------------------------- + +Some historical documents contain ligatures and symbols that are not a part of Unicode. +To account for that, several projects use Unicode's private use area (e.g. `MUFI `_). +Different datasets may also have differing annotation guidelines, e.g. regarding how to annotate archaic ligatures. +Many of these transcription differences can be resolved by resolving a task-specific list of :ref:`confusables `. +""" + +import stringalign +from stringalign.evaluate import AlignmentAnalyzer + +# %% +# Input data +# ---------- +# +# We examine a sentence from the IMPACT Dataset :cite:p:`10.1145/2501115.2501130`. +# Specifically, we select a line from the sample with PRIMA ID 00046895. +# We also use a predicted line from a Tesseract model trained on the GT4Hist dataset :cite:p:`Springmann_Reul_Dipper_Baiter_2018` [1]_ +# This particular example is originally used in :cite:p:`neudecker2021survey`. + +reference = "eingerien /  viel guter Leu⸗" +predicted = "eingeriſſan/ ſich viel guter Leü⸗" +print(f"Reference: {reference}") +print(f"Predicted: {predicted}") + +# %% +# Compute the CER without resolving confusables +# --------------------------------------------- +tokenizer_default = stringalign.tokenize.GraphemeClusterTokenizer() + +alignment_analyzer_default = AlignmentAnalyzer.from_strings(reference, predicted, tokenizer=tokenizer_default) + +cer_default = alignment_analyzer_default.compute_ter() +print(f"The character error rate (without resolving comfusables) is {cer_default:.2f}") + +# %% +# Setup confusable mapping +# ------------------------ +# +# The OCR evaluation tool Dinglehopper has a list of confusables that it resolves by default. +# We have copied that list (with comments) from Dinglehopper's `source code `_ [2]_. +confusable_map = { + "": "ſſ", + "\ueba7": "ſſi", # MUFI: LATIN SMALL LIGATURE LONG S LONG S I + "": "ch", + "": "ck", + "": "ll", + "": "ſi", + "": "ſt", + "fi": "fi", + "ff": "ff", + "fl": "fl", + "ffi": "ffi", + "": "ct", + "": "tz", # MUFI: LATIN SMALL LIGATURE TZ + "\uf532": "as", # eMOP: Latin small ligature as + "\uf533": "is", # eMOP: Latin small ligature is + "\uf534": "us", # eMOP: Latin small ligature us + "\uf535": "Qu", # eMOP: Latin ligature capital Q small u + "ij": "ij", # U+0133 LATIN SMALL LIGATURE IJ + "\ue8bf": "q&", + # MUFI: LATIN SMALL LETTER Q LIGATED WITH FINAL ET + # XXX How to replace this correctly? + "\ueba5": "ſp", # MUFI: LATIN SMALL LIGATURE LONG S P + "st": "st", # U+FB06 LATIN SMALL LIGATURE ST +} | { + "": "ü", + "": "ä", + "==": "–", # → en-dash + "—": "–", # em-dash → en-dash + "": "ö", + "’": "'", + "⸗": "-", + "aͤ": "ä", # LATIN SMALL LETTER A, COMBINING LATIN SMALL LETTER E + "oͤ": "ö", # LATIN SMALL LETTER O, COMBINING LATIN SMALL LETTER E + "uͤ": "ü", # LATIN SMALL LETTER U, COMBINING LATIN SMALL LETTER E + "\uf50e": "q́", # U+F50E LATIN SMALL LETTER Q WITH ACUTE ACCENT +} + +# %% +# Compute the CER while resolving confusables +# ------------------------------------------- +tokenizer_confusables = stringalign.tokenize.GraphemeClusterTokenizer( + pre_tokenization_normalizer=stringalign.normalize.StringNormalizer(resolve_confusables=confusable_map) +) + +alignment_analyzer_confusables = AlignmentAnalyzer.from_strings(reference, predicted, tokenizer=tokenizer_confusables) + +cer_confusables = alignment_analyzer_confusables.compute_ter() +print(f"The character error rate (after resolving confusables) is {cer_confusables:.2f}") + +# %% +# Look at strings after resolving confusables +# ------------------------------------------- +print("Reference:") +print(f"without resolving confusables and tokenizing: {tokenizer_default(reference)}") +print(f" after resolving confusables and tokenizing: {tokenizer_confusables(reference)}") + +print("Predicted:") +print(f"without resolving confusables and tokenizing: {tokenizer_default(predicted)}") +print(f" after resolving confusables and tokenizing: {tokenizer_confusables(predicted)}") + + +# %% +# .. rubric:: Footnotes +# +# .. [1] The full reference and predicted text is available in the GitHub repo of :cite:p:`neudecker2021survey`: https://github.com/cneud/hip21_ocrevaluation/tree/main/data +# .. [2] Note that Dinglehopper uses an Apache 2.0 license, which is why we can copy it here. Dinglehopper's License text is available in Stringalign's GitHub repository. diff --git a/licenses/README.md b/licenses/README.md new file mode 100644 index 0000000..aab1fb9 --- /dev/null +++ b/licenses/README.md @@ -0,0 +1,3 @@ +# Licenses for code we have copied into this repo + +* [dinglehopper](./dinglehopper): We use its confusable mappings in the examples directory. diff --git a/licenses/dinglehopper b/licenses/dinglehopper new file mode 100644 index 0000000..9b7a833 --- /dev/null +++ b/licenses/dinglehopper @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2019 qurator + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/pyproject.toml b/pyproject.toml index 92d9475..3ec0f6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ ignore_missing_imports = true exclude = ["examples/", "docs/_build/"] [tool.bumpversion] -current_version = "0.1.3" +current_version = "0.1.4" parse = "(?P\\d+)\\.(?P\\d+)\\.(?P\\d+)" serialize = ["{major}.{minor}.{patch}"]