code: public List<Map.Entry<K, Float>> nearest(Vector vector, int size)
      {
          MaxHeap<Map.Entry<K, Float>> maxHeap = new MaxHeap<Map.Entry<K, Float>>(size, new Comparator<Map.Entry<K, Float>>()
          {
              @Override
              public int compare(Map.Entry<K, Float> o1, Map.Entry<K, Float> o2)
              {
                  return o1.getValue().compareTo(o2.getValue());
              }
          });
  
          for (Map.Entry<K, Vector> entry : storage.entrySet())
          {
              maxHeap.add(new AbstractMap.SimpleEntry<K, Float>(entry.getKey(), entry.getValue().cosineForUnitVector(vector)));
          }
          return maxHeap.toList();
      }
docs: 获取与向量最相似的词语
  
  @param vector 向量
  @param size   topN个
  @return 键值对列表, 键是相似词语, 值是相似度, 按相似度降序排列