Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 1.15 KB

README.md

File metadata and controls

23 lines (16 loc) · 1.15 KB

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)