WEBVTT

00:00.680 --> 00:01.680
Hello everyone!

00:02.040 --> 00:14.880
In this video we will cover the component Anonymizer, which will iterate over the Presidio Analyzer

00:14.880 --> 00:21.560
results and provide anonymization capabilities for the identified text.

00:22.560 --> 00:34.160
The Anonymizer provides five different types of features or capabilities, that is, replace, redact,

00:34.200 --> 00:37.680
mask, hash, and encrypt.

00:38.080 --> 00:40.240
The default is to replace the text.

00:41.000 --> 00:50.880
So in this particular exercise that will go through we will set up the Anonymizer engine, will create

00:51.520 --> 00:53.400
an Anonymizer request.

00:54.200 --> 00:58.000
And then we will anonymize the text.

00:58.560 --> 00:59.080
Right.

00:59.120 --> 01:06.040
So let's go ahead and first start the very first step.

01:08.000 --> 01:11.760
So now this is done installing the default packages that we need.

01:11.800 --> 01:20.120
Let's go ahead and uh first analyze the uh the text for that.

01:20.320 --> 01:27.280
I'll quickly import the desired classes.

01:28.120 --> 01:28.360
All right.

01:28.360 --> 01:32.800
So now first analyzer import.

01:36.200 --> 01:37.320
Analyzer engine.

01:39.480 --> 01:43.480
And here I will go ahead and.

01:47.080 --> 01:50.040
Add the text that we want to add anonymize.

01:50.720 --> 01:55.440
I will use the same text that we have used in our previous videos which is.

01:57.720 --> 02:01.590
His name is Mr. Jones and his phone number is this right?

02:01.990 --> 02:02.710
Quickly.

02:02.710 --> 02:03.550
Analyzer.

02:05.150 --> 02:05.550
Uh.

02:05.590 --> 02:06.630
Instantiate it.

02:10.750 --> 02:11.630
And then.

02:16.310 --> 02:17.230
Get the results.

02:28.630 --> 02:29.350
Thank you.

02:30.670 --> 02:31.030
Right.

02:31.030 --> 02:37.390
So we are going to analyze phone number that we have done it in our previous video.

02:38.750 --> 02:41.270
I missed the print statement here.

02:42.590 --> 02:43.030
Right.

02:43.550 --> 02:45.190
Let me execute this one more time.

02:51.350 --> 02:52.710
Okay okay okay.

02:57.830 --> 02:58.230
All right.

02:58.270 --> 02:58.710
Great.

02:58.750 --> 03:07.150
So now let's go ahead and run the Anonymizer engine on the analyzer results.

03:07.310 --> 03:09.470
For that, I'll have to import.

03:11.590 --> 03:16.590
The classes anonymizer engine and the operator config.

03:17.870 --> 03:20.750
Now let me go ahead and.

03:22.910 --> 03:25.630
Initialize the Anonymizer engine.

03:35.830 --> 03:41.030
Now let's anonymize the the the results.

03:41.030 --> 03:41.950
So for that.

03:44.390 --> 03:50.110
I'll say anonymized results would be the variable.

03:50.110 --> 03:50.910
And then.

03:53.390 --> 03:57.270
Anonymizer dot anonymize.

03:58.510 --> 03:59.030
Right.

03:59.310 --> 04:06.110
And then I'll go ahead and, um, add the text that we want to anonymize.

04:19.990 --> 04:20.430
Right.

04:24.470 --> 04:29.390
Use the analyzer results from here.

04:33.790 --> 04:38.590
And then, uh, use the operators.

04:38.830 --> 04:43.910
That is going to be a custom operator here, which is phone number.

04:44.510 --> 04:47.270
So here I added the operator here as phone number.

04:47.630 --> 04:58.070
And the configuration here is that I want to mask the, uh, text with the character as Asterix and

04:58.110 --> 05:03.820
the number of characters to mask is 12 and mask.

05:03.820 --> 05:07.220
The entire text is from start to the end of it, right?

05:07.700 --> 05:11.500
And now let's go ahead and print the results.

05:21.060 --> 05:23.980
And then let's go ahead and run this.

05:26.580 --> 05:27.420
It was pretty quick.

05:27.420 --> 05:33.820
And if you notice here that this is the text that his name is Mr. Jones and his phone number is the

05:33.820 --> 05:40.020
masked up or anonymized, uh, strings.

05:40.540 --> 05:45.540
And here is the detail about this, that it starts at 4 to 6 and Z 58.

05:45.940 --> 05:47.980
This is the phone number and this is the text.

05:47.980 --> 05:49.380
And the operator is masked.

05:50.220 --> 05:50.700
All right.

05:51.100 --> 05:58.020
Um, this is the anonymized component that we went through from the Presidio framework.

05:58.460 --> 05:59.020
Thank you.
