1

For instance- given the words, c(cat, dog, grapes, oranges), I would like to produce a scatterplot with cat and dog clustered together and grapes and oranges clustered together. Is this possible?

Despite numerous searches, I could not find results related to semantic clustering.

Example:

enter image description here

jpsmith
  • 11,023
  • 5
  • 15
  • 36
zebra111
  • 11
  • 3
  • 2
    `word2vec` can be used to compare similarity in meaning. So can the `BERT` model. `UMAP` can do multidimensional visualization clustering. – M.Viking Jan 17 '23 at 01:47
  • 1
    Welcome to StackOverflow. Please provide a minimal, reproducible example in order for people to help you. https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example – John Polo Jan 17 '23 at 02:00
  • It's difficult to understand what you want your figure to look like without more details or a close example of what you would like. What is the x axis? what is the y axis? Or do you mean a more general [word cloud](https://towardsdatascience.com/create-a-word-cloud-with-r-bde3e7422e8a)? – jpsmith Jan 17 '23 at 02:10
  • @jpsmith I want a more general word cloud but words similar in meaning are clustered together. – zebra111 Jan 17 '23 at 02:29
  • If you have a small corpus, you will need to rely on pre-trained word embeddings, eg from the `textdata` package. https://smltar.com/embeddings.html#glove – Jon Spring Jan 17 '23 at 04:26
  • Please provide enough code so others can better understand or reproduce the problem. – Community Jan 17 '23 at 07:03

0 Answers0