Safaa
Safaa is a Python package designed for handling false positive detection in copyright notices. Additionally, it can declutter copyright notices, removing unnecessary extra text.
Features
- Load pre-trained models or train your own.
- Integration with scikit-learn for training and prediction.
- Integrated with spaCy for named entity recognition and decluttering tasks.
- Preprocessing tools to ensure data consistency and quality.
- Ability to handle local or default model directories.
Installation
To install Safaa, simply use pip:
pip install safaa
Usage
Initialization
from safaa.Safaa import *
agent = SafaaAgent()
Preprocessing Data
data = ["Your raw data here"]
preprocessed_data = agent.preprocess_data(data)
Predicting False Positives
predictions = agent.predict(data)
Decluttering Copyright Notices
decluttered_data = agent.declutter(data, predictions)
Training Models
To train the false positive detector:
training_data = ["Your training data here"]
labels = ["Your labels here"]
agent.train_false_positive_detector_model(training_data, labels)
To train the named entity recognition model:
train_path = "path/to/train.spacy"
dev_path = "path/to/dev.spacy"
agent.train_ner_model(train_path, dev_path)
Saving Trained Models
save_path = "path/to/save"
agent.save(save_path)
Dependencies
- scikit-learn
- spaCy
- joblib
- regex
- os
- shutil
License
This project is licensed under the GNU LESSER GENERAL PUBLIC LICENSE, Version 2.1, February 1999.
Contact Information
- Name: Abdelrahman Jamal
- Email: abdelrahmanjamal5565@gmail.com
- LinkedIn: linkedin.com/in/abdelrahmanjamal
Metadata
Release files for safaa 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| safaa-0.0.5.tar.gz | 13.8 MB | With provenance | Details for safaa-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| safaa-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for safaa-0.0.5-py3-none-any.whl |
Total release size: 27.5 MB
Release files / safaa-0.0.5.tar.gz
| Download URL | safaa-0.0.5.tar.gz |
|---|---|
| Size | 13.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c254c640ae98ca4cc610f10d8afb98c319027d4ba0831cc6e4494aaad3f253b4
|
|
BLAKE2b-256 checksum How to use checksums |
55c4a5da182ebd6c572c529c0f8a4872b0a5a0ad397340cbf73c09bc2ee8c71e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logRelease files / safaa-0.0.5-py3-none-any.whl
| Download URL | safaa-0.0.5-py3-none-any.whl |
|---|---|
| Size | 13.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
38ed3f53fefb5c18a0f2d5f961b8d236706cf17781cd95d2ec1fd3af793fc1a4
|
|
BLAKE2b-256 checksum How to use checksums |
a5bcf0df50ccc0d130e1d882b848bb7bb1907cfd53eb115773f9c14539c2791e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logSecurity for safaa 0.0.5
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for safaa-0.0.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.
Transparency logA 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.