Skip to content

Commit

Permalink
mild spellchecking
Browse files Browse the repository at this point in the history
  • Loading branch information
bmcfee committed Mar 20, 2024
1 parent b630f20 commit b94d24e
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .codespell_ignore_list
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nce
FPR
Shepard
dum
Theis
2 changes: 1 addition & 1 deletion .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Spell check package
shell: bash -l {0}
run: codespell --ignore-words-list="nce,FPR,Shepard,dum" mir_eval
run: codespell --ignore-words .codespell_ignore_list mir_eval

- name: Security check
shell: bash -l {0}
Expand Down
6 changes: 3 additions & 3 deletions mir_eval/chord.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
entire quality in closed voicing, i.e. spanning only a single octave;
extended chords (9's, 11's and 13's) are rolled into a single octave with any
upper voices included as extensions. For example, ('A:7', 'A:9') are
equivlent but ('A:7', 'A:maj7') are not.
equivalent but ('A:7', 'A:maj7') are not.
* :func:`mir_eval.chord.tetrads_inv`: Same as above, with inversions (bass
relationships).
Expand Down Expand Up @@ -557,7 +557,7 @@ def encode_many(chord_labels, reduce_extended_chords=False):


def rotate_bitmap_to_root(bitmap, chord_root):
"""Circularly shift a relative bitmap to its asbolute pitch classes.
"""Circularly shift a relative bitmap to its absolute pitch classes.
For clarity, the best explanation is an example. Given 'G:Maj', the root
and quality map are as follows::
Expand Down Expand Up @@ -592,7 +592,7 @@ def rotate_bitmap_to_root(bitmap, chord_root):


def rotate_bitmaps_to_roots(bitmaps, roots):
"""Circularly shift a relative bitmaps to asbolute pitch classes.
"""Circularly shift a relative bitmaps to absolute pitch classes.
See :func:`rotate_bitmap_to_root` for more information.
Expand Down
2 changes: 1 addition & 1 deletion mir_eval/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def load_time_series(filename, delimiter=r'\s+', comment='#'):


def load_patterns(filename):
"""Loads the patters contained in the filename and puts them into a list
"""Loads the patterns contained in the filename and puts them into a list
of patterns, each pattern being a list of occurrence, and each
occurrence being a list of (onset, midi) pairs.
Expand Down
2 changes: 1 addition & 1 deletion mir_eval/multipitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ def metrics(ref_time, ref_freqs, est_time, est_freqs, **kwargs):
ref_freqs_chroma = midi_to_chroma(ref_freqs_midi)
est_freqs_chroma = midi_to_chroma(est_freqs_midi)

# count number of occurences
# count number of occurrences
n_ref = compute_num_freqs(ref_freqs_midi)
n_est = compute_num_freqs(est_freqs_midi)

Expand Down
4 changes: 2 additions & 2 deletions mir_eval/onset.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
-------
* :func:`mir_eval.onset.f_measure`: Precision, Recall, and F-measure scores
based on the number of esimated onsets which are sufficiently close to
based on the number of estimated onsets which are sufficiently close to
reference onsets.
'''

Expand Down Expand Up @@ -55,7 +55,7 @@ def validate(reference_onsets, estimated_onsets):

def f_measure(reference_onsets, estimated_onsets, window=.05):
"""Compute the F-measure of correct vs incorrectly predicted onsets.
"Corectness" is determined over a small window.
"Correctness" is determined over a small window.
Examples
--------
Expand Down
6 changes: 3 additions & 3 deletions mir_eval/pattern.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
The input format can be automatically generated by calling
:func:`mir_eval.io.load_patterns`. This format is a list of a list of
tuples. The first list collections patterns, each of which is a list of
occurences, and each occurrence is a list of MIDI onset tuples of
occurrences, and each occurrence is a list of MIDI onset tuples of
``(onset_time, mid_note)``
A pattern is a list of occurrences. The first occurrence must be the prototype
Expand Down Expand Up @@ -176,7 +176,7 @@ def standard_FPR(reference_patterns, estimated_patterns, tol=1e-5):
This metric checks if the prototype patterns of the reference match
possible translated patterns in the prototype patterns of the estimations.
Since the sizes of these prototypes must be equal, this metric is quite
restictive and it tends to be 0 in most of 2013 MIREX results.
restrictive and it tends to be 0 in most of 2013 MIREX results.
Examples
--------
Expand Down Expand Up @@ -467,7 +467,7 @@ def compute_second_layer_PR(ref_pattern, est_pattern):

def compute_layer(ref_elements, est_elements, layer=1):
"""Computes the F-measure matrix for a given layer. The reference and
estimated elements can be either patters or occurrences, depending
estimated elements can be either patterns or occurrences, depending
on the layer.
For layer 1, the elements must be occurrences.
Expand Down
4 changes: 2 additions & 2 deletions mir_eval/separation.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ def bss_eval_images(reference_sources, estimated_sources,
isr = np.empty(nsrc)
sir = np.empty(nsrc)
sar = np.empty(nsrc)
Gj = [0] * nsrc # prepare G matrics with zeroes
Gj = [0] * nsrc # prepare G matrices with zeroes
G = np.zeros(1)
for j in range(nsrc):
# save G matrix to avoid recomputing it every call
Expand Down Expand Up @@ -638,7 +638,7 @@ def _bss_decomp_mtifilt_images(reference_sources, estimated_source, j, flen,
Improved performance can be gained by passing Gj and G parameters initially
as all zeros. These parameters store the results from the computation of
the G matrix in _project_images and then return them for subsequent calls
to this function. This only works when not computing permuations.
to this function. This only works when not computing permutations.
"""
nsampl = np.shape(estimated_source)[0]
nchan = np.shape(estimated_source)[1]
Expand Down
2 changes: 1 addition & 1 deletion mir_eval/sonify.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ def pitch_contour(times, frequencies, fs, amplitudes=None, function=np.sin,
desired sampling rate of the output signal
amplitudes : np.ndarray
amplitude measurments, nonnegative
amplitude measurements, nonnegative
defaults to ``np.ones((length,))``
function : function
Expand Down

0 comments on commit b94d24e

Please sign in to comment.