batchalign 0.7.8__tar.gz → 0.7.9.post0__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.7.8/batchalign.egg-info → batchalign-0.7.9.post0}/PKG-INFO +1 -1
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/cli/cli.py +4 -1
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/constants.py +1 -1
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/chat/generator.py +2 -2
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/chat/parser.py +5 -1
- batchalign-0.7.9.post0/batchalign/version +3 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0/batchalign.egg-info}/PKG-INFO +1 -1
- batchalign-0.7.8/batchalign/version +0 -3
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/LICENSE +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/MANIFEST.in +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/README.md +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/__main__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/cli/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/cli/dispatch.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/document.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/errors.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/base.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/chat/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/chat/file.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/chat/lexer.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/chat/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/textgrid/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/textgrid/file.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/textgrid/generator.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/formats/textgrid/parser.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/resolve.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/speaker/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/speaker/config.yaml +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/speaker/infer.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/speaker/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/training/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/training/run.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/training/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utterance/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utterance/dataset.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utterance/execute.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utterance/infer.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utterance/prep.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/utterance/train.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/whisper/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/whisper/infer_asr.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/models/whisper/infer_fa.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/analysis/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/analysis/eval.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/asr/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/asr/rev.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/asr/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/asr/whisper.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/asr/whisperx.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/base.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/cleanup.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/disfluencies.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/parse_support.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/retrace.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/support/filled_pauses.eng +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/support/replacements.eng +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/support/test.test +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/dispatch.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/fa/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/fa/whisper_fa.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/coref.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/en/irr.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/fr/apm.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/fr/apmn.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/fr/case.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/ja/verbforms.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/ud.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/pipeline.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/speaker/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/speaker/nemo_speaker.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/utr/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/utr/rev_utr.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/utr/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/utr/whisper_utr.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/utterance/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/utterance/ud_utterance.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/conftest.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_file.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_generator.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_lexer.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_parser.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/textgrid/test_textgrid.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/analysis/test_eval.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/asr/test_asr_pipeline.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/asr/test_asr_utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/cleanup/test_disfluency.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/cleanup/test_parse_support.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/fa/test_fa_pipeline.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/fixures.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/test_pipeline.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/test_pipeline_models.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/test_document.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/utils/__init__.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/utils/config.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/utils/dp.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/utils/utils.py +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign.egg-info/SOURCES.txt +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign.egg-info/dependency_links.txt +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign.egg-info/entry_points.txt +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign.egg-info/requires.txt +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign.egg-info/top_level.txt +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/setup.cfg +0 -0
- {batchalign-0.7.8 → batchalign-0.7.9.post0}/setup.py +0 -0
@@ -158,10 +158,13 @@ def transcribe(ctx, in_dir, out_dir, lang, num_speakers, **kwargs):
|
|
158
158
|
def writer(doc, output):
|
159
159
|
doc.content.insert(0, CustomLine(id="Comment", type=CustomLineType.INDEPENDENT,
|
160
160
|
content=f"Batchalign {VERSION_NUMBER.strip()}, ASR Engine {asr}"))
|
161
|
-
CHATFile(doc=doc).write(output
|
161
|
+
CHATFile(doc=doc).write(output,
|
162
162
|
.replace(".wav", ".cha")
|
163
|
+
.replace(".WAV", ".cha")
|
163
164
|
.replace(".mp4", ".cha")
|
165
|
+
.replace(".MP4", ".cha")
|
164
166
|
.replace(".mp3", ".cha"),
|
167
|
+
.replace(".MP3", ".cha"),
|
165
168
|
write_wor=kwargs.get("wor", False))
|
166
169
|
|
167
170
|
if kwargs.get("diarize"):
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# CHAT punctuation specifications
|
2
|
-
ENDING_PUNCT = [".", "?", "!", "+//.", "+/.", "+...", "+\"/.", "+..?", "+\".", "+//?", "+.", "+!?", "+/?", "..."]
|
2
|
+
ENDING_PUNCT = [".", "?", "!", "+//.", "+/.", "+...", "+\"/.", "+..?", "+\".", "+//?", "+.", "+!?", "+/?", "...", "(.)"]
|
3
3
|
MOR_PUNCT = ["‡", "„", ","]
|
4
4
|
CHAT_IGNORE = ["xxx", "yyy", "www"]
|
5
5
|
|
@@ -41,9 +41,9 @@ def generate_chat_utterance(utterance: Utterance, special_mor=False, write_wor=T
|
|
41
41
|
gras.append(i.dependency)
|
42
42
|
if i.time:
|
43
43
|
has_wor = True
|
44
|
-
wor_elems.append(f"{i.text} \x15{str(i.time[0])}_{str(i.time[1])}\x15")
|
44
|
+
wor_elems.append(re.sub(r"@\w+", "", f"{i.text} \x15{str(i.time[0])}_{str(i.time[1])}\x15"))
|
45
45
|
else:
|
46
|
-
wor_elems.append(i.text)
|
46
|
+
wor_elems.append(re.sub(r"@\w+", "", i.text))
|
47
47
|
|
48
48
|
if i.coreference:
|
49
49
|
has_coref = True
|
@@ -64,9 +64,11 @@ def chat_parse_utterance(text, mor, gra, wor, additional):
|
|
64
64
|
# fix commas for people that don't annotate commas with a space
|
65
65
|
to_lex = to_lex.replace(",", " ,")
|
66
66
|
|
67
|
-
to_lex = re.sub(r"\([\d.:]+\)", "", to_lex)
|
67
|
+
to_lex = re.sub(r"\([\d.:]+\)(?!$)", "", to_lex)
|
68
68
|
to_lex = re.sub(r"↫.*?↫", "", to_lex)
|
69
69
|
|
70
|
+
to_lex = re.sub(r"\(.\)$", r"$END_SPC$", to_lex)
|
71
|
+
|
70
72
|
# if there is a punct, move it
|
71
73
|
for end in sorted(ENDING_PUNCT, key=len, reverse=True):
|
72
74
|
if end in to_lex:
|
@@ -76,6 +78,8 @@ def chat_parse_utterance(text, mor, gra, wor, additional):
|
|
76
78
|
to_lex = to_lex.replace(" ", " ")
|
77
79
|
|
78
80
|
tokens = lex(to_lex)
|
81
|
+
if tokens[-1][0] == "END_SPC":
|
82
|
+
tokens = tokens[:-1] + [("(.)", TokenType.PUNCT)]
|
79
83
|
|
80
84
|
# correct 0 forms
|
81
85
|
res = []
|
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
|
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.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/support/filled_pauses.eng
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/cleanup/support/replacements.eng
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
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/pipelines/morphosyntax/ja/verbforms.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
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_generator.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_lexer.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_parser.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/chat/test_chat_utils.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/formats/textgrid/test_textgrid.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/analysis/test_eval.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/asr/test_asr_pipeline.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/asr/test_asr_utils.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/cleanup/test_disfluency.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/cleanup/test_parse_support.py
RENAMED
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/fa/test_fa_pipeline.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{batchalign-0.7.8 → batchalign-0.7.9.post0}/batchalign/tests/pipelines/test_pipeline_models.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
|