File size: 1,796 Bytes
c914f37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
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
```python
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
```python
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.