diff --git a/meeteval/wer/__main__.py b/meeteval/wer/__main__.py index 05ed4cd6..5a1858a8 100644 --- a/meeteval/wer/__main__.py +++ b/meeteval/wer/__main__.py @@ -189,7 +189,6 @@ def greedy_orcwer( regex=None, reference_sort='segment_if_available', hypothesis_sort='segment_if_available', - assignment_initialization='cp', uem=None, partial=False, normalizer=None, @@ -203,7 +202,6 @@ def greedy_orcwer( uem=uem, partial=partial, normalizer=normalizer, - assignment_initialization=assignment_initialization, ) _save_results(results, hypothesis, per_reco_out, average_out) @@ -551,17 +549,6 @@ def add_argument(self, command_parser, name, p): '- lower,rm(.?!,): Lowercase the transcript and remove punctuations (.,?!).', choices=[None, 'lower,rm(.?!,)'], ) - elif name == 'assignment_initialization': - command_parser.add_argument( - '--assignment-initialization', - choices=['cp', 'random', 'constant'], - help='Specifies how the greedy search should be initialized.\n' - 'Choices:\n' - '- cp: Use the assignment from the cpWER. Ensures fast convergence when the speaker labels ' - 'are already somewhat correct. Requires speaker/stream labels in both, reference and hypothesis.\n' - '- random: Initializes the assignment randomly. This is not deterministic.\n' - '- constant: Initializes the label for all segments to 0.' - ) elif name == 'partial': command_parser.add_argument( '--partial', diff --git a/meeteval/wer/api.py b/meeteval/wer/api.py index c21377e1..5a4bca5c 100644 --- a/meeteval/wer/api.py +++ b/meeteval/wer/api.py @@ -127,7 +127,6 @@ def greedy_orcwer( regex=None, reference_sort='segment_if_available', hypothesis_sort='segment_if_available', - assignment_initialization='cp', uem=None, partial=False, normalizer=None, @@ -142,7 +141,6 @@ def greedy_orcwer( reference, hypothesis, partial=partial, reference_sort=reference_sort, hypothesis_sort=hypothesis_sort, - assignment_initialization=assignment_initialization, ) return results diff --git a/meeteval/wer/wer/orc.py b/meeteval/wer/wer/orc.py index 2b36e605..b0bfd2e1 100644 --- a/meeteval/wer/wer/orc.py +++ b/meeteval/wer/wer/orc.py @@ -316,8 +316,6 @@ def greedy_orc_word_error_rate( hypothesis: 'SegLST', reference_sort='segment_if_available', hypothesis_sort='segment_if_available', - *, - assignment_initialization='cp', ): """ # All correct on a single channel @@ -355,7 +353,7 @@ def matching(reference, hypothesis): distance, assignment = greedy_combination_matching( reference.T['words'], [[w for words in stream.T['words'] for w in words] for stream in hypothesis.values()], - initial_assignment=initialize_assignment(reference, hypothesis, initialization=assignment_initialization), + initial_assignment=initialize_assignment(reference, hypothesis, initialization='cp'), ) return distance, assignment @@ -394,7 +392,6 @@ def greedy_orc_word_error_rate_multifile( partial=False, reference_sort='segment_if_available', hypothesis_sort='segment_if_available', - assignment_initialization='cp', ) -> 'dict[str, OrcErrorRate]': """ Computes the ORC WER for each example in the reference and hypothesis files. @@ -408,7 +405,6 @@ def greedy_orc_word_error_rate_multifile( greedy_orc_word_error_rate, reference_sort=reference_sort, hypothesis_sort=hypothesis_sort, - assignment_initialization=assignment_initialization, ), reference, hypothesis, partial=partial ) diff --git a/tests/test_cli.py b/tests/test_cli.py index 7dc2d30f..56498a04 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -89,11 +89,6 @@ def test_burn_greedy_orc(): # Test sort option. Only test the ones that are available for ORC run('python -m meeteval.wer greedy_orcwer -h hyp.stm -r ref.stm --reference-sort "segment" --hypothesis-sort "false"') - # Test assignment initialization - run(f'meeteval-wer greedy_orcwer -h hyp.stm -r ref.stm --assignment-initialization random') - run(f'meeteval-wer greedy_orcwer -h hyp.stm -r ref.stm --assignment-initialization constant') - - def test_burn_mimo(): run(f'python -m meeteval.wer mimower -h hyp.stm -r ref.stm')