Bachelorarbeit: "Ein Tool zur Erklärung von Datenschutzrichtlinien"
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

94 lines
1.2 KiB

##
# this function calculates the average threshold of the whole data policy
##
def get_average_threshold(liste):
average = 0
for cluster in liste:
average = average + cluster["average"]
if len(liste) == 0:
return 0
else:
return average / len(liste)
##
# This function returns all clusters above a the average threshold * 1.25
##
def get_clusters_above_average_threshold(liste, average_threshold):
cluster_sum = []
for cluster in liste:
if cluster["average"] > average_threshold * 1.25:
cluster_sum.append(cluster)
return cluster_sum
##
#
# List of all possible words describing "save"
# outdated but can be used in the future
##
savewords = """reserve
keep
store
hoard
retain
withhold
conserve
hold
preserve
stockpile
amass
collect
defer
devote
earmark
bank
dedicate
secure
stash
gather
spare
accumulate
allocate
cache
economise
economize
treasure
hide away
lay aside
put aside
put away
set aside
stash away
hang on to
keep in reserve
lay away
lay by
put to one side
squirrel away
stow away
preserve
conserve
store
keep
reserve
maintain
retain
stash
stow
sustain
bottle
secure
hold back
keep back
put aside
put away
set aside
regulate
stash away"""