SobroJuriBert / README.md
Sobro API
Initial SobroJuriBert deployment with JuriBERT integration
c914f37
|
raw
history blame
1.8 kB
metadata
title: SobroJuriBert
emoji: ⚖️
colorFrom: blue
colorTo: indigo
sdk: docker
pinned: true
license: apache-2.0

SobroJuriBert - French Legal AI Assistant

Production-ready API for French legal document analysis powered by JuriBERT.

Features

Core Capabilities

  • Mask Filling: Complete masked tokens in French legal text using JuriBERT
  • Embeddings: Generate semantic embeddings for legal documents
  • Named Entity Recognition: Extract legal entities (courts, articles, parties, dates)
  • Question Answering: Answer questions about legal documents
  • Document Classification: Classify legal documents by type and domain
  • Contract Analysis: Comprehensive contract analysis with risk assessment

Models Used

  • JuriBERT: French legal BERT trained on 6.3GB of Légifrance data
  • CamemBERT-NER: For named entity recognition

API Endpoints

Text Analysis

  • POST /mask-fill - Fill [MASK] tokens in legal text
  • POST /embeddings - Generate text embeddings
  • POST /ner - Extract named entities
  • POST /qa - Question answering
  • POST /classify - Document classification
  • POST /analyze-contract - Contract analysis

Usage

Example: Mask Filling

import requests

response = requests.post(
    "https://sobroinc-sobrojuribert.hf.space/mask-fill",
    json={
        "text": "Le contrat est signé entre les [MASK].",
        "top_k": 3
    }
)

Example: Named Entity Recognition

response = requests.post(
    "https://sobroinc-sobrojuribert.hf.space/ner",
    json={
        "text": "Le Tribunal de Grande Instance de Paris a rendu sa décision le 15 janvier 2024"
    }
)

About

Created by Sobro Inc. for French legal professionals. Powered by JuriBERT and state-of-the-art French NLP models.