batchalign 0.8.2.post8__tar.gz → 0.8.2.post10__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {batchalign-0.8.2.post8/batchalign.egg-info → batchalign-0.8.2.post10}/PKG-INFO +1 -1
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/analysis/compare.py +39 -4
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/version +1 -1
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10/batchalign.egg-info}/PKG-INFO +1 -1
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/LICENSE +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/MANIFEST.in +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/README.md +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/__main__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/cli/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/cli/bench.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/cli/cache.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/cli/cli.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/cli/dispatch.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/constants.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/document.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/errors.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/base.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/chat/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/chat/file.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/chat/generator.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/chat/lexer.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/chat/parser.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/chat/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/textgrid/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/textgrid/file.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/textgrid/generator.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/formats/textgrid/parser.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/audio_io.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/resolve.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/speaker/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/speaker/config.yaml +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/speaker/infer.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/speaker/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/training/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/training/run.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/training/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/cantonese_infer.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/dataset.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/execute.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/infer.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/prep.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/train.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/wave2vec/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/wave2vec/infer_fa.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/whisper/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/whisper/infer_asr.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/whisper/infer_fa.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/analysis/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/analysis/eval.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2chinese.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/deu.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/ell.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/eng.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/eus.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/fra.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/hrv.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/ind.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/jpn.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/nld.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/por.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/spa.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/tha.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/oai_whisper.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/rev.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/whisper.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/whisperx.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/avqi/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/avqi/engine.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/base.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cache.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/cleanup.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/disfluencies.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/parse_support.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/retrace.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/support/filled_pauses.eng +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/support/replacements.eng +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/support/test.test +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/diarization/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/diarization/pyannote.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/dispatch.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/fa/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/fa/wave2vec_fa.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/fa/whisper_fa.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/coref.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/en/irr.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/fr/apm.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/fr/apmn.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/fr/case.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/ja/verbforms.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/ud.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/opensmile/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/opensmile/engine.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/pipeline.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/segmentation/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/segmentation/cantonese_seg.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/speaker/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/speaker/nemo_speaker.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/translate/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/translate/gtrans.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/translate/seamless.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/translate/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utr/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utr/rev_utr.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utr/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utr/whisper_utr.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utterance/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utterance/ud_utterance.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/cli/test_dispatch_memory.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/conftest.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_file.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_generator.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_lexer.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_parser.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/textgrid/test_textgrid.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/models/test_audio_io.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/models/test_audio_lazy.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/analysis/test_eval.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/asr/test_asr_pipeline.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/asr/test_asr_utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/cache/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/cache/test_cache.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/cleanup/test_disfluency.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/cleanup/test_parse_support.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/fa/test_fa_pipeline.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/fa/test_fa_short_segments.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/fixures.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/test_pipeline.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/test_pipeline_models.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/test_document.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/__init__.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/abbrev.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/compounds.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/config.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/device.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/dp.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/names.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/utils/utils.py +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign.egg-info/SOURCES.txt +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign.egg-info/dependency_links.txt +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign.egg-info/entry_points.txt +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign.egg-info/requires.txt +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign.egg-info/top_level.txt +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/setup.cfg +0 -0
- {batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/setup.py +0 -0
|
@@ -216,6 +216,30 @@ def _find_best_segment(gold_tokens, main_tokens, mfn):
|
|
|
216
216
|
return best
|
|
217
217
|
|
|
218
218
|
|
|
219
|
+
def _best_rotation(window_tokens, gold_tokens, mfn):
|
|
220
|
+
"""Find the cyclic rotation of *window_tokens* that maximises matches.
|
|
221
|
+
|
|
222
|
+
Returns the rotation offset *r* such that
|
|
223
|
+
``window_tokens[r:] + window_tokens[:r]`` best aligns to *gold_tokens*.
|
|
224
|
+
"""
|
|
225
|
+
if len(window_tokens) <= 1:
|
|
226
|
+
return 0
|
|
227
|
+
|
|
228
|
+
best_r = 0
|
|
229
|
+
best_matches = -1
|
|
230
|
+
n = len(window_tokens)
|
|
231
|
+
|
|
232
|
+
for r in range(n):
|
|
233
|
+
rotated = window_tokens[r:] + window_tokens[:r]
|
|
234
|
+
alignment = align(rotated, gold_tokens, False, mfn)
|
|
235
|
+
matches = sum(1 for item in alignment if isinstance(item, Match))
|
|
236
|
+
if matches > best_matches:
|
|
237
|
+
best_matches = matches
|
|
238
|
+
best_r = r
|
|
239
|
+
|
|
240
|
+
return best_r
|
|
241
|
+
|
|
242
|
+
|
|
219
243
|
def _get_pos(form):
|
|
220
244
|
"""Extract uppercased POS from a Form's morphology, or '?' if absent."""
|
|
221
245
|
if form is not None and form.morphology:
|
|
@@ -287,6 +311,8 @@ class CompareEngine(BatchalignEngine):
|
|
|
287
311
|
for form_idx, form in enumerate(utt.content):
|
|
288
312
|
if form.text.strip() in MOR_PUNCT + ENDING_PUNCT:
|
|
289
313
|
continue
|
|
314
|
+
if _get_pos(form) == "PUNCT":
|
|
315
|
+
continue
|
|
290
316
|
if form.text.strip().lower() in fillers:
|
|
291
317
|
continue
|
|
292
318
|
main_info.append((utt_idx, form_idx, form))
|
|
@@ -303,7 +329,7 @@ class CompareEngine(BatchalignEngine):
|
|
|
303
329
|
for utt_idx, utt in enumerate(gold_utterances):
|
|
304
330
|
gold_punct[utt_idx] = []
|
|
305
331
|
for form_idx, form in enumerate(utt.content):
|
|
306
|
-
if form.text.strip() in MOR_PUNCT + ENDING_PUNCT:
|
|
332
|
+
if form.text.strip() in MOR_PUNCT + ENDING_PUNCT or _get_pos(form) == "PUNCT":
|
|
307
333
|
gold_punct[utt_idx].append((form_idx, form))
|
|
308
334
|
continue
|
|
309
335
|
if form.text.strip().lower() in fillers:
|
|
@@ -360,8 +386,13 @@ class CompareEngine(BatchalignEngine):
|
|
|
360
386
|
utt_main_forms[utt_idx].append(m_form)
|
|
361
387
|
utt_main_speakers[utt_idx].append(m_utt_idx)
|
|
362
388
|
|
|
363
|
-
# Align the chosen window against this gold utterance
|
|
389
|
+
# Align the chosen window against this gold utterance,
|
|
390
|
+
# trying cyclic rotations to avoid spurious del/ins pairs.
|
|
364
391
|
window_main = conformed_main[abs_start:abs_end]
|
|
392
|
+
window_len = len(window_main)
|
|
393
|
+
rotation = _best_rotation(window_main, g_tokens, match_fn)
|
|
394
|
+
if rotation > 0:
|
|
395
|
+
window_main = window_main[rotation:] + window_main[:rotation]
|
|
365
396
|
utt_alignment = align(window_main, g_tokens, False, match_fn)
|
|
366
397
|
|
|
367
398
|
local_main_cursor = 0
|
|
@@ -370,7 +401,7 @@ class CompareEngine(BatchalignEngine):
|
|
|
370
401
|
|
|
371
402
|
for item in utt_alignment:
|
|
372
403
|
if isinstance(item, Match):
|
|
373
|
-
global_main_idx = abs_start + local_main_cursor
|
|
404
|
+
global_main_idx = abs_start + (local_main_cursor + rotation) % window_len
|
|
374
405
|
orig_main_idx = main_map[global_main_idx]
|
|
375
406
|
main_form = main_info[orig_main_idx][2]
|
|
376
407
|
orig_gold_idx = g_maps[local_gold_cursor]
|
|
@@ -401,7 +432,7 @@ class CompareEngine(BatchalignEngine):
|
|
|
401
432
|
local_gold_cursor += 1
|
|
402
433
|
|
|
403
434
|
else:
|
|
404
|
-
global_main_idx = abs_start + local_main_cursor
|
|
435
|
+
global_main_idx = abs_start + (local_main_cursor + rotation) % window_len
|
|
405
436
|
orig_main_idx = main_map[global_main_idx]
|
|
406
437
|
main_form = main_info[orig_main_idx][2]
|
|
407
438
|
|
|
@@ -462,6 +493,10 @@ class CompareEngine(BatchalignEngine):
|
|
|
462
493
|
utt.time = (timed_forms[0].time[0], timed_forms[-1].time[1])
|
|
463
494
|
utt.text = None
|
|
464
495
|
|
|
496
|
+
# Copy @Media header from the main doc if it has one
|
|
497
|
+
if doc.media is not None:
|
|
498
|
+
gold.media = doc.media
|
|
499
|
+
|
|
465
500
|
return gold
|
|
466
501
|
|
|
467
502
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/models/utterance/cantonese_infer.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/analysis/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/asr/num2lang/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/disfluencies.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/parse_support.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/cleanup/support/test.test
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/diarization/__init__.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/diarization/pyannote.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/__init__.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/coref.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/en/irr.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/fr/apm.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/fr/apmn.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/fr/case.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/morphosyntax/ja/verbforms.py
RENAMED
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/opensmile/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/segmentation/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/speaker/nemo_speaker.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/translate/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/translate/seamless.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utterance/__init__.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/pipelines/utterance/ud_utterance.py
RENAMED
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/cli/test_dispatch_memory.py
RENAMED
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_file.py
RENAMED
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_lexer.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_parser.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/formats/chat/test_chat_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/models/test_audio_lazy.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/analysis/test_eval.py
RENAMED
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/asr/test_asr_utils.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/cache/__init__.py
RENAMED
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/cache/test_cache.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/fa/test_fa_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{batchalign-0.8.2.post8 → batchalign-0.8.2.post10}/batchalign/tests/pipelines/test_pipeline.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|