This is a repository for the Cam 2.0 project. The goal of this project is to create a question answering system that can answer questions about the differences between two entities. For example, given the entities "Harry Potter" and "LotR", the system is able to answer a question such as "What is better: Harry Potter or LotR?". The arguments for "Harry Potter" and "LotR" are displayed along with a clear and coherent summary.
This repository contains the following sub-repositories:
- CQI: Contains the code for the Comparative Questions Identification (CQI) task.
- OAI: Contains the code for the Objects and Aspects Identification (OAI) task.
- SC: Contains the code for the Stance Classification (SC) task.
- CQAS: Contains the code for the Comparative Question Answering Summarization (CQAS) task.
- backend: Contains the code for the backend of the VersusQA system.
- frontend: Contains the code for the frontend of the VersusQA system.
- Install Docker and Docker Compose.
- Clone this repository.
- Run
docker-compose up
in the ./backend directory of this repository. - Frontend is available at http://localhost:15557.
- Backend is available at http://localhost:15558.
- Install Python 3.8 and pip.
- Clone this repository.
- Create a virtual environment with
python3 -m venv venv
in all sub-repositories. - Activate the virtual environment with
source venv/bin/activate
in all sub-repositories (separate terminals). - Install the dependencies with
pip install -r requirements.txt
in all sub-repositories. - In each sub-repository, run the FastAPI server with
uvicorn main:app --host=0.0.0.0 --port=[See Below] --reload
. - Run a PostgresSQL database server using an installation on your local machine or a Docker container.
- If you use a Docker container, run
docker run --name postgres -p 5432:5432 -d postgres
in a terminal. - If you use an installation on your local machine, run
sudo service postgresql start
in a terminal.
- If you use a Docker container, run
- Change the database connection string, the username and password in the ./backend/src/main/resources/application.properties file.
- Install Maven.
- Build the Spring Boot server with
mvn clean install
in the ./backend directory. - Run the Spring Boot server with
java -jar target/Comparative-Question-Answering---Backend-0.0.1-SNAPSHOT.jar
in the ./backend directory. - Navigate to the ./frontend directory.
- Install Node.js and npm.
- Install the Angular CLI with
npm install -g @angular/cli
. - Install the dependencies with
npm install
. - Run the Angular frontend with
ng serve
in the ./frontend directory. - Frontend is available at http://localhost:4200.
- Backend is available at http://localhost:8080.
- Install Docker and Docker Compose.
- Clone this repository.
- Change the backend URL in the ./frontend/src/environments/environment.prod.ts file to your exposed backend URL.
- Run
docker-compose -f docker-compose.prod.yml up
in the ./backend directory of this repository. - Map the ports 15557 and 15558 to your exposed ports, with backend on 15558 and frontend on 15557.
This System was built during a Master Project at the University of Hamburg. The following people contributed to this project:
This project was under the supervision of the Language Technology Group at the University of Hamburg.
To contribute you need to install pre-commit hooks in your git repository.
pip install pre-commit
pre-commit install
This project is licensed under the terms of the Apache 2.0 license. See LICENSE for more information.
The deployed system is available at https://cam-v2.ltdemos.informatik.uni-hamburg.de/.