DavidDoukhan/nltk — comment on commit 70995823200d9c73798853afa0b42eeb84d020a8
File: nltk/metrics/ghd.py line 94
By jnothman:

Since you do not use any of the closure properties of nested function definitions, would it not be better to have these functions (_fill_bit_pos_vector, _compute_ghd_aux and _init_tableau) defined externally (and not redefined each time GHD is run)?

It would also make the main function line easier to read, as it would begin with the first operation.