例如文本为:
0 number1 w beijing
11 number2 w beijing
6 number3 m shanghai
41 number4 w guangdong
98 number5 w fujian
31 number6 m beijing
100 number7 m chongqin
则可知最大值max=100,最小值min=0
使用归一化的公式为:(x-min)/(max-min)
则需要输出:
0 number1 w beijing //(0-min)/(max-min)=(0-0)/(100-0)=0
0.11 number2 w beijing //(11-min)/(max-min)=(11-0)/(100-0)=0.11
0.06 number3 m shanghai //(6-min)/(max-min)=(6-0)/(100-0)=0.06
0.41 number4 w guangdong
0.98 number5 w fujian
0.31 number6 m beijing
1 number7 m chongqin