Coder Social home page Coder Social logo

xinyandai / string-embed Goto Github PK

View Code? Open in Web Editor NEW
59.0 5.0 19.0 433 KB

string embed for fast edit distance computation, codes for [Convolutional Embedding for Edit Distance (SIGIR 20)].

License: MIT License

Python 54.20% Jupyter Notebook 28.40% CMake 0.30% C++ 17.00% Shell 0.10%

string-embed's Issues

Extract embeddings/predict for new data after trained the model?

Hi,

Thanks for the great work and the ingenious paper!

I trained a model based on the line that is given on the project's page, specifically:

python main.py --dataset word --nt 1000 --nq 1000 --epochs 20 --save-split --recall --save-model
Now I have the trained model (I know it is not the version that is presented in the paper), and a list of two words, how can I use the model in order to predict their edit distance?
I got lost going through the preprocessing stage.

Thanks again, and sorry for the noob question :)

Duplicate self.Ls. Merge error?

Hi, thanks for sharing the code from the paper! I think I found a bug, looks like a git merge issue:

string-embed/networks.py

Lines 412 to 425 in 8a8a2ea

self.Ls = {
step * 0: (0, 10),
step * 1: (10, 10),
step * 2: (10, 1),
step * 3: (5, 0.1),
step * 4: (1, 0.01),
}
self.Ls = {
step * 0: (15, 0),
step * 1: (10, 0),
step * 2: (8, 0),
step * 3: (5, 0.0),
step * 4: (1, 0.0),
}

Should be only one of the self.Ls, right?
And it seems the current master version is not using the mse_loss, since it's all zero.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.