eabdullin / Word2Vec.Net

implementation Word2Vec for .Net framework
Other
126 stars 41 forks source link

Can you please explain more thoroughly how to use? #1

Open johnearnshaw opened 8 years ago

johnearnshaw commented 8 years ago

I'm trying the ConsoleApp project and args -train questions-words.txt -output output.txt

I get a FileNotFoundException filename "output"

at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost) at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share) at System.IO.File.Open(String path, FileMode mode, FileAccess access) at Word2Vec.Net.Distance.InitVocub() in Word2Vec.Net-master\Word2Vec.Net\Distance.cs:line 115

I remove the .txt from output and re-run and get an OverflowException

Arithmetic operation resulted in an overflow.

at Word2Vec.Net.Distance.InitVocub() in Word2Vec.Net-master\Word2Vec.Net\Distance.cs:line 124

eabdullin commented 8 years ago

Hi, John! There is old version of Word2Vec implementation. I'll push the update very soon. i think, in a few days. Generally you must set input and output filenames. Word2VecBuilder.Create() .WithTrainFile("trainingFile.txt") .WithOutputFile("outputFile.txt") .Build();

johnearnshaw commented 8 years ago

awesome :) Is the project still pure C#? I noticed some c and compiled libraries in the dev branch

kvasnyj commented 8 years ago

Johnearnshaw, The exception with following code: var distance = new Distance("output");

You must specify a path to the output file instead of "output" arg.

syedmohsinbukhari commented 8 years ago

Hi, this is an awesome project. Can you please add function that helps us extract the vector of a word directly? or is there already a function in there that I am missing?

Thanks for this Word2Vec implementation in C#

eabdullin commented 8 years ago

@syedmohsinbukhari, to be honest i don't understand. Can you explain what do you mean?