Skip to content

Commit

Permalink
FIX: Set missing formants to 0 for refining algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe committed Oct 17, 2017
1 parent ee6fd3b commit 45a0c9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion polyglotdb/acoustics/formants/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def parse_multiple_formant_output(output):
to_return = {}
for item in listing_list:
output = parse_point_script_output(item)
print(output)

to_return[track_nformants(output)] = output
return to_return
Expand Down
3 changes: 2 additions & 1 deletion polyglotdb/acoustics/formants/refined.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def analyze_formant_points_refinement(corpus_context, vowel_inventory, duration_
best_distance = math.inf
best_track = 0
for number, point in data.items():
point = [point[x] for x in columns]
point = [point[x] if point[x] else 0 for x in columns]

distance = get_mahalanobis(prototype_means, point, inverse_covariance)
if distance < best_distance: # Update "best" measures when new best distance is found
best_distance = distance
Expand Down

0 comments on commit 45a0c9b

Please sign in to comment.