Is there any available algorithm that can take a set of words and attempt to find a word that best represents the "center of mass" of all those words?

This would be easy if we can define a distance on words, which then it is just a case of finding the center of mass, which is basic stuff.

What I mean is this:

Suppose I have a set of words(or even phrases) that represent concepts. Suppose further I'm trying to find a the word that best describes the common concept represented by all of them?

e.g., The set {Red, Blue, Green, Yellow}

would probably have the center "Colors", or it would, at least be something close.

The location of "words" would have to be based on their "definitions" since the words themselves have no inherent meaning. Of course, there are multiple words for the same concept and multiple concepts for a single word, so it is not a very easy task.

The example above, all the definitions of each of those words would probably have "color" in it in some form or another.

The goal here is to be able to find the best word(s) to represent a set of concepts represented by other words.

Hopefully that is somewhat clear. I'm not expecting the solution to be "exact" or mathematical, just something that is useful.

  • 1
    The word you're looking for is probly Prototype. – jlawler Oct 10 '14 at 2:28
  • 1
    There is some interesting stuff on converting words to something like multi-dimensional vectors, on which operations can then be applied. In fact I have a related article open in one of my tabs at the moment that could serve as some kind of introduction: Deep Learning, NLP, and Representations – hippietrail Oct 10 '14 at 2:37

You might want to consider an approach based on the Least Common Subsumer, as described in this answer on Stack Overflow: https://stackoverflow.com/a/18631789/4067134. Basically, you'll look for the first (if any) shared hypernym (ancestor) in the WordNet hierarchy, or similar resource.

Thinking in terms of biological ancestry: siblings share a parent, cousins share a grandparent, an uncle and nephew share a common ancestor who is parent to one and grandparent to the other, etc.

The Stack Overflow answer linked above provides pointers to WordNet-based implementations in Perl, Python, and Java.

| improve this answer | |

Since the date when that question was asked we have seen an enormous trend in word vectors and word embeddings computed by neural networks, e.g., word2vec.

With such tools you can compute classical centres of mass for a given set of words and find the word vector that is closest to that centre of mass.

EDIT: Abstractions like "colour" typically have very different locations in the word embedding space than concrete colour adjectives like "red". For a visualisation on data from the Royal Society corpus, see here. Note that the specific form of visualisation is true to short distances but may distort long distances considerably—it is t-SNE (t-distributed stochastic neighbour embedding) not a principal component analysis (PCA).

| improve this answer | |
  • Your answer is rather solid, in a platonic sense. It's like saying: Since Pythagoras we have seen enormous developments in geometry. With such tools you can compute classical centers of mass for a given object. Try that in context of a three-body problem (circular definitions), a nebula (point cloud), an ellipsis (two centers), ... even a triangle has various definitions of center besides Mass (Area, that is). And I am not even sure if there is a well defined center of mass in dimensions higher than three. And here's en.wikipedia.org/wiki/… – vectory Apr 22 at 18:25
  • 1
    The centre of mass is well-defined for any integer number of dimiensions, and for a system of points with equal weight it is straightforward to compute.—The curse of dimensionality exists, but it manifests itself only in the time consumption when determining the nearest neighbour. It is still handable for the typical dimensionality of word vectors.—What is really new here is that we have "meaningful" word vectors right now, and we hadn't them a decade ago. – jk - Reinstate Monica Apr 22 at 20:42
  • @vectory none of that is relevant. Clearly there is some metric space on words because some words are related more than others... it really doesn't matter about anything else. It also does not depend on the dimension. if, say, one has 100k words and each one has a definition one should be able to rank the words in terms of how close they are. D(a,b) > D(a,c) if b is not as related to a as c is. Doesn't really matter if it's a perfect metric or not. Anything is better than nothing. – Gupta Apr 23 at 5:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.