public List<Map.Entry<K, Float>> nearest(K key, int size)
    {
        Vector vector = storage.get(key);
        if (vector == null)
        {
            return Collections.emptyList();
        }
        return nearest(key, vector, size);
    }
public List < Map . Entry < K , Float > > nearest ( K key , int size ) { Vector vector = storage . get ( key ) ; if ( vector == null ) { return Collections . emptyList ( ) ; } return nearest ( key , vector , size ) ; }
查询与key最相似的元素

@param key  键
@param size topN个
@return 键值对列表, 键是相似词语, 值是相似度, 按相似度降序排列