Coder Social home page Coder Social logo

tmteam / word2vec.tools Goto Github PK

View Code? Open in Web Editor NEW
37.0 37.0 12.0 32 KB

.Net Implementation for google word2vec tools.

License: MIT License

C# 100.00%
dotnet machine-learning machine-learning-algorithms natural-language natural-language-processing neural-network neural-networks nlp word2vec

word2vec.tools's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

word2vec.tools's Issues

DistanceTo should be called SimilarityTo

Hi,

I tried substituting the vector operations in Word2vec.Tools with those in MathNet.Numerics, and got some weird results. It seems the "distances" used by Word2vec.Tools should be called "similarities".

Cosine similarity:

similarity = 1 โˆ’ distance

for similarities: 1 = similar, 0 = not similar

for distances: 0 = close, 1 = distant

Hope that makes sense.

For reference:

Addition of multiple words not working

I am trying to add multiple representation of words by looping through each token at a time but the value of representation is not changing.
`

public void GetSimilarWordsMultipleTokensQuery(List targetWords, string trained_vector_file_path, int similar_word_count)
{
var vocabulary = new Word2vec.Tools.Word2VecBinaryReader().Read(trained_vector_file_path);
var additionVocab = vocabulary[targetWords[0]];

        for (int i = 1; i < targetWords.Count; i++)
        {
            additionVocab.Add(vocabulary[targetWords[i]]);
        }

        var closestAddition = vocabulary.Distance(additionVocab, similar_word_count);
        Console.WriteLine("Top " + similar_word_count + " that are closest to word " + "target words" + " are:-");

        foreach (var neighbourWord in closestAddition)
        {
            Console.WriteLine(neighbourWord.Representation.WordOrNull +"\t\t"+neighbourWord.DistanceValue);
        }
    }`

The Add function is not adding the representation once it's assigned.
Can you please resolve this issue. Thanks.

about input data format

hi

i have tried some input data formats for trying get word vectors, but i can not confirm the data i using was correct.
Please helping me to know what data format i should use.
thank a lot!

the data format i use as following:
9 20
we need to test for text word2vec
word2vec is great
we need to test for text word2vec

Load word2Vector model trained from gensim

Hello,

Thanks for sharing the great tool to enable using word2vector from c#. I have a word2vector model in binary trained by Gensim in Python. Can this tool load the model?

Thanks,
Juhua

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.