From 2a42d9e1a8be85cdf4526eb8817ce69683a5642e Mon Sep 17 00:00:00 2001 From: Ge Wang Date: Thu, 11 Jan 2024 09:48:28 -0800 Subject: [PATCH] fix word2vec prompt example --- examples/ai/word2vec/word2vec-prompt.ck | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/examples/ai/word2vec/word2vec-prompt.ck b/examples/ai/word2vec/word2vec-prompt.ck index 1cea1f764..5f04ea959 100644 --- a/examples/ai/word2vec/word2vec-prompt.ck +++ b/examples/ai/word2vec/word2vec-prompt.ck @@ -28,8 +28,8 @@ string line[0]; Word2Vec model; // loading any default here -"glove-wiki-gigaword-50-tsne-2.txt" => string filepath; -<<< "loading 2D model:", filepath, "..." >>>; +"glove-wiki-gigaword-50.txt" => string filepath; +<<< "loading model:", filepath, "..." >>>; // load model if( !model.load( me.dir() + filepath ) ) { @@ -106,9 +106,9 @@ fun int execute( string line[] ) else if( command == "help" || command == "h" ) { <<< " available word2vec2chuck commands:", "" >>>; - <<< " load / l-- load a pre-trained model", "" >>>; + <<< " load / l -- load a pre-trained model", "" >>>; <<< " eval / e -- evaluate a word vector expression", "" >>>; - <<< " analog / a-- query a logical analogy", "" >>>; + <<< " analog / a -- query a logical analogy", "" >>>; <<< " vector / v -- display vector associated with a word", "" >>>; <<< " go / g -- from a word to another across a duration", "" >>>; <<< " similar / s -- from a vector (model size) return similar words", "" >>>; @@ -127,7 +127,10 @@ fun int execute( string line[] ) } else { - <<< "loading model (this could take a few seconds)...", "" >>>; + // get filepath to load + line[1] => filepath; + <<< "loading model:", filepath >>>; + <<< "(this could take a few seconds)...", "" >>>; // load if( !model.load( me.dir() + filepath ) ) {