is registered under my name and linked to my bank account, PL61109010140000071219812874. Additionally, the wallet had a driver's license - DL No: 999000680 issued to my name. It also houses my Social Security Number, 602-76-4532.  What's more, I had my polish identity card there, with the number ABC123456. I would like this data to be secured and protected in all possible ways. I believe It was stolen at 9:30 AM. In case any information arises regarding my wallet, please reach out to me on my phone number, 999-888-7777, or through my personal email, johndoe@example.com. Please consider this information to be highly confidential and respect my privacy.  The bank has been informed about the stolen credit card and necessary actions have been taken from their end. They will be reachable at their official email, support@bankname.com. My representative there is Victoria Cherry (her business phone: 987-654-3210). Thank you for your assistance, John Doe"""from langchain.schema import Documentdocuments = [Document(page_content=document_content)]We only have one document, so before we move on to creating a QA system, let's focus on its content to begin with.You may observe that the text contains many different PII values, some types occur repeatedly (names, phone numbers, emails), and some specific PIIs are repeated (John Doe).# Util function for coloring the PII markers# NOTE: It will not be visible on documentation page, only in the notebookimport redef print_colored_pii(string):    colored_string = re.sub(        r"(<[^>]*>)", lambda m: "\033[31m" + m.group(1) + "\033[0m", string    )    print(colored_string)Let's proceed and try to anonymize the text with the default settings. For now, we don't replace the data with synthetic, we just mark it with markers (e.g. <PERSON>), so we set add_default_faker_operators=False:from langchain_experimental.data_anonymizer import PresidioReversibleAnonymizeranonymizer = PresidioReversibleAnonymizer(
Open In Colab
Open In Colab ->: is registered under my name and linked to my bank account, PL61109010140000071219812874. Additionally, the wallet had a driver's license - DL No: 999000680 issued to my name. It also houses my Social Security Number, 602-76-4532.  What's more, I had my polish identity card there, with the number ABC123456. I would like this data to be secured and protected in all possible ways. I believe It was stolen at 9:30 AM. In case any information arises regarding my wallet, please reach out to me on my phone number, 999-888-7777, or through my personal email, johndoe@example.com. Please consider this information to be highly confidential and respect my privacy.  The bank has been informed about the stolen credit card and necessary actions have been taken from their end. They will be reachable at their official email, support@bankname.com. My representative there is Victoria Cherry (her business phone: 987-654-3210). Thank you for your assistance, John Doe"""from langchain.schema import Documentdocuments = [Document(page_content=document_content)]We only have one document, so before we move on to creating a QA system, let's focus on its content to begin with.You may observe that the text contains many different PII values, some types occur repeatedly (names, phone numbers, emails), and some specific PIIs are repeated (John Doe).# Util function for coloring the PII markers# NOTE: It will not be visible on documentation page, only in the notebookimport redef print_colored_pii(string):    colored_string = re.sub(        r"(<[^>]*>)", lambda m: "\033[31m" + m.group(1) + "\033[0m", string    )    print(colored_string)Let's proceed and try to anonymize the text with the default settings. For now, we don't replace the data with synthetic, we just mark it with markers (e.g. <PERSON>), so we set add_default_faker_operators=False:from langchain_experimental.data_anonymizer import PresidioReversibleAnonymizeranonymizer = PresidioReversibleAnonymizer(