Implementation of k-nearest neighborhood methods of generating second-order word embeddings, as described in:
- D Newman-Griffis and E Fosler-Lussier, "Second-Order Word Embeddings from Nearest Neighbor Topological Features." arXiv, arXiv:1705.08488. 2017.
This library contains two components:
- Nearest neighbor calculation
- Scripts:
nn_saver.py,nearest_neighbors.py - Implemented in Tensorflow
- Uses cosine similarity to identify nearest neighbors
- Graph generation
- Script:
generate_graph.py - Generates a weighted, directed edgelist file compatible with node2vec
A few custom libraries are included as frozen copies in the dependencies folder:
drgriffis.common.log-- Logging utilities, from herepyemblib-- Library for reading/writing word embedding files (Github link)configlogger-- Library for writing runtime configuration to logfiles (Github link)