Git Product home page Git Product logo

Comments (3)

dselivanov avatar dselivanov commented on June 2, 2024

Thanks for reporting - i will try to update vignette. I the meantime see example at ?rsparse::GloVe

from text2vec.

nikhil-bery avatar nikhil-bery commented on June 2, 2024

Hi facing similar issues.

> library(text2vec)
> 
> # read in training corpus data
> jobs = read.csv("jobposts/data job posts.csv")
> 
> # pre-processing
> tokens = word_tokenizer(tolower(jobs$Title))
> v = create_vocabulary(itoken(tokens))
> v = prune_vocabulary(v, term_count_min = 5, doc_proportion_max = 0.5)
> it = itoken(tokens)
> vectorizer = vocab_vectorizer(v)
> 
> # creat a document term matrix and term co-occurance matrix
> dtm = create_dtm(it, vectorizer)
> tcm = create_tcm(it, vectorizer, skip_grams_window = 5)
> 
> # create a model & train out word vectors
> glove = GlobalVectors$new(word_vectors_size = 50, vocabulary = v, x_max = 10)
Error in .subset2(public_bind_env, "initialize")(...) : 
  unused arguments (word_vectors_size = 50, vocabulary = v)
> wv = glove$fit_transform(tcm, n_iter = 10)
Error: object 'glove' not found
> # get average of main and context vectors as proposed in GloVe paper
> wv = wv + t(glove$components)
Error: object 'wv' not found
> # create a relaxed word movers distance model (based on cosign, rather than euclidian distance)
> rwmd_model = RWMD$new(wv)
Error in stopifnot(is.matrix(embeddings)) : 
  argument "embeddings" is missing, with no default

Has this been resolved yet?

from text2vec.

dselivanov avatar dselivanov commented on June 2, 2024

@brshallo @nikhil-bery fixed now - see article here http://text2vec.org/glove.html

from text2vec.

Related Issues (20)

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.