Skip to content

timmd-9216/trust

 
 

Repository files navigation

trust-monitor {#trust-monitor}

Our goal is to develop a prototype that uses AI to identify specific quality indicators within news stories within the newsroom environment. This AI Monitor will be tailored specifically for newsroom editors, helping them to identify issues such as a lack of sources, an excess of adjectives, or discrepancies in information that can be addressed using online tools such as Fact-Checker Explorer.

Index {#index}

Installation {#installation}

  1. Clone the Repository
  2. Navigate to the Project Directory
  3. Create a Virtual Environment (Optional but Recommended):
python -m venv venv

Create a virtual environment named venv. To activate the virtual environment: * On Windows:

.\venv\Scripts\activate
  • On macOS and Linux:
source venv/bin/activate
  1. Install Project and Dependencies (inside the project directory):
pip install -e .
  1. Download SpaCy Language Model (for Spanish): If you plan to use the project with Spanish language processing, you need to download the SpaCy language model. Run the following command:
python -m spacy download es_core_news_sm

Usage {#usage}

Execute the main script to run the project.

python main.py

Alternatively, you can try it in a Live Python Terminal, as follows:

from trustmonitor.nlp import NLP

nlp = NLP('es', 'spacy')
doc = nlp.analyze("El presidente de la Cámara de Propietarios de la República Argentina aseguró...")
entities = nlp.extract_entities(doc)
entities_count = nlp.count_entities(doc)
adjectives = nlp.extract_adjectives(doc)
adjective_count = nlp.count_adjectives(doc)
adjective_type_counts = nlp.count_adjective_types(doc)
entity_type_counts = nlp.count_entity_types(doc)
entity_sentiments = nlp.extract_entity_sentiments(doc)

Project Structure {#project-structure}

/trustmonitor
    |-- nlp.py
    |-- import_utils.py
    |-- articles.py
/data
    |-- docs
    |-- manual
    |-- raw
|-- main.py
|-- requirements.txt
|-- setup.py
|-- README.md

Output Response {#output-response}

see doc.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%