Skip to content

drgriffis/knn-embedding

Repository files navigation

k-Nearest Neighbor second-order word embeddings

Implementation of k-nearest neighborhood methods of generating second-order word embeddings, as described in:

This library contains two components:

  1. Nearest neighbor calculation
  • Scripts: nn_saver.py, nearest_neighbors.py
  • Implemented in Tensorflow
  • Uses cosine similarity to identify nearest neighbors
  1. Graph generation
  • Script: generate_graph.py
  • Generates a weighted, directed edgelist file compatible with node2vec

Dependencies

A few custom libraries are included as frozen copies in the dependencies folder:

  • drgriffis.common.log -- Logging utilities, from here
  • pyemblib -- Library for reading/writing word embedding files (Github link)
  • configlogger -- Library for writing runtime configuration to logfiles (Github link)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published