Skip to main content

Specifind logo

Specifind is a Python toolkit built to automatically extract species occurrence information from unstructured ecological literature. It identifies scientific species names, geographic entities, and the relations connecting them—unlocking occurrence data hidden in text.

The toolkit integrates OCR, layout analysis, Named Entity Recognition, Coreference Resolution, and Relation Extraction into a unified and traceable pipeline. It is powered by a newly developed, expertly annotated dataset of 1,000+ ecological abstracts spanning biogeography, botany, entomology, mycology, and zoology.


🌿 Key Features

  • 📄 Science-OCR for domain-optimized OCR of scientific papers
  • 🔍 NER for scientific species names & geographic entities
  • 🌍 Relation Extraction connecting species to locations
  • 🧠 FastCOREF for high-performance coreference resolution
  • 🧩 Built on spaCy for extensibility, speed, and NLP interoperability
  • 🧱 Full pipeline for text & PDF extraction
  • 🧭 Traceability that links extractions back to the original text

📦 Installation

pip install specifind

🚀 Quick Start

Basic Usage

from specifind import Specifind

s = Specifind()

s.analyze("Upupa epops is an exotic bird. It is widely extended over Spain.")

# or

s.analyze_file("path/to/file.pdf")

# Output:
# {
#     "species": [
#         "Upupa epops"
#     ],
#     "geography": [
#         "Spain"
#     ],
#     "occurrences": {
#         "Upupa epops": [
#             "Spain"
#         ]
#     },
#     "evidence": {
#         "Upupa epops": {
#             "Spain": [
#                 "It is widely extended over Spain."
#             ]
#         }
#     }
# }

📘 API Reference

class Specifind(...)

Initializes the OCR engine.

Parameter Type Default Description
use_gpu bool True If True, uses GPU if available. If False, forces CPU usage, which may be slower but more stable on some systems and avoid memory issues.
debug bool False If True, opens the displaCy visualizer with the results

analyze_file(...)

Process and extract information from a PDF file.

Parameters

Name Type Default Description
path str — Path to the file to analyze.
first_page int 0 First page to process (inclusive).
last_page int PDF page length Last page to process (exclusive).
coref bool True Enable coreference resolution.
dpi int 192 if GPU available else 96 Rendering DPI for PDF pages. Consider lowering the value if running out of memory (OOM).
return_doc bool False If True, return Spacy Doc object with the annotations available in doc.ents and doc._.relations.
store_ocr bool True If True, saves OCR results into a txt file

Returns

  • Dictionary including parsed entities, relations and evidences.
  • (optional) internal doc object (if return_doc=True)

analyze(...)

Process and extract information directly from raw text.

Parameters

Name Type Default Description
text str — Raw text to analyze.
coref bool True Enable coreference resolution.
return_doc bool False If True, return Spacy Doc object with the annotations.

Returns

  • Dictionary including parsed entities, relations and evidences.
  • (optional) internal doc object

🚀 Benchmarks

Named Entity Recognition (NER)

Species & Locations

🔍 Match Type 🎯 Precision 📈 Recall 🏆 F1
Exact 0.904 0.935 0.919
Partial/Intersect 0.938 0.969 0.958

Relation Extraction (RE)

Occurrences

🎯 Precision 📈 Recall 🏆 F1
0.964 0.993 0.978

🤝 Contributing

Contributions, issue reports, and feature suggestions are welcome. Feel free to open a Pull Request or discussion.


📄 License

Specifind is licensed under AGPL-3.0. See LICENSE for details.


📚 Citing Specifind

If you use Specifind in your research, please cite our pre-print:

BibTeX

@article{specifind2025,
  title   = {Specifind: A Natural Language Processing Tool for Automating Species Occurrence (Re-)Discovery from Scientific Literature},
  author  = {Golomb Durán Tomas, Díaz Anna, Barroso María, Far Antoni Josep, Roldán Alejandro, Cancellario Tommaso},
  year    = {2025},
  journal = {BioRxiv},
  url     = {https://github.com/ToGo347/specifind}
}

Metadata

Release files for specifind 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for specifind 0.2.0
File Size Uploaded Provenance Actions
specifind-0.2.0.tar.gz 581.5 kB Without provenance Details for specifind-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for specifind 0.2.0
File Interpreter ABI Platform Actions
specifind-0.2.0-py3-none-any.whl Python 3 none any Details for specifind-0.2.0-py3-none-any.whl

Total release size: 1.3 MB

Release files / specifind-0.2.0.tar.gz

Download URL specifind-0.2.0.tar.gz
Size 581.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af09598007ffa75c81481871d64a13202cbc75806baa83c09725584d70f7ffa6
BLAKE2b-256 checksum
How to use checksums
cb3370eecadc1bed1279666f9cac064675bfa7d1ff39acf7e01c8b90b2b6c74a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / specifind-0.2.0-py3-none-any.whl

Download URL specifind-0.2.0-py3-none-any.whl
Size 743.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e57092f3cd6e7cd285146603026855a70daca481f020e30e6a844eed055e4fb5
BLAKE2b-256 checksum
How to use checksums
5532fd25c255b223045e4fbaf0a3285bc4cdc94b568fd0ae7d73c1c37d444acf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Security for specifind 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page