/** * Returns a term in the VSM */ public Vector mapTerm(String term) throws TermNotFoundException { int i = termIndex.get(term); if (i == -1) { throw new TermNotFoundException(term); } return new DenseVector(Uk[i]); } // end mapTerm
/** * Returns a term in the VSM */ public FloatVector mapTerm(String term) throws TermNotFoundException { int i = termIndex.get(term); if (i == -1) { throw new TermNotFoundException(term); } FloatVector nodes = new FloatVector(Uk[i]); return nodes; } // end mapTerm
/** * Returns a term in the VSM */ public DoubleVector mapTerm(String term) throws TermNotFoundException { int i = termIndex.get(term); if (i == -1) { throw new TermNotFoundException(term); } DoubleVector nodes = new DoubleVector(Uk[i]); return nodes; } // end mapTerm
/** * Returns a term in the VSM */ public Node[] mapTerm(String term) throws TermNotFoundException { int i = termIndex.get(term); if (i == -1) { throw new TermNotFoundException(term); } Node[] nodes = new Node[Uk[i].length]; for (int j = 0; j < Uk[i].length; j++) { nodes[j] = new Node(j, Uk[i][j]); } return nodes; } // end mapTerm