Changeset 36859 for gs3-extensions/mars-src/trunk/src/java/org/greenstone/gsdl3/service/GS2WekaDBSearch.java
- Timestamp:
- 2022-10-22T15:41:14+13:00 (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/mars-src/trunk/src/java/org/greenstone/gsdl3/service/GS2WekaDBSearch.java
r36857 r36859 51 51 protected static final String RADIUS_PARAM = "radius"; 52 52 protected static final String MAXDOCS_PARAM = "maxDocs"; 53 protected static final String AROUSAL_PARAM = "arousal"; 54 protected static final String VALENCE_PARAM = "valence"; 53 55 54 56 //protected static final String WEKA_MODEL_DEFAULT_DIRECTORY = "weka-model"; … … 115 117 setStandardQueryParams (params); // **** 116 118 117 this.wekadb_src.runQuery 118 Vector docs = this.wekadb_src.getQueryResult 119 this.wekadb_src.runQuery(weka_db_index_dir, KNN_FEATURES_FILENAME, assoc_index_dir, query); 120 Vector docs = this.wekadb_src.getQueryResult(); 119 121 120 122 if (docs.isEmpty()) { … … 145 147 result.appendChild (document_list); 146 148 for (int d = 0; d < docs.size (); d++) { 147 WekaDBDocInfo adb_doc = (WekaDBDocInfo) docs.elementAt(d);148 149 String doc_id = adb_doc.getDocID();150 double rank = adb_doc.getTopRank();151 String offsets = adb_doc.getOffsetList();149 WekaDBDocInfo wdb_doc = (WekaDBDocInfo) docs.elementAt(d); 150 151 String doc_id = wdb_doc.getDocID(); 152 double rank = wdb_doc.getTopRank(); 153 String offsets = wdb_doc.getOffsetList(); 152 154 153 155 Element doc_node = createDocNode (result_doc, doc_id, Double.toString (rank)); … … 191 193 int docs = Integer.parseInt(value); 192 194 this.wekadb_src.setMaxDocs(docs); 195 } 196 else if (name.equals(AROUSAL_PARAM)) { 197 double arousal = Double.parseDouble(value); 198 this.wekadb_src.setArousal(arousal); 199 } 200 else if (name.equals(VALENCE_PARAM)) { 201 double valence = Double.parseDouble(value); 202 this.wekadb_src.setValence(valence); 193 203 } // ignore any others 194 204 }
Note:
See TracChangeset
for help on using the changeset viewer.