# Supervision Hack 2022 — 1st Place

> Source: https://jakubczak.dev/projects/supervision-hack-2022/ · Author: Mateusz Jakubczak

*NLP, OCR and computer vision extraction of key fields from investment fund (KIID) documents, with 95%+ dataset completeness.*

- Published: 2022-10-01
- Tags: nlp, computer-vision, scraping, hackathon
- External link: https://challengerocket.com/supervision_hack

**1st place at the 1st edition of Supervision Hack**, organised by the Polish Financial Supervision Authority (KNF) at
PGE Narodowy, Warsaw, on 21–23 October 2022, with the Data Drivers team. The edition had two tasks; we won
**#KarateKIID**: analysing the Key Investor Information Documents (KIID) of Polish investment funds.

## What we built

- An ETL pipeline that downloads the KIID PDFs for all Polish investment funds.
- Field extraction with NLP rules (spaCy, Polish model) for costs, fees and other key fields, plus OCR and computer
  vision (Tesseract, OpenCV) to read the risk-level scale from the document's graphics.
- A rule-based validator that flags documents breaking the KIID rules, reaching **95%+ dataset completeness** for the
  key fields.
- Exploratory analysis and visualisations of the whole fund market.

KNF later said the first edition's winning solutions were put into production.

## Tech

Python, spaCy, Tesseract OCR, OpenCV, Pandas, Matplotlib.

More: [datadrivers.pl](https://www.datadrivers.pl/#supervision-hack---1st-place) ·
[KNF on deploying the winners](https://www.knf.gov.pl/aktualnosci?articleId=82252&p_id=18)
