Skip to content

Commit

Permalink
fix: typo
Browse files Browse the repository at this point in the history
  • Loading branch information
severinsimmler committed Sep 1, 2018
1 parent 66b7c27 commit 102746f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cophi/complexity.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def michea_m(num_types, freq_spectrum):
return num_types / freq_spectrum[2]


def honore_h(num_tokens, num_types, freq_spectrum):
def honore_h(num_types, num_tokens, freq_spectrum):
"""Calculate Honoré’s H (1979).
Used formula:
Expand Down Expand Up @@ -255,7 +255,7 @@ def herdan_vm(num_types, num_tokens, freq_spectrum):
num_tokens (int): Absolute number of tokens.
freq_spectrum (dict): Counted occurring frequencies.
"""
a = freq_spectrum.index / num_tokens
a = freq_spectrum.index.values / num_tokens
b = 1 / num_types
return math.sqrt((freq_spectrum * a ** 2).sum() - b)

Expand Down

0 comments on commit 102746f

Please sign in to comment.