mirror of
https://github.com/ail-project/ail-framework.git
synced 2024-11-30 09:47:17 +00:00
Fixed bug introduced in merge-conflict
This commit is contained in:
parent
b076765cf4
commit
dad05073fd
1 changed files with 1 additions and 4 deletions
|
@ -20,15 +20,12 @@ threshold_increase = 1.0 # The percentage representing the keyword occurence si
|
||||||
max_set_cardinality = 10 # The cardinality of the progression set
|
max_set_cardinality = 10 # The cardinality of the progression set
|
||||||
num_day_to_look = 5 # the detection of the progression start num_day_to_look in the past
|
num_day_to_look = 5 # the detection of the progression start num_day_to_look in the past
|
||||||
|
|
||||||
|
def analyse(server, field_name, date, url_parsed):
|
||||||
field = url_parsed[field_name]
|
field = url_parsed[field_name]
|
||||||
if field is not None:
|
if field is not None:
|
||||||
prev_score = server.hget(field, date)
|
prev_score = server.hget(field, date)
|
||||||
if prev_score is not None:
|
if prev_score is not None:
|
||||||
print field + ' prev_score:' + prev_score
|
|
||||||
server.hset(field, date, int(prev_score) + 1)
|
server.hset(field, date, int(prev_score) + 1)
|
||||||
if int(prev_score) + 1 > threshold_need_to_look: # threshold for false possitive
|
|
||||||
if(check_for_progression(server, field, date)):
|
|
||||||
to_plot.add(field)
|
|
||||||
else:
|
else:
|
||||||
server.hset(field, date, 1)
|
server.hset(field, date, 1)
|
||||||
if field_name == "domain": #save domain in a set for the monthly plot
|
if field_name == "domain": #save domain in a set for the monthly plot
|
||||||
|
|
Loading…
Reference in a new issue