title: euclidean distance matrix
body: <p>I'd like to calculate Euclidean distance between two words. First of all, each phoneme was vectorised:</p>
  
  <pre><code>g = (0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0)
  a = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,1,0,0,0)
  k = (0,1,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0)
  n = (0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0)
  N = (0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
  </code></pre>
  
  <p>So distance between two words, 'gaN' and 'gak', for example, is</p>
  
  <pre><code>dst1 = distance.euclidean(g,g)
  dst2 = distance.euclidean(a,a)
  dst3 = distance.euclidean(N,k)
  dist = dst1+dst2+dst3
  print(dist)
  </code></pre>
  
  <p>What I'd like to make is a huge matrix that shows all distances between over 800 words. That should look like the table below (as in csv file)</p>
  
  <pre class="lang-none prettyprint-override"><code>    gaN   gak   gan  gal ...
  gaN 0     1.73  1.41
  gak 1.73  0     2.24
  gan 1.41  2.24  0
  gal
  ...
  </code></pre>
  
  <p>Could anyone help me with this? I'm currently using Python but R would be fine, too.</p>