-
Notifications
You must be signed in to change notification settings - Fork 90
/
ANNTest.java
35 lines (33 loc) · 1.38 KB
/
ANNTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package org.tinos.sensing.test;
import java.io.IOException;
import org.tinos.engine.analysis.Analyzer;
import NLPProcessor.DETA_ANN_HMM;
public class ANNTest{
public static void main(String[] argv) throws IOException, InstantiationException, IllegalAccessException {
ANNTest ANNTest = new ANNTest();
String[][] AnnMatrix = ANNTest.getANNMatrix();
for(int j = 0; j < AnnMatrix.length; j++) {
double sum = 0;
for(int i = 7; i < AnnMatrix[0].length; i++) {
sum += Double.valueOf(AnnMatrix[j][i]);
}
if(sum >= 0.6) {
System.out.println(AnnMatrix[j][0]+AnnMatrix[j][1] + AnnMatrix[j][2] + AnnMatrix[j][3] + "ANN:" + sum);
}
}
}
public String[][] getANNMatrix() throws IOException, InstantiationException, IllegalAccessException{
SensingTest sensingTest = new SensingTest();
//SUM OF ANN MAP CULUMN KERNEL
String[][] preAnnMatrix = sensingTest.getMatrix();
String[][] AnnMatrix = new DETA_ANN_HMM().summingProcessor(preAnnMatrix);
return AnnMatrix;
}
public String[][] getANNMatrix(String string, Analyzer analyzer) throws IOException, InstantiationException, IllegalAccessException {
SensingTest sensingTest = new SensingTest();
//SUM OF ANN MAP CULUMN KERNEL
String[][] preAnnMatrix = sensingTest.getMatrix(string, analyzer);
String[][] AnnMatrix = new DETA_ANN_HMM().summingProcessor(preAnnMatrix);
return AnnMatrix;
}
}