Spaces:
Sleeping

File size: 1,734 Bytes
75eb0ef
6444a02
 
 
 
75eb0ef
6444a02
75eb0ef
6444a02
 
75eb0ef
 
6444a02
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
title: CLAIR
emoji: ⚖️
colorFrom: indigo
colorTo: blue
sdk: docker
app_port: 8000
pinned: false
license: mit
short_description: Search Terms-of-Service clauses and flag unfair ones
---

# CLAIR: Clause Intelligence and Retrieval

Describe a Terms-of-Service clause in your own words, and CLAIR finds similar sentences in
**50 real Terms of Service** (9,414 sentences from the CLAUDETTE corpus). Every result shows
the contract it came from. An optional classifier (TF-IDF + logistic regression) flags clauses
as *potentially unfair*.

- **UI:** this page
- **API docs:** `/docs` (OpenAPI), with the endpoints `POST /search`, `POST /classify`, `GET /ready` and `GET /health`
- **Source code, evaluation and technical report:** <https://github.com/mvprm/clair>

The served backend is BM25. It was chosen over MiniLM and CONTRACTS-BERT by a pre-registered
selection rule plus a production gate, evaluated on contract-disjoint splits. See the GitHub
repository for the full method and results.

> The classifier predicts the CLAUDETTE dataset's annotations. **It is not legal advice or a
> legal determination.** Search scores rank results and are not probabilities.

This Space is deployed automatically from the GitHub repository's `main` branch.
The free hardware sleeps when the Space is idle, so the first request may take up to a minute.

## Data

CLAUDETTE corpus: M. Lippi, P. Pałka, G. Contissa, F. Lagioia, H.-W. Micklitz, G. Sartor, P. Torroni.
*CLAUDETTE: an Automated Detector of Potentially Unfair Clauses in Online Terms of Service.*
Artificial Intelligence and Law, 2019. [arXiv:1805.01217](https://arxiv.org/abs/1805.01217)

The code is released under the MIT License. The data remains under its original terms.