/** Returns the number of unique terms in this document. */ public int getNumberOfPointers() { return occurrences.size(); } /** Insert a term into the posting list of this document
/** * Returns the numbe of nodes in the tree. * @return int the number of nodes in the tree. */ public int getNumberOfNodes() { return tfs.size(); } /**
/** * Returns the number of entries in the map. * @return the map's size. */ public int size() { return this._map.size(); }
public int size() { return _map.size(); } public boolean isEmpty() {
/** {@inheritDoc} */ @Override public String[] getReverseKeys() { return key2forwardOffset.keys(new String[key2forwardOffset.size()]); }
@Override public void sort() { if (metaMap.size() > 0) throw new UnsupportedOperationException("sorting with metadata doesnt work"); super.sort(); } @Override
@Override public void sort() { if (metaMap.size() > 0) throw new UnsupportedOperationException("sorting with metadata doesnt work"); super.sort(); } @Override
@Override public void sort(int topDocs) { if (metaMap.size() > 0) throw new UnsupportedOperationException("sorting with metadata doesnt work"); super.sort(topDocs); }
/** {@inheritDoc} */ @Override public String[] getReverseKeys() { return key2forwardOffset.keys(new String[key2forwardOffset.size()]); }
@Override public void sort(int topDocs) { if (metaMap.size() > 0) throw new UnsupportedOperationException("sorting with metadata doesnt work"); super.sort(topDocs); }
public int addFeature(String featureName) { if (_featuresDB._featuresMap.containsKey(featureName)) throw new RuntimeException("Duplicate feature: " + featureName); int feature = _featuresDB._featuresMap.size(); _featuresDB._featuresMap.put(featureName, feature); _featuresDB._featuresRMap.add(featureName); return feature; }
public void dumpNumeric () { for (int i = 0; i < var2idx.size (); i++) { Variable var = (Variable) vars.get (i); int outcome = get (var); System.out.println (var + " " + outcome); } }
public void dumpNumeric () { for (int i = 0; i < var2idx.size (); i++) { Variable var = (Variable) vars.get (i); int outcome = get (var); System.out.println (var + " " + outcome); } }
public void dumpNumeric () { for (int i = 0; i < var2idx.size (); i++) { Variable var = (Variable) vars.get (i); int outcome = get (var); System.out.println (var + " " + outcome); } }
/** {@inheritDoc} */ @Override public String[] getMetaKeys() { String[] rtr = metaMap.keys(new String[metaMap.size()]); Arrays.sort(rtr, (String o1, String o2) -> metaMap.get(o1) - metaMap.get(o2)); return rtr; }
public static int indexString(String string, TObjectIntHashMap<String> map, ArrayList<String> list) { if (map.contains(string)) { return map.get(string); } else { int size = map.size(); map.put(string, size); list.add(string); return size; } } }
/** {@inheritDoc} */ @Override public String[] getMetaKeys() { String[] rtr = metaMap.keys(new String[metaMap.size()]); Arrays.sort(rtr, (String o1, String o2) -> metaMap.get(o1) - metaMap.get(o2)); return rtr; }
/** * {@inheritDoc} */ public DocumentIndexEntry getDocumentStatistics() { FieldDocumentIndexEntry fdie = new FieldDocumentIndexEntry(this.fieldCount); fdie.setDocumentLength(documentLength); fdie.setNumberOfEntries(occurrences.size()); fdie.setFieldLengths(fieldLengths); return fdie; }
/** FIXME */ protected TermPipeline getEndOfPipeline() { if (fieldNames.size()>0) { return new FieldTermProcessor(); } else { return new BasicTermProcessor(); } }