Anchor-annotator 0.2.0__py3-none-any.whl → 0.2.1__py3-none-any.whl
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.
- {Anchor_annotator-0.2.0.dist-info → Anchor_annotator-0.2.1.dist-info}/METADATA +1 -1
- {Anchor_annotator-0.2.0.dist-info → Anchor_annotator-0.2.1.dist-info}/RECORD +10 -10
- anchor/_version.py +2 -2
- anchor/models.py +7 -15
- anchor/plot.py +1 -1
- anchor/undo.py +0 -76
- anchor/widgets.py +1 -1
- {Anchor_annotator-0.2.0.dist-info → Anchor_annotator-0.2.1.dist-info}/LICENSE +0 -0
- {Anchor_annotator-0.2.0.dist-info → Anchor_annotator-0.2.1.dist-info}/WHEEL +0 -0
- {Anchor_annotator-0.2.0.dist-info → Anchor_annotator-0.2.1.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: Anchor_annotator
|
3
|
-
Version: 0.2.
|
3
|
+
Version: 0.2.1
|
4
4
|
Summary: Anchor annotator is a program for inspecting corpora for the Montreal Forced Aligner and correcting transcriptions and pronunciations.
|
5
5
|
Home-page: https://github.com/MontrealCorpusTools/Anchor-annotator
|
6
6
|
Author: Montreal Corpus Tools
|
@@ -1,21 +1,21 @@
|
|
1
1
|
anchor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
2
|
anchor/__main__.py,sha256=5ufG8lcx2x1am-04xI991AG7saJd24dxPw5JzjmB878,45
|
3
|
-
anchor/_version.py,sha256=
|
3
|
+
anchor/_version.py,sha256=MxUhzLJIZQfEpDTTcKSxciTGrMLd5v2VmMlHa2HGeo0,411
|
4
4
|
anchor/command_line.py,sha256=xvuCWaPWNVZTg5Ic28qbOYsOLaFbodhBsoZHKJSBazs,482
|
5
5
|
anchor/db.py,sha256=ef4lO6HtCKoxC9CorIc0ZbPxKpjHa576a0ZIBOWNU9E,4956
|
6
6
|
anchor/main.py,sha256=ySas07cnXXBkANqIMHai7tjNwqa5mNd4UaIjh358GgE,114287
|
7
|
-
anchor/models.py,sha256=
|
8
|
-
anchor/plot.py,sha256
|
7
|
+
anchor/models.py,sha256=lfQvb0hxXS53xtJLpJcRiDCi7ONMzhDbpZGpTOzEwbs,88737
|
8
|
+
anchor/plot.py,sha256=-7fT5TMguHLs96Sn3OqD3J2S2x3Q63eHrJhjl0J3LG4,107015
|
9
9
|
anchor/resources_rc.py,sha256=sQ6GvAK3NTVR5bvgR9jCWDeepSYOhEph2mg1ECxnMOs,3560262
|
10
10
|
anchor/settings.py,sha256=SJ9-5xjThJp3-zl99OBLWLSXZmsyUU1JNsgGWHlkJS8,46649
|
11
11
|
anchor/ui_error_dialog.py,sha256=c_QS0s1VaJEV9AhcrQZQyWHHpUPudWjJY1NI7Ytipio,3832
|
12
12
|
anchor/ui_main_window.py,sha256=aEABdKi1Eb1c2MKUsbCbufEp1lKSLFNsC9TPX244UPI,64618
|
13
13
|
anchor/ui_preferences.py,sha256=uer2Xzyq26j-5wwbIKKcK8YEe2w7OFJPXfWSkKcPWhI,40146
|
14
|
-
anchor/undo.py,sha256=
|
15
|
-
anchor/widgets.py,sha256=
|
14
|
+
anchor/undo.py,sha256=PLtiAxC7U27vbega_p21vDRy4m9QBiHatDELlcNx08Y,32523
|
15
|
+
anchor/widgets.py,sha256=fUiF8fuVMTl2k46Z3xjLH930FPuOjwZGOLSAT6pV8Q8,135416
|
16
16
|
anchor/workers.py,sha256=-YPdxgZwZIGq8DPNFGD3oXZqFpruD6alEMMzHdvvVIE,170880
|
17
|
-
Anchor_annotator-0.2.
|
18
|
-
Anchor_annotator-0.2.
|
19
|
-
Anchor_annotator-0.2.
|
20
|
-
Anchor_annotator-0.2.
|
21
|
-
Anchor_annotator-0.2.
|
17
|
+
Anchor_annotator-0.2.1.dist-info/LICENSE,sha256=C0oIsblENEgWQ7XMNdYoXyXsIA5wa3YF0I9lK3H7A1s,1076
|
18
|
+
Anchor_annotator-0.2.1.dist-info/METADATA,sha256=XzwfT9KePIG6nnpsil3I1JvQyEZLdor5TJq03oevV6U,1500
|
19
|
+
Anchor_annotator-0.2.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
20
|
+
Anchor_annotator-0.2.1.dist-info/top_level.txt,sha256=wX6ZKxImGRZKFQjs3f6XYw_TfbAp6Xs3SmbLfLbFAJ0,7
|
21
|
+
Anchor_annotator-0.2.1.dist-info/RECORD,,
|
anchor/_version.py
CHANGED
anchor/models.py
CHANGED
@@ -1058,27 +1058,19 @@ class CorpusSelectionModel(QtCore.QItemSelectionModel):
|
|
1058
1058
|
def model(self) -> CorpusModel:
|
1059
1059
|
return super(CorpusSelectionModel, self).model()
|
1060
1060
|
|
1061
|
-
def
|
1061
|
+
def focus_utterance(self, index):
|
1062
1062
|
m = self.model()
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
return False
|
1067
|
-
|
1068
|
-
def focusUtterance(self, index):
|
1069
|
-
m = self.model()
|
1070
|
-
u = m.utteranceAt(index)
|
1071
|
-
if u is None:
|
1063
|
+
row = index.row()
|
1064
|
+
utt_id = m.utterance_id_at(row)
|
1065
|
+
if utt_id is None:
|
1072
1066
|
self.min_time = 0
|
1073
1067
|
self.max_time = 1
|
1074
1068
|
self.fileAboutToChange()
|
1075
1069
|
self.fileChanged.emit()
|
1076
1070
|
return
|
1077
|
-
|
1078
|
-
|
1079
|
-
|
1080
|
-
self.set_view_times(begin - padding, end + padding)
|
1081
|
-
self.selectionAudioChanged.emit()
|
1071
|
+
self.current_utterance_id = utt_id
|
1072
|
+
self.currentUtteranceChanged.emit()
|
1073
|
+
self.fileViewRequested.emit(self.model().audio_info_for_utterance(row))
|
1082
1074
|
|
1083
1075
|
|
1084
1076
|
class OovModel(TableModel):
|
anchor/plot.py
CHANGED
@@ -1616,7 +1616,7 @@ class AlignmentRegion(MfaRegion):
|
|
1616
1616
|
def viewRangeChanged(self):
|
1617
1617
|
if (self.item_max - self.item_min) / (
|
1618
1618
|
self.selection_model.max_time - self.selection_model.min_time
|
1619
|
-
) < 0.
|
1619
|
+
) < 0.001:
|
1620
1620
|
self.hide()
|
1621
1621
|
else:
|
1622
1622
|
self.show()
|
anchor/undo.py
CHANGED
@@ -150,26 +150,10 @@ class DeleteUtteranceCommand(FileCommand):
|
|
150
150
|
|
151
151
|
def _undo(self, session) -> None:
|
152
152
|
for i, utt in enumerate(self.deleted_utterances):
|
153
|
-
try:
|
154
|
-
del utt.duration
|
155
|
-
except AttributeError:
|
156
|
-
pass
|
157
|
-
try:
|
158
|
-
del utt.kaldi_id
|
159
|
-
except AttributeError:
|
160
|
-
pass
|
161
153
|
make_transient(utt)
|
162
154
|
for x in utt.phone_intervals:
|
163
|
-
try:
|
164
|
-
del x.duration
|
165
|
-
except AttributeError:
|
166
|
-
pass
|
167
155
|
make_transient(x)
|
168
156
|
for x in utt.word_intervals:
|
169
|
-
try:
|
170
|
-
del x.duration
|
171
|
-
except AttributeError:
|
172
|
-
pass
|
173
157
|
make_transient(x)
|
174
158
|
if utt.channel is None:
|
175
159
|
utt.channel = self.channels[i]
|
@@ -212,52 +196,20 @@ class SplitUtteranceCommand(FileCommand):
|
|
212
196
|
if u.id is not None:
|
213
197
|
make_transient(u)
|
214
198
|
for x in u.phone_intervals:
|
215
|
-
try:
|
216
|
-
del x.duration
|
217
|
-
except AttributeError:
|
218
|
-
pass
|
219
199
|
make_transient(x)
|
220
200
|
for x in u.word_intervals:
|
221
|
-
try:
|
222
|
-
del x.duration
|
223
|
-
except AttributeError:
|
224
|
-
pass
|
225
201
|
make_transient(x)
|
226
202
|
if u.channel is None:
|
227
203
|
u.channel = self.merged_utterance.channel
|
228
|
-
try:
|
229
|
-
del u.duration
|
230
|
-
except AttributeError:
|
231
|
-
pass
|
232
|
-
try:
|
233
|
-
del u.kaldi_id
|
234
|
-
except AttributeError:
|
235
|
-
pass
|
236
204
|
session.add(u)
|
237
205
|
|
238
206
|
def _undo(self, session) -> None:
|
239
207
|
if self.merged_utterance.channel is None:
|
240
208
|
self.merged_utterance.channel = self.split_utterances[0].channel
|
241
|
-
try:
|
242
|
-
del self.merged_utterance.duration
|
243
|
-
except AttributeError:
|
244
|
-
pass
|
245
|
-
try:
|
246
|
-
del self.merged_utterance.kaldi_id
|
247
|
-
except AttributeError:
|
248
|
-
pass
|
249
209
|
make_transient(self.merged_utterance)
|
250
210
|
for x in self.merged_utterance.phone_intervals:
|
251
|
-
try:
|
252
|
-
del x.duration
|
253
|
-
except AttributeError:
|
254
|
-
pass
|
255
211
|
make_transient(x)
|
256
212
|
for x in self.merged_utterance.word_intervals:
|
257
|
-
try:
|
258
|
-
del x.duration
|
259
|
-
except AttributeError:
|
260
|
-
pass
|
261
213
|
make_transient(x)
|
262
214
|
session.add(self.merged_utterance)
|
263
215
|
for u in self.split_utterances:
|
@@ -300,7 +252,6 @@ class MergeUtteranceCommand(FileCommand):
|
|
300
252
|
make_transient(self.merged_utterance)
|
301
253
|
if self.merged_utterance.channel is None:
|
302
254
|
self.merged_utterance.channel = self.channel
|
303
|
-
self.merged_utterance.kaldi_id = None
|
304
255
|
session.add(self.merged_utterance)
|
305
256
|
|
306
257
|
def _undo(self, session) -> None:
|
@@ -309,12 +260,9 @@ class MergeUtteranceCommand(FileCommand):
|
|
309
260
|
if old_utt.channel is None:
|
310
261
|
old_utt.channel = self.channel
|
311
262
|
for x in old_utt.phone_intervals:
|
312
|
-
x.duration = None
|
313
263
|
make_transient(x)
|
314
264
|
for x in old_utt.word_intervals:
|
315
265
|
make_transient(x)
|
316
|
-
old_utt.duration = None
|
317
|
-
old_utt.kaldi_id = None
|
318
266
|
session.add(old_utt)
|
319
267
|
session.delete(self.merged_utterance)
|
320
268
|
|
@@ -402,14 +350,6 @@ class CreateUtteranceCommand(FileCommand):
|
|
402
350
|
make_transient(self.new_utterance)
|
403
351
|
if self.new_utterance.channel is None:
|
404
352
|
self.new_utterance.channel = self.channel
|
405
|
-
try:
|
406
|
-
del self.new_utterance.duration
|
407
|
-
except AttributeError:
|
408
|
-
pass
|
409
|
-
try:
|
410
|
-
del self.new_utterance.kaldi_id
|
411
|
-
except AttributeError:
|
412
|
-
pass
|
413
353
|
session.add(self.new_utterance)
|
414
354
|
|
415
355
|
def _undo(self, session) -> None:
|
@@ -453,10 +393,6 @@ class UpdateUtteranceTimesCommand(FileCommand):
|
|
453
393
|
self.utterance.xvector = None
|
454
394
|
self.utterance.ivector = None
|
455
395
|
self.utterance.features = None
|
456
|
-
try:
|
457
|
-
del self.utterance.duration
|
458
|
-
except AttributeError:
|
459
|
-
pass
|
460
396
|
session.merge(self.utterance)
|
461
397
|
|
462
398
|
def _undo(self, session) -> None:
|
@@ -465,10 +401,6 @@ class UpdateUtteranceTimesCommand(FileCommand):
|
|
465
401
|
self.utterance.xvector = None
|
466
402
|
self.utterance.ivector = None
|
467
403
|
self.utterance.features = None
|
468
|
-
try:
|
469
|
-
del self.utterance.duration
|
470
|
-
except AttributeError:
|
471
|
-
pass
|
472
404
|
session.merge(self.utterance)
|
473
405
|
|
474
406
|
def update_data(self):
|
@@ -495,10 +427,6 @@ class UpdateUtteranceTextCommand(FileCommand):
|
|
495
427
|
for w in self.new_text.split():
|
496
428
|
if not self.corpus_model.dictionary_model.check_word(w, self.speaker_id):
|
497
429
|
oovs.add(w)
|
498
|
-
try:
|
499
|
-
del self.utterance.duration
|
500
|
-
except AttributeError:
|
501
|
-
pass
|
502
430
|
self.utterance.text = self.new_text
|
503
431
|
self.utterance.normalized_text = self.new_text # FIXME: Update this
|
504
432
|
self.utterance.oovs = " ".join(oovs)
|
@@ -510,10 +438,6 @@ class UpdateUtteranceTextCommand(FileCommand):
|
|
510
438
|
for w in self.new_text.split():
|
511
439
|
if not self.corpus_model.dictionary_model.check_word(w, self.speaker_id):
|
512
440
|
oovs.add(w)
|
513
|
-
try:
|
514
|
-
del self.utterance.duration
|
515
|
-
except AttributeError:
|
516
|
-
pass
|
517
441
|
self.utterance.text = self.old_text
|
518
442
|
self.utterance.normalized_text = self.old_text # FIXME: Update this
|
519
443
|
self.utterance.oovs = " ".join(oovs)
|
anchor/widgets.py
CHANGED
@@ -402,7 +402,7 @@ class UtteranceListTable(AnchorTableView):
|
|
402
402
|
def set_models(self, model: CorpusModel, selection_model: CorpusSelectionModel):
|
403
403
|
self.setModel(model)
|
404
404
|
self.setSelectionModel(selection_model)
|
405
|
-
self.doubleClicked.connect(self.selectionModel().
|
405
|
+
self.doubleClicked.connect(self.selectionModel().focus_utterance)
|
406
406
|
self.model().utteranceTextUpdated.connect(self.repaint)
|
407
407
|
self.refresh_settings()
|
408
408
|
model.corpusLoaded.connect(self.update_header)
|
File without changes
|
File without changes
|
File without changes
|