this file correspond to the generalized hamming distance
it can be used as a metric for text segmentation
it can be used the same way as the windowdiff metric, and has the same role

this implementation is a python translation of V. Kulyukin C++ code
(co-author of the paper on generalized hamming distance)
the examples in the demo function are the same that were used in
Kulyukin implementation, and allowed to compare the good behavior
of this metric to Kulyukin implementation, considered as a reference
same tests in demo, but output now more human-friendly
minor coding style changes
Beeferman's pk measure
taking some remarqs into account
comment "[0] inserted at beginning of bit vector seems unnecessary and confusing"
fixed
code more compact
factorisation
factorisation and getting rid of CamelCase variable names
more explict var names + code simplifications
more comments
jnothman remarks
creating a segmentation module for evaluating text sgementation tasks
windowdiff should be put inside later
module imports
no more uppercase in pk function name
external tests done for GHD
useless comment removed
tests for Beeferman's Pk
Apparently, _setparent is called in .parse() – dropping it from AbstractParentedTree. (fixes #229 in NLTK)
taking Morten M. Neergaard remarks into account.
removal of float_equal statements
xim remarks on willcards imports
more comments
variable names more explicit
more appropriate comments and variable names