Spaces:
Sleeping
Sleeping
Sobro Inc
commited on
Commit
·
c102230
1
Parent(s):
967a5fb
Force rebuild with v2.0 - Full JuriBERT features
Browse files- .dockerignore +8 -0
- README.md +40 -33
.dockerignore
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
__pycache__/
|
2 |
+
*.pyc
|
3 |
+
.git/
|
4 |
+
.gitignore
|
5 |
+
*.log
|
6 |
+
.env
|
7 |
+
venv/
|
8 |
+
ENV/
|
README.md
CHANGED
@@ -8,59 +8,66 @@ pinned: true
|
|
8 |
license: apache-2.0
|
9 |
---
|
10 |
|
11 |
-
# SobroJuriBert - French Legal AI Assistant
|
12 |
|
13 |
Production-ready API for French legal document analysis powered by JuriBERT.
|
14 |
|
15 |
-
## Features
|
16 |
|
17 |
-
###
|
18 |
-
- **Mask Filling**: Complete masked tokens in French legal text
|
19 |
-
- **Embeddings**: Generate semantic embeddings
|
20 |
-
- **
|
21 |
- **Question Answering**: Answer questions about legal documents
|
22 |
-
- **
|
23 |
-
- **Contract Analysis**: Comprehensive contract analysis with risk assessment
|
24 |
-
|
25 |
-
### Models Used
|
26 |
-
- **JuriBERT**: French legal BERT trained on 6.3GB of Légifrance data
|
27 |
-
- **CamemBERT-NER**: For named entity recognition
|
28 |
|
29 |
### API Endpoints
|
30 |
|
31 |
-
####
|
32 |
- `POST /mask-fill` - Fill [MASK] tokens in legal text
|
33 |
- `POST /embeddings` - Generate text embeddings
|
34 |
-
- `POST /ner` - Extract named entities
|
35 |
- `POST /qa` - Question answering
|
36 |
- `POST /classify` - Document classification
|
37 |
-
- `POST /analyze-contract` - Contract analysis
|
38 |
|
39 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
-
|
42 |
```python
|
43 |
-
|
|
|
|
|
|
|
|
|
|
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
)
|
52 |
```
|
53 |
|
54 |
-
|
55 |
```python
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
)
|
62 |
```
|
63 |
|
64 |
## About
|
65 |
Created by Sobro Inc. for French legal professionals.
|
66 |
-
Powered by JuriBERT and state-of-the-art French NLP models.
|
|
|
|
|
|
8 |
license: apache-2.0
|
9 |
---
|
10 |
|
11 |
+
# SobroJuriBert - French Legal AI Assistant v2.0
|
12 |
|
13 |
Production-ready API for French legal document analysis powered by JuriBERT.
|
14 |
|
15 |
+
## 🆕 Version 2.0 Features
|
16 |
|
17 |
+
### Complete JuriBERT Integration
|
18 |
+
- **Mask Filling**: Complete masked tokens in French legal text
|
19 |
+
- **Embeddings**: Generate 768-dimensional semantic embeddings
|
20 |
+
- **Enhanced NER**: Extract persons, money, dates, organizations, courts, and legal references
|
21 |
- **Question Answering**: Answer questions about legal documents
|
22 |
+
- **Advanced Classification**: Classify documents with keyword analysis
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
### API Endpoints
|
25 |
|
26 |
+
#### Core Analysis
|
27 |
- `POST /mask-fill` - Fill [MASK] tokens in legal text
|
28 |
- `POST /embeddings` - Generate text embeddings
|
29 |
+
- `POST /ner` - Extract named entities (enhanced)
|
30 |
- `POST /qa` - Question answering
|
31 |
- `POST /classify` - Document classification
|
|
|
32 |
|
33 |
+
### Entity Types Supported
|
34 |
+
- **PER**: Persons (M. Dupont, Me Martin)
|
35 |
+
- **MONEY**: Monetary amounts (1000€, EUR 50.000)
|
36 |
+
- **LEGAL_REF**: Legal references (article L123-4, loi n°2024-001)
|
37 |
+
- **DATE**: Dates in various formats
|
38 |
+
- **ORG**: Organizations and companies
|
39 |
+
- **COURT**: Courts and tribunals
|
40 |
+
|
41 |
+
### Usage Examples
|
42 |
|
43 |
+
#### Mask Filling
|
44 |
```python
|
45 |
+
POST /mask-fill
|
46 |
+
{
|
47 |
+
"text": "Le contrat est [MASK] entre les parties.",
|
48 |
+
"top_k": 3
|
49 |
+
}
|
50 |
+
```
|
51 |
|
52 |
+
#### Named Entity Recognition
|
53 |
+
```python
|
54 |
+
POST /ner
|
55 |
+
{
|
56 |
+
"text": "M. Dupont a payé 15.000€ selon l'article L123-4 du Code civil le 15 janvier 2024"
|
57 |
+
}
|
|
|
58 |
```
|
59 |
|
60 |
+
#### Question Answering
|
61 |
```python
|
62 |
+
POST /qa
|
63 |
+
{
|
64 |
+
"context": "Le bail est signé pour une durée de 3 ans renouvelable.",
|
65 |
+
"question": "Quelle est la durée du bail?"
|
66 |
+
}
|
|
|
67 |
```
|
68 |
|
69 |
## About
|
70 |
Created by Sobro Inc. for French legal professionals.
|
71 |
+
Powered by JuriBERT and state-of-the-art French NLP models.
|
72 |
+
|
73 |
+
Version: 2.0.0 - Full JuriBERT Integration
|