A hackathon-project to extract scientific articles from OpenAlex, analyse them with PDF → LLM workflows to detect programming technologies, store the results in PostgreSQL, and export a semantic RDF/Turtle graph for further querying. Scale was lowered due to time constraints
This project implements a data-pipeline as follows:
- OpenAlex extraction — filter by sub-field and accessible PDFs
- Cache in CSV — intermediate checkpoints for reproducibility
- PDF text extraction + LLM analysis — detect mentioned programming technologies
- PostgreSQL storage — store metadata + analysis results
- RDF/Turtle export — build a semantic graph (using Schema.org + SKOS) for semantic queries (GraphDB, SPARQL…)
- Source code:
src/anddb/ - Cache folder:
cache/ - Final output in Turtle:
db/openalex_graph.ttl - Docker compose files included for easy deployment
- Python 3.8+
- Dependencies:
requests,psycopg2,pandas,rdflib,PyMuPDF (fitz),beautifulsoup4,openai- See
requirements.txt
- Docker (optional, for PostgreSQL/pgAdmin and GraphDB)
- If using Docker, create the network (if referenced in compose):
docker network create gestbd_net
- Build and start the services with Docker Compose:
docker-compose up --build
This will start PostgreSQL, pgAdmin, and GraphDB, along with any required service containers.
-
Create a Python virtual environment (if running locally outside Docker) and install dependencies: ```bash python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt
-
Configure environment variables for the project:
OPENAI_API_KEY=your_openai_api_key
-
Follow the
notebook/presentation.ipynb
Considering that OpenAlex is a content aggregator, it is important to take into account the sources that feed it, primarily:
-
The now-defunct Microsoft Academic Graph (MAG)
-
Crossref
-
ORCID
-
arXiv
-
Various academic publishers
This project is released under the MIT License. See LICENSE for details.