mvansegbroeck commited on
Commit
e19e15e
·
verified ·
1 Parent(s): b114d59

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -8
README.md CHANGED
@@ -58,6 +58,14 @@ model = GLiNER.from_pretrained("gretelai/gretel-gliner-bi-large-v1.0")
58
 
59
  # Sample text containing PII/PHI entities
60
  text = """
 
 
 
 
 
 
 
 
61
  """
62
 
63
  # Define the labels for PII/PHI entities
@@ -106,8 +114,8 @@ labels = [
106
  "pin"
107
  ]
108
 
109
- # Predict entities with a confidence threshold of 0.3
110
- entities = model.predict_entities(text, labels, threshold=0.3)
111
 
112
  # Display the detected entities
113
  for entity in entities:
@@ -118,16 +126,19 @@ Expected Output:
118
 
119
 
120
  ```
121
- John Doe => first_name
122
- 123-45-6789 => ssn
123
- 2023-04-15 => date
124
- MRN-987654321 => medical_record_number
125
- [email protected] => email
 
 
 
126
  ```
127
 
128
  ## Use Cases
129
 
130
- Gretel GLiNER is ideal for applications requiring precise detection and redaction of sensitive information:
131
 
132
  - Healthcare: Automating the extraction and redaction of patient information from medical records.
133
  - Finance: Identifying and securing financial data such as account numbers and transaction details.
 
58
 
59
  # Sample text containing PII/PHI entities
60
  text = """
61
+ Purchase Order
62
+ ----------------
63
+ Date: 10/05/2023
64
+ ----------------
65
+ Customer Name: CID-982305
66
+ Billing Address: 1234 Oak Street, Suite 400, Springfield, IL, 62704
67
+ Phone: (312) 555-7890 (555-876-5432)
68
69
  """
70
 
71
  # Define the labels for PII/PHI entities
 
114
  "pin"
115
  ]
116
 
117
+ # Predict entities with a confidence threshold of 0.7
118
+ entities = model.predict_entities(text, labels, threshold=0.7)
119
 
120
  # Display the detected entities
121
  for entity in entities:
 
126
 
127
 
128
  ```
129
+ CID-982305 => customer_id
130
+ 1234 Oak Street, Suite 400 => street_address
131
+ Springfield => city
132
+ IL => state
133
+ 62704 => postcode
134
+ (312) 555-7890 => phone_number
135
+ 555-876-5432 => phone_number
136
+ [email protected] => email
137
  ```
138
 
139
  ## Use Cases
140
 
141
+ Gretel GLiNER is ideal for applications requiring detection and redaction of sensitive information:
142
 
143
  - Healthcare: Automating the extraction and redaction of patient information from medical records.
144
  - Finance: Identifying and securing financial data such as account numbers and transaction details.