Commit 18005304 authored by 段英荣's avatar 段英荣

modify

parent b1f5f235
......@@ -51,7 +51,7 @@ class DoctorTransfer(object):
suggest_type = 0 if len(ch_name_term)!=len(ch_full_word) else 1
suggest_item = {
"input":[ch_name_term],
"word_weight":(len(ch_name_term)/len((ch_full_word))) * prefix_weight,
"word_weight":(1.0*len(ch_name_term)/len((ch_full_word))) * prefix_weight,
"suggest_type": suggest_type
}
suggest_list.append(suggest_item)
......@@ -65,7 +65,7 @@ class DoctorTransfer(object):
suggest_type = 2 if len(py_name_term)!=len(py_full_word) else 3
suggest_item = {
"input":[py_name_term],
"word_weight":(len(py_name_term)/len(py_full_word)) * prefix_weight,
"word_weight":(1.0*len(py_name_term)/len(py_full_word)) * prefix_weight,
"suggest_type": suggest_type
}
suggest_list.append(suggest_item)
......@@ -79,7 +79,7 @@ class DoctorTransfer(object):
suggest_type = 4 if len(py_acronym_term)!=len(py_acronym_full_word) else 5
suggest_item = {
"input":[py_acronym_term],
"word_weight":(len(py_acronym_term)/len(py_acronym_full_word)) * prefix_weight,
"word_weight":(1.0*len(py_acronym_term)/len(py_acronym_full_word)) * prefix_weight,
"suggest_type": suggest_type
}
suggest_list.append(suggest_item)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment