Skip to content

sheikhomar/paraglide

Repository files navigation

Paraglide

An app for searching through Danish statutes.

Development Setup

  1. Ensure pyenv and PDM are installed.

  2. Install the correct Python version:

    pyenv install
  3. Install the dependencies:

    pdm use python
    pdm install

    Install Playwright's dependencies (Chrome, Firefox, Webkit, and FFmpeg):

    pdm run playwright install
    pdm run playwright install-deps
  4. Install the pre-commit hooks:

    pdm run pre-commit install

Getting Started

  • Scrape a specific statute from retsinformation.dk:

    pdm run scrape-statute \
      --url https://www.retsinformation.dk/eli/lta/2023/1180 \
      --output-path data/eli-lta-2023-1180.html \
      --force
  • Parse downloaded statute:

    pdm run parse-statute \
      --input-path data/eli-lta-2023-1180.html \
      --output-path data/eli-lta-2023-1180.json \
      --force
  • Build Llama index using Cohere Embed API:

    pdm run build-index-cohere \
      --statute-path data/eli-lta-2023-1180.json \
      --index-dir data/llama-indices/cohere-embed-v3 \
      --cohere-api-key $COHERE_API_KEY
  • Run web app for searching through the statute for parental leave:

    pdm run ui-parental-leave

About

Harness Retrieval Augmented Generation (RAG) to make Danish statutes accessible and navigable.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors