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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| safaa-0.0.4.tar.gz | 13.8 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| safaa-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 27.5 MB
Release files / safaa-0.0.4.tar.gz
| Download URL | safaa-0.0.4.tar.gz |
|---|---|
| Size | 13.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f06332cb8d417cbd92e093b71481fbebc7aaa283c2079d3b49569446251030fb
|
|
BLAKE2b-256 checksum How to use checksums |
b655231902d153cb59da059227c4ef1883939ddc767a5845c4bcf674f37a0985
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 12, 2026.
Transparency logRelease files / safaa-0.0.4-py3-none-any.whl
| Download URL | safaa-0.0.4-py3-none-any.whl |
|---|---|
| Size | 13.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3b3ce5fee590926a4d0fd782d96a995907c0f0734837a08f8642005013220948
|
|
BLAKE2b-256 checksum How to use checksums |
463176e339ca346b55e770fc73b3deab456ada70b45ec55f8b4262e948b315e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 May 12, 2026.
Transparency log