space2vec
space2vec copied to clipboard
Enable newer Python versions and use of own test data
Hi, thanks for providing this nice codebase! I am using it for an own project, and I did some modifications to the code in order to run it with later Python versions, and in order to use my own data. Maybe you want to consider merging my new version into your repository :) Here's a summary of the changes
- Change
Set
toset
,cPickle
topickle
, andxrange
torange
to enable Python 3 (I'm using 3.9.5) - Add test data in geojson format to simplify the use of own data (compared to the pickled tuple-objects that are used here, geojson is much easier to use and more standard)
- Add a test script to use a trained model to get the embedding for new data. To enable this test script, I needed to make some changes to the
Trainer
class and to themodel.py
file. Maybe I overlooked some other option to do this; please let me know if that changes are redundant. - Explaination of the own-data usage in README