NewsFrames
A single-label classifier for universal framing dimensions in news articles on political topics.
Setup
Create python environment, for example with conda. Python 3.8 or later is supported.
conda create --yes -n NewsFrames python=3.8
conda activate NewsFrames
Install:
pip install NewsFrames
Usage
from NewsFrames import Classifier
classifier = Classifier()
results = classifier.predict(["Executives at the British software company Autonomy mischaracterised revenues from clients including Tottenham Hotspur, the Serious Fraud Office and the BBC to inflate software sales figures before a disastrous £8bn acquisition by the US firm Hewlett-Packard, London’s high court has heard."])
print(results)
You can use the attribute_mode parameter to get predictions for the individual
attributes (attribute_mode="withattributes") or only whether the respective dimension
is present or not (attribute_mode="withoutattributes"). The default is
withattributes.
classifier = Classifier(attribute_mode="withoutattributes")
Dev
Upload new version
python -m pip install build twine
python -m build
python -m twine upload dist/*
rm -rf dist/*
Metadata
Release files for NewsFrames 1.3.7
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 |
|---|---|---|---|---|
| NewsFrames-1.3.7.tar.gz | 15.3 kB | Without provenance | Details for NewsFrames-1.3.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| NewsFrames-1.3.7-py3-none-any.whl | Python 3 | none | any | Details for NewsFrames-1.3.7-py3-none-any.whl |
Total release size: 27.9 kB
Release files / NewsFrames-1.3.7.tar.gz
| Download URL | NewsFrames-1.3.7.tar.gz |
|---|---|
| Size | 15.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b311c513082bb3295f32c3c76e6379124f61eb2760a359f48044036ddeab878
|
|
BLAKE2b-256 checksum How to use checksums |
31fd51ca2e56409907b28afd0252cc1fae85ff9f9d0fd308c7f7fa0f9bbee3d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / NewsFrames-1.3.7-py3-none-any.whl
| Download URL | NewsFrames-1.3.7-py3-none-any.whl |
|---|---|
| Size | 12.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cfd7301dcd3e23bd8f357d48e5da6020f357c4d10bff68ab26869aa6691e477
|
|
BLAKE2b-256 checksum How to use checksums |
ded4f626524698dd1b933200adf8d8245432c6582018534e12f84c1bafc11ee7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Security for NewsFrames 1.3.7
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.