Package nltk :: Package cluster :: Module util
[hide private]
[frames] | no frames]

Module util

source code

Classes [hide private]
  VectorSpace
Abstract clusterer which takes tokens and maps them into a vector space.
  _DendogramNode
Tree node of a dendogram.
  Dendogram
Represents a dendogram, a tree with a specified branching order.
Functions [hide private]
 
euclidean_distance(u, v)
Returns the euclidean distance between vectors u and v.
source code
 
cosine_distance(u, v)
Returns the cosine of the angle between vectors v and u.
source code
Function Details [hide private]

euclidean_distance(u, v)

source code 

Returns the euclidean distance between vectors u and v. This is equivalent to the length of the vector (u - v).

cosine_distance(u, v)

source code 

Returns the cosine of the angle between vectors v and u. This is equal to u.v / |u||v|.