Skip to main content

Comment Recommendation Framework

The Comment Recommendation Framework is a modular approach to support scientists in the development of prototypes for comment recommendation systems that can be used in real-world scenarios. The advantage of such a system is that it relieves the scientist from the majority of the technical code and only prototype-specific components have to be developed. In this way, the researchers can invest more time in the development of recommendation models and less time has to be spent in the development of a prototype while at the same time getting prototypes that can be used in real-world settings.

PyPI publish workflow

Setup

Ensure that the following tools are installed:

  • Docker
  • Docker-Compose
  • Pyhon >= 3.10

Documentation

To build the latest version of the documentation, please run in the docs folder:

$ make clean && make html

Then you find the latest documentation here

Environment Variables

The framework need some environment variables to be set for running properly. Please ensure that you have an .env file with the following variables:

  • NEO4J_PASSWORD
  • NEO4J_BOLT_URL (Format: bolt://neo4j:<NEO4J_PASSWORD>@neo4j:7687)

Run the Comment Recommendation Framework

Install the package locally

To install the package locally, you have to build it first. For this, run in the folder with setup.py:

python3 -m build

Please make sure that the build library is installed. Otherwise, you cannot build the package.

This creates a dist folder at your current location with two files Comment-Recommendation-Framework-X.X.X.tar.gz and Comment_Recommendation_Framework-X.X.X-py3-none-any.whl. The tar.gz file is the source distribution and the .whl is the built distribution.

We recommend to create a virtual environment to isolate your project from the rest of your system to prevent import and version problems.

Then you run inside your virtual environment:

pip install <path_to_the_whl_file>

Create your project

To create the system template you run the following command in your virtual env after you have installed the package:

python3 -m comment_recommendation_framework

Then the package asks you different questions to determine which modules you need for your project. You can answer them with y for yes and n for no.

Run different moduls with docker-compose

We provide you with the following docker-compose files to run the different components of the recommendation framework.

  • docker-compose.scraping.yml: Runs the news agency scraper to retrieve articles and comments from various news agencies.
  • docker-compose.embed.yml: Starts the embedding process to compute the embeddings for the comments and articles. Should be run directly after docker-compose.scraping.yml.
  • docker-compose.csv.yml: Imports comments and articles from a csv file into the database.
  • docker-compose.test.yml: Runs the tests for the system.
  • docker-compose.api.yml: Runs the comment-recommendation systems.

User-Interface

If you would like to use the default user interface. You have to install the npm packages and build the chrome extension. For this you have to run in the UI folder:

$ npm install

and afterwards:

$ npm run build

Then you can import the build folder in a chromium browser.

Maintainers:

  • Jan Steimann

Contributors:

  • Jan Steimann

License:

Copyright(c) 2024 - today Jan Steimann

Distributed under the MIT License

Metadata

Release files for comment-recommendation-framework 0.16.6

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

Source distribution (sdist)

Source distribution for comment-recommendation-framework 0.16.6
File Size Uploaded Provenance Actions
comment-recommendation-framework-0.16.6.tar.gz 421.0 kB Without provenance Details for comment-recommendation-framework-0.16.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for comment-recommendation-framework 0.16.6
File Interpreter ABI Platform Actions
comment_recommendation_framework-0.16.6-py3-none-any.whl Python 3 none any Details for comment_recommendation_framework-0.16.6-py3-none-any.whl

Total release size: 865.9 kB

Release files / comment-recommendation-framework-0.16.6.tar.gz

Download URL comment-recommendation-framework-0.16.6.tar.gz
Size 421.0 kB
Tags Source
SHA-256 checksum
How to use checksums
da71d73e3704c42825159dfe0e2fa1a7ac7f74d5da41c4459912fe2da18b4a39
BLAKE2b-256 checksum
How to use checksums
b06ef763feb7e6b9dc86bc7fbb98e1b74fde6353ca8f14744a5b2512a718582c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / comment_recommendation_framework-0.16.6-py3-none-any.whl

Download URL comment_recommendation_framework-0.16.6-py3-none-any.whl
Size 444.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b8a3c1ef429208082ef6f09d352637c1252183cf15346af7817f6dfec9039f8
BLAKE2b-256 checksum
How to use checksums
040b934eb559f25a03f721af48b137873c3e9aa3acfab2db87cdfeb2efd79de4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.7

Security for comment-recommendation-framework 0.16.6

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.

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