Giter Club home page Giter Club logo

josemanuelgp / word2vec_vector-translation-java Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 1.0 231 KB

Inspired in Mikolov's et al paper "Exploiting Similarities among Languages for Machine Translation", implements an algorithm for translation vectors between two spaces corresponding to two different languages. The code is in java and uses deeplearning4j. I decided to write this implementation since all other related implementations were written in Python and I needed it in Java. Hopefully it will be useful for other people in a similar situation.

License: Apache License 2.0

Java 100.00%

word2vec_vector-translation-java's People

Contributors

josemanuelgp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

word2vec_vector-translation-java's Issues

About translation matrix creation

Dear josemanuelgp

I found your code really useful. However I have a question about the part where you calculate the translation matrix:

Instead of doing WX=Z -> W=transpose(pinv(X)Z)

DoubleMatrix pinverse_matrix = Solve.pinv(matrix_train_source);
DoubleMatrix translationMatrix = pinverse_matrix.mmul(matrix_train_target).transpose();

Why not directly do this: WX=Z -> W=Z pinv(X)

DoubleMatrix pinverse_matrix = Solve.pinv(matrix_train_source);
DoubleMatrix translationMatrix = matrix_train_target.mmul(pinverse_matrix);

I'm sure that I'm missing something, for that reason I ask you.

Cheers

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.