Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.6%) to scientific vocabulary
Last synced: 6 months ago · JSON representation ·

Repository

Basic Info
  • Host: GitHub
  • Owner: AneriPatel28
  • License: mpl-2.0
  • Language: Python
  • Default Branch: main
  • Size: 966 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created 10 months ago · Last pushed 10 months ago
Metadata Files
Readme Contributing License Code of conduct Citation

README.md

JurisAI: Legal Assistant for Ghana and Sierra Leone 🇬🇭 🇸🇱

Python 3.9+ License Streamlit App OpenAI Code style: black Pinecone LangChain pre-commit Contributions welcome Maintenance GitHub last commit

Table of Contents

Overview

JurisAI is an intelligent legal assistant that provides accessible legal guidance for Ghana and Sierra Leone. Built with Streamlit and powered by advanced language models, it offers legal information in multiple languages to bridge the accessibility gap in legal services.

Quick Links

Features

Multilingual Support

  • 🇬🇭 Ghana: English and Akan (Twi) translation
  • 🇸🇱 Sierra Leone: English and Krio translation
  • Real-time language switching
  • Culturally appropriate translations

AI-powered Legal Assistance

  • Interactive legal question answering
  • Context-aware responses using LangChain
  • Legal document analysis and summarization
  • Pinecone vector search for relevant legal documents

User Interface

  • Clean and intuitive Streamlit chat interface
  • Easy language toggle buttons
  • Mobile-responsive design
  • Real-time response generation

Technical Architecture

Backend Components

  • LangChain Integration:

    • Document processing and chunking
    • Vector embeddings management
    • Prompt templates and chains
    • Context-aware response generation
  • Vector Search:

    • Pinecone for document similarity search
    • Efficient retrieval of relevant legal information
    • Semantic search capabilities
  • Translation Services:

    • Google Cloud Translation API integration
    • Deep-translator for backup translations
    • Custom translation dictionaries for legal terms

Frontend Components

  • Streamlit UI:
    • Chat-based interface
    • Language selection toggles
    • Progress indicators
    • Response formatting
    • Error handling

Installation

Prerequisites

  1. Python Environment:

    • Python 3.9 or higher
    • pip (Python package installer)
  2. Required API Keys:

    • OpenAI API Key (for GPT models)
    • Pinecone API Key (for vector search)
    • Google Cloud Translation API Key
    • Groq API Key (optional)

Setup Steps

  1. Clone the Repository: bash git clone https://github.com/Saikrishna-Paila/Fostering-Accountability-and-Collaborative-Engagements-for-Integrity-and-Transformation.git cd Fostering-Accountability-and-Collaborative-Engagements-for-Integrity-and-Transformation

  2. Set Up Python Environment: bash python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate

  3. Install Dependencies: bash pip install -r requirements.txt

  4. Configure Environment Variables: ```bash cp .env.example .env

    Edit .env with your API keys

    ```

Project Structure

. ├── src/ │ ├── jurisai/ # Main application package │ ├── template/ # Template utilities │ └── worldbank/ # World Bank specific modules ├── deployment/ # Deployment configurations │ ├── config/ # Deployment config files │ ├── Dockerfile # Docker image definition │ ├── docker-compose.yml # Docker Compose config │ ├── deploy.sh # Deployment script │ └── README.md # Deployment documentation ├── docs/ # Documentation files ├── notebooks/ # Jupyter notebooks ├── tests/ # Test suite ├── config/ # Application configurations ├── data/ # Data files (gitignored) ├── secrets/ # Secret files (gitignored) ├── .github/ # GitHub workflows and templates ├── requirements.txt # Python dependencies ├── pyproject.toml # Project metadata and tools config ├── .pre-commit-config.yaml # Pre-commit hooks config ├── .env.example # Example environment variables ├── LICENSE # Mozilla Public License ├── CONTRIBUTING.md # Contribution guidelines ├── CODE_OF_CONDUCT.md # Code of conduct ├── CITATION.cff # Citation information └── NOTICE # Third-party notices

The project follows a modular structure with clear separation of concerns: - src/jurisai/: Core application logic and components - src/template/: Reusable template utilities - src/worldbank/: World Bank specific implementations - deployment/: All deployment-related configurations and scripts - docs/: Project documentation and guides - notebooks/: Example notebooks and data analysis - tests/: Automated test suite - config/: Application configuration files - data/: Data storage (not tracked in git) - secrets/: Sensitive configuration (not tracked in git)

Dependencies

Core Components

  • Frontend:
    • streamlit: Web interface
    • python-dotenv: Environment management

AI and ML

  • openai==1.66.2: GPT model integration
  • langchain==0.3.20: LLM framework
  • langchain-core==0.3.44: Core functionality
  • langchain-community==0.3.19: Community components
  • langchain-openai==0.3.8: OpenAI integration
  • pinecone==5.4.2: Vector database
  • groq==0.19.0: Alternative LLM provider

Translation

  • google-cloud-translate: Primary translation
  • deep-translator==1.11.4: Backup translation

Data Processing

  • pandas: Data manipulation
  • numpy: Numerical operations
  • nltk: Text processing
  • scikit-learn: ML utilities
  • spacy: NLP processing
  • tiktoken==0.9.0: Token counting

Deployment

Quick Start

```bash

Clone repository

git clone https://github.com/Saikrishna-Paila/Fostering-Accountability-and-Collaborative-Engagements-for-Integrity-and-Transformation.git cd Fostering-Accountability-and-Collaborative-Engagements-for-Integrity-and-Transformation

Setup environment

cp deployment/.env.example deployment/.env cd deployment docker-compose up --build -d ```

Resource Requirements

  • Memory: 2GB minimum
  • CPU: 1 core minimum
  • Storage: 1GB minimum
  • Ports: 8501 (Streamlit)

Container Management

bash ./deploy.sh build # Build image ./deploy.sh start # Start container ./deploy.sh stop # Stop container ./deploy.sh restart # Restart container ./deploy.sh status # Check status

For detailed deployment instructions, see deployment/README.md.

Contributing

We welcome contributions! Please see our Contributing Guidelines and Code of Conduct.

License

This project is licensed under the Mozilla Public License - see the LICENSE file for details.

Project Team

This project is a collaborative effort led by the World Bank and George Washington University (GWU) Master's students.

Team Lead – World Bank Group
- Tatsuya Iwasaki

Team Members – GWU
- Aneri Patel
- Saikrishna Paila
- Phani Vishnu Addepalli
- Pranideep Meka

Acknowledgments

  • World Bank Group
  • Ghana Legal Information Institute (GhaLII)
  • Sierra Leone Legal Information Institute (SierraLII)
  • GWU Master's Students

Note: This project is maintained by GWU Master's Students for Global Legal Access. Country borders or names do not necessarily reflect the World Bank Group's official position.

Owner

  • Login: AneriPatel28
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it using these metadata."
title: "JurisAI: Legal Assistant for Ghana and Sierra Leone"
abstract: "An intelligent legal assistant providing multilingual legal guidance for Ghana and Sierra Leone, featuring AI-powered document analysis and translations in English, Akan, and Krio."
type: software
authors:
  - name: "JurisAI Team"
    affiliation: "George Washington University"
version: "0.1.0"
date-released: "2024-03-01"
repository-code: "https://github.com/Saikrishna-Paila/Fostering-Accountability-and-Collaborative-Engagements-for-Integrity-and-Transformation"
keywords:
  - legal-assistant
  - ghana
  - sierra-leone
  - multilingual
  - ai
  - nlp
license: Mozilla Public License 2.0
references:
  - authors:
      - name: "Ghana Legal Information Institute"
    title: "Ghana Legal Information Database"
    type: database
    url: "https://www.ghalii.org/"
    year: 2024
  - authors:
      - name: "Sierra Leone Legal Information Institute"
    title: "Sierra Leone Legal Information Database"
    type: database
    url: "https://www.sierralii.org/"
    year: 2024
contact:
  - email: "spaila@worldbank.org"
    name: "Saikrishna Paila" 

GitHub Events

Total
  • Push event: 1
  • Create event: 2
Last Year
  • Push event: 1
  • Create event: 2

Dependencies

deployment/Dockerfile docker
  • python 3.11-slim build
deployment/docker-compose.yml docker
  • jurisai latest
pyproject.toml pypi
  • fastapi >=0.68.0
  • google-cloud-translate >=3.8.1
  • langchain >=0.0.200
  • openai >=0.27.0
  • pinecone-client >=2.2.1
  • python-dotenv >=0.19.0
  • streamlit >=1.24.0
requirements.txt pypi
  • PyYAML *
  • deep-translator ==1.11.4
  • google-cloud-translate *
  • groq ==0.19.0
  • langchain ==0.3.20
  • langchain-community ==0.3.19
  • langchain-core ==0.3.44
  • langchain-openai ==0.3.8
  • nltk *
  • numpy *
  • openai ==1.66.2
  • pandas *
  • pinecone ==5.4.2
  • python-dateutil *
  • python-dotenv *
  • requests *
  • scikit-learn *
  • spacy *
  • streamlit *
  • tiktoken ==0.9.0
setup.py pypi
  • numpy *
  • pandas *