Spaces:
Sleeping
Sleeping
lingbionlp
commited on
Commit
•
51cb241
1
Parent(s):
f11a031
Upload ml_ner.py
Browse files- src/ml_ner.py +2 -2
src/ml_ner.py
CHANGED
@@ -87,7 +87,7 @@ def build_ngram_testset_filted(conll_input,Ngram=8):
|
|
87 |
fout_context_list=[]
|
88 |
temp_entity=[]
|
89 |
temp_pos=[]
|
90 |
-
for ngram in range(2,Ngram+1)
|
91 |
if ngram==1:
|
92 |
for j in range(0, len(lines)):
|
93 |
sid=0
|
@@ -377,7 +377,7 @@ def score_filter(temp_entity, T=0.1):
|
|
377 |
|
378 |
result_list=[]
|
379 |
for i in range(0,len(temp_entity)):
|
380 |
-
if float (temp_entity[i][-1])
|
381 |
result_list.append(temp_entity[i])
|
382 |
return(result_list)
|
383 |
def find_max_entity_nest(nest_list):
|
|
|
87 |
fout_context_list=[]
|
88 |
temp_entity=[]
|
89 |
temp_pos=[]
|
90 |
+
for ngram in range(1,Ngram+1): #range(2,Ngram+1)
|
91 |
if ngram==1:
|
92 |
for j in range(0, len(lines)):
|
93 |
sid=0
|
|
|
377 |
|
378 |
result_list=[]
|
379 |
for i in range(0,len(temp_entity)):
|
380 |
+
if float (temp_entity[i][-1])>T:
|
381 |
result_list.append(temp_entity[i])
|
382 |
return(result_list)
|
383 |
def find_max_entity_nest(nest_list):
|