7
$\begingroup$

I'm trying to define a metric between job titles in IT field. For this I need some metric between words of job titles that are not appearing together in the same job title, e.g. metric between the words

senior, primary, lead, head, vp, director, stuff, principal, chief,

or the words

analyst, expert, modeler, researcher, scientist, developer, engineer, architect.

How can I get all such possible words with their distance ?

$\endgroup$
  • $\begingroup$ I think you will need some extra information to learn this. For example, do you have salary info, industry, and number of direct reports? This defines when two roles should be considered similar. Then you can ask what terms seem to be synonymous among similar roles. But if you don't know anything about what makes things similar I'm not sure what you can do. $\endgroup$ – Sean Owen Jul 22 '14 at 9:36
4
$\begingroup$

That's an interesting problem, thanks for bring out here on stack.

I think this problem is similar to when we apply LSA(Latent Semantic Analysis) in sentiment analysis to find list of positive and negative words with polarity with respect to some predefined positive and negative words.

Good reads:

So, according to me LSA is your best approach to begin with in this situation as it learns the underlying relation between the words from the corpus and probably that's what you are looking for.

$\endgroup$
  • $\begingroup$ Related methods like LDA may also be a good bet. $\endgroup$ – Madison May Jul 22 '14 at 18:39
2
$\begingroup$

If I understand your question, you can look at the co-occurrence matrix formed using the terms following the title; e.g., senior FOO, primary BAR, etc. Then you can compute the similarity between any pair of terms, such as "senior" and "primary", using a suitable metric; e.g., the cosine similarity.

$\endgroup$
  • $\begingroup$ But the problem is that 'senior' and 'primary' don't occur in one title. How can I even compare this two words using list of job titles ? $\endgroup$ – Mher Jul 22 '14 at 8:57
  • $\begingroup$ Yes, this might help you learn that "senior" and "developer" go together, but not that "senior" and "lead" have similar semantic content. $\endgroup$ – Sean Owen Jul 22 '14 at 9:35
  • $\begingroup$ @Mher, They're not supposed to occur in the same title; the terms following them are supposed to occur in both, e.g., senior developer, or primary developer. $\endgroup$ – Emre Jul 22 '14 at 17:12
  • $\begingroup$ @SeanOwen, If the titles are semantically similar, you would expect their co-occurrence vectors to be similar too since they would be used interchangeably. $\endgroup$ – Emre Jul 22 '14 at 17:14
  • 1
    $\begingroup$ Yeah it must be about level and role. Two "head"s are similar, but that's obvious because both have the word "head". My point was that "chef" and "ballerina" aren't necessarily similar just because you see "head chef" and "head ballerina" which is how I understood the cooccurrence idea. How do you learn that "lead developer" and "senior developer" are similar but "junior developer" is not? I think some other data has to enter the picture to tell us that the first two are supposed to be similar, then we can figure out why terms explain it. $\endgroup$ – Sean Owen Jul 23 '14 at 15:40
1
$\begingroup$

Not sure if this is exactly what you're looking for, but r-base has a function called "adist" which creates a distance matrix of approximate string distances (according to the Levenshtein distance). Type '?adist' for more.

words = c("senior", "primary", "lead", "head", "vp", "director", "stuff", "principal", "chief")
adist(words)

      [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9]
 [1,]    0    6    5    5    6    5    5    7    5
 [2,]    6    0    6    6    7    7    7    6    6
 [3,]    5    6    0    1    4    7    5    8    5
 [4,]    5    6    1    0    4    7    5    8    4
 [5,]    6    7    4    4    0    8    5    8    5
 [6,]    5    7    7    7    8    0    8    8    7
 [7,]    5    7    5    5    5    8    0    9    4
 [8,]    7    6    8    8    8    8    9    0    8
 [9,]    5    6    5    4    5    7    4    8    0

Also, if R isn't an option, the Levenshtein distance algorithm is implemented in many languages here: http://en.wikibooks.org/wiki/Algorithm_Implementation/Strings/Levenshtein_distance

$\endgroup$
  • $\begingroup$ I'm aware of edit distance like Levenshtein distance, but I'm looking for something like semantic similarity. $\endgroup$ – Mher Jul 21 '14 at 16:55
  • $\begingroup$ That's significantly harder. The only way I know to do something like this is to be able to access a dictionary. Then you could look into text mining definitions of the words. Try looking into accessing 'wordnet', maybe that could help. wordnet.princeton.edu/wordnet $\endgroup$ – nfmcclure Jul 21 '14 at 17:16
  • 1
    $\begingroup$ -0 for suggesting Levenshtein distance. $\endgroup$ – Slater Victoroff Jul 21 '14 at 19:08
1
$\begingroup$

(too long for a comment)

Basically, @Emre's answer is correct: simple correlation matrix and cosine distance should work well*. There's one subtlety, though - job titles are too short to carry important context. Let me explain this.

Imagine LinkedIn profiles (which is pretty good source for data). Normally, they contain 4-10 sentences describing person's skills and qualifications. It's pretty likely that you find phrases like "lead data scientist" and "professional knowledge of Matlab and R" in a same profile, but it's very unlikely to also see "junior Java developer" in it. So we may say that "lead" and "professional" (as well as "data scientist" and "Matlab" and "R") often occur in same contexts, but they are rarely found together with "junior" and "Java".

Co-occurrence matrix shows exactly this. The more 2 words occur in same context, the more similar their vectors in the matrix will look like. And cosine distance is just a good way to measure this similarity.

But what about job titles? Normally they are much shorter and don't actually create enough context to catch similarities. Luckily, you don't need source data to be titles themselves - you need to find similarities between skills in general, not specifically in titles. So you can simply build co-occurrence matrix from (long) profiles and then use it to measure similarity of titles.

* - in fact, it's already worked for me on a similar project.

$\endgroup$

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.