File size: 1,303 Bytes
dbf191a
6c8fdb5
283753c
dbf191a
 
 
 
 
 
 
 
 
 
 
 
 
 
6c8fdb5
dbf191a
283753c
dbf191a
 
 
 
 
6c8fdb5
 
283753c
dbf191a
 
 
 
 
 
 
 
6c8fdb5
dbf191a
6c8fdb5
dbf191a
 
 
6c8fdb5
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
import re

def extract_clauses(text):
    return [
        {
            "title": "Confidentiality",
            "eli5": "Keep shared secrets safe.",
            "simple": "You must protect confidential information.",
            "pro": "Recipient shall maintain strict confidentiality over protected disclosures."
        },
        {
            "title": "Non-Disclosure",
            "eli5": "Don't tell anyone.",
            "simple": "You agree not to disclose protected information.",
            "pro": "Recipient shall not disseminate any protected information to unauthorized parties."
        }
    ]

def get_risks(text):
    return [
        "Broad confidentiality scope",
        "Indefinite protection period",
        "Unilateral termination clause",
        "Unclear data-handling terms",
        "No liability limitation"
    ]

def fairness_score(text):
    return {"user": 40, "company": 60}

def extract_entities(text):
    return {
        "parties": re.findall(r"[A-Z][a-z]+ [A-Z][a-z]+", text),
        "dates": re.findall(r"\b\d{4}\b", text),
        "money": re.findall(r"\$\d+", text)
    }

def alternative_clauses(text):
    return [
        "Confidentiality limited to 3 years.",
        "Mutual NDA instead of one-way.",
        "Liability capped at actual damages."
    ]