Skip to main content
. Author manuscript; available in PMC: 2014 Dec 1.
Published in final edited form as: J Biomed Inform. 2013 Sep 4;46(6):10.1016/j.jbi.2013.08.008. doi: 10.1016/j.jbi.2013.08.008

SenseRelate algorithm
1: procedure SenseRelate(concepts, window, distance)
2: score ← 0
3: annotationnull
4: for each concept in concepts do
5:   sum ← −1
6:   numberterms ← 0
7:   for i = 0 → window.length do
8:    termwindow[i]
9:    cuisgetUMLSConcepts(term)
10:    maxscore ← −1
11:    for each cui in cuis do
12:     similaritygetRelatedness(cui, concept)
13:     if similarity > maxscore then
14:      maxscoresimilarity
15:     end if
16:    end for
17:    if maxscore > −1 then
18:      sumsum+(maxscore1distance[i])
19:     numbertermsnumberterms + 1
20:    end if
21:   end for
22:    sumsumnumberterms
23:   if sum > score then
24:    scoresum
25:    annotationconcept
26:   end if
27: end for
28: return annotation

29: end procedure