diff --git a/transgrab.py b/transgrab.py index cb53048..20bae09 100644 --- a/transgrab.py +++ b/transgrab.py @@ -25,7 +25,7 @@ def processTranscript(r,dir_style=1): text = [re.sub("''.*''","",x) for x in text] elif dir_style==2: text = [re.sub("\([^)]*\)","",x).replace(" "," ") for x in text] - text = [re.sub(r"\[\[[^|]*\|(.*)\]\]",r"\g<1>",x).replace("[[","").replace("]]","") for x in text] + text = [re.sub(r"\[\[[^|]*\|([^\]]+)\]\]",r"\g<1>",x).replace("[[","").replace("]]","") for x in text] return "\n".join(text) def normalize(t):