We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f67018c commit 915f351Copy full SHA for 915f351
1 file changed
speech/cloud-client/transcribe_dlp.py
@@ -91,8 +91,8 @@ def deidentify(file_name, project_id):
91
# are interpreted as phone numbers
92
93
regex = (r".([A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-Za-z0-9!#$%&'*+/=?^_`"
94
- "{|}~-]+)*)(\sat\s+)((?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
95
- "[a-z0-9](?:[a-z0-9-]*[a-z0-9]))")
+ r"{|}~-]+)*)(\sat\s+)((?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+"
+ r"[a-z0-9](?:[a-z0-9-]*[a-z0-9]))")
96
97
updated_transcript = re.sub(regex, r" \1@\3", transcript)
98
@@ -108,7 +108,7 @@ def deidentify(file_name, project_id):
108
109
# Print out the results.
110
print('Final Result with sensitive content redacted: {}'
111
- .format(dlp_response.item.value))
+ .format(dlp_response.item.value))
112
# [END dlp_deidentify_masking]
113
114
0 commit comments