package PEU.P.nlp; import java.io.IOException; //作者 罗瑶光 //作者,著作权人: 罗瑶光,浏阳 public class DETA_ANN_HMM { public String[][] summing_P(String[][] inputNLP) throws IOException , InstantiationException, IllegalAccessException { String[][] outNLP = inputNLP.clone(); if(0== inputNLP.length) { return outNLP; } for(int i = 7; i < inputNLP[0].length; i++) { for(int j = 0; j < inputNLP.length; j++) { double sum = 0; for(int k = 0;k < inputNLP.length; k++) { sum += Double.valueOf(inputNLP[k][i]); } //System.out.println(sum); outNLP[j][i] = "" + Double.valueOf(inputNLP[j][i])/sum; } } return outNLP; } }