goNWD.m 1.29 KB
Newer Older
Andrew Cohen's avatar
Andrew Cohen committed
1
2

tic
Andrew Cohen's avatar
v1  
Andrew Cohen committed
3
4
5
6
% goNWD
%
%

7
8
strServer='wikipedia'

Andrew Cohen's avatar
Andrew Cohen committed
9
words1={'red','orange','yellow','green','blue','indigo'}
10
words2={'lion','tiger','bear','monkey','zebra','elephant','aardvark','lamb','fox','ape','dog'}
Andrew Cohen's avatar
Andrew Cohen committed
11
12
13
idxKey = [ones(1,length(words1)) 2*ones(1,length(words2))]
d=GetDistances([words1,words2],idxKey);
idx=getDistancesPairs([words1,words2],idxKey);
Andrew Cohen's avatar
Andrew Cohen committed
14

Andrew Cohen's avatar
Andrew Cohen committed
15
words1={'red','orange','yellow','green','blue','indigo','violet','purple','cyan','white'}
Andrew Cohen's avatar
Andrew Cohen committed
16
words2={'square','circle','rectangle','ellipse','triangle','rhombus'}
Andrew Cohen's avatar
Andrew Cohen committed
17
18
19
idxKey = [ones(1,length(words1)) 2*ones(1,length(words2))]
d=GetDistances([words1,words2],idxKey);
idx=getDistancesPairs([words1,words2],idxKey);
Andrew Cohen's avatar
Andrew Cohen committed
20

21
words1={'Barack Obama','Hillary Clinton','John Edwards','Joe Biden','Chris Dodd','Mike Gravel'}
Andrew Cohen's avatar
v1  
Andrew Cohen committed
22
words2={'John McCain','Mitt Romney','Mike Huckabee','Ron Paul','Fred Thompson','Alan Keyes'}
Andrew Cohen's avatar
Andrew Cohen committed
23
24
25
idxKey = [ones(1,length(words1)) 2*ones(1,length(words2))]
d=GetDistances([words1,words2],idxKey);
idx=getDistancesPairs([words1,words2],idxKey);
26
 
Andrew Cohen's avatar
Andrew Cohen committed
27
28
29
% 
% words1={'Labidochromis caeruleus','Sciaenochromis fryeri','Betta splendens','Carassius auratus','Melanochromis cyaneorhabdos'}
% words2={'Ecsenius bicolor','Pictichromis paccagnellae','Amphiprion ocellaris ','Paracanthurus hepatus','Chromis viridis'}
30
% [d1,d2]=GetDistances(words1,words2);
Andrew Cohen's avatar
Andrew Cohen committed
31
32
% idx=getDistancesPairs(words1,words2);
toc