Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
textdict={}
text2lines={}
for text in self.children:
validlines=text.validlines()
textdict[text]=str(len(validlines))+" lines"
text2lines[text]=validlines
sels=choose(textdict,"please select the primary text whose attributes will be sought after in the others:")
primary=sels[0]
sels=choose(['wordbound','stress','weight'],"please choose the dimensions on which lines of primary text <"+repr(primary)+"> must be matched:")
being.pointsofcomparison=[]
for sel in sels:
being.pointsofcomparison.append("str_"+sel.strip())
sels=choose({'difference':'remove non-matching lines in non-primary texts only','intersection':'remove non-matching lines in all texts'},"please select method of grooming:")
diffmethod=sels[0]
#if diffmethod=="intersection":
#
# lineset=set(text2lines[primary])
# if diffmethod=="intersection":
# for text in self.children:
# thislineset=set(text2lines[text])
# for line in (lineset ^ thislineset):
# line.ignoreMe=True
#
# else:
#
textdict={}
text2lines={}
for text in self.children:
validlines=text.validlines()
textdict[text]=str(len(validlines))+" lines"
text2lines[text]=validlines
sels=choose(textdict,"please select the primary text whose attributes will be sought after in the others:")
primary=sels[0]
sels=choose(['wordbound','stress','weight'],"please choose the dimensions on which lines of primary text <"+repr(primary)+"> must be matched:")
being.pointsofcomparison=[]
for sel in sels:
being.pointsofcomparison.append("str_"+sel.strip())
sels=choose({'difference':'remove non-matching lines in non-primary texts only','intersection':'remove non-matching lines in all texts'},"please select method of grooming:")
diffmethod=sels[0]
#if diffmethod=="intersection":
#
# lineset=set(text2lines[primary])
# if diffmethod=="intersection":
# for text in self.children:
# thislineset=set(text2lines[text])
# for line in (lineset ^ thislineset):
# line.ignoreMe=True
#
# else:
#