Spaces:
Sleeping
Sleeping
File size: 1,501 Bytes
e8dde59 648ae0f e8dde59 648ae0f e8dde59 |
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 45 46 |
from enum import Enum
def simple_raw_chatter_detector_blackbriar(transcript: str) -> str:
if 'operation blackbriar' in transcript or 'blackbriar' in transcript:
print("Key-word 'blackbriar' found in transcript")
chatter_category = 'blackbriar'
else:
print("Transcript harmless")
chatter_category = 'harmless'
return chatter_category
def simple_raw_chatter_detector(transcript: str) -> str:
if 'operation blackbriar' in transcript or 'blackbriar' in transcript:
print("Key-word 'blackbriar' found in transcript")
chatter_category = 'blackbriar'
elif 'operation treadstone' in transcript or 'treadstone' in transcript:
print("Key-word 'treadstone' found in transcript")
chatter_category = 'treadstone'
elif 'ultra' in transcript:
print("Key-word 'ultra' found in transcript")
chatter_category = 'ultra'
else:
print("Transcript harmless")
chatter_category = 'harmless'
return chatter_category
def simple_normalized_blacbriar_chatter_detector(transcript: str) -> str:
normalized_transcript = transcript.lower()
chatter_category = simple_raw_chatter_detector_blackbriar(transcript=normalized_transcript)
return chatter_category
def simple_normalized_chatter_detector(transcript: str) -> str:
normalized_transcript = transcript.lower()
chatter_category = simple_raw_chatter_detector(transcript=normalized_transcript)
return chatter_category
|