overview
This commit is contained in:
parent
0a6dff1594
commit
d96c9ffa82
1 changed files with 10 additions and 5 deletions
|
|
@ -58,7 +58,7 @@ for letter in sorted(KEYWORDS):
|
||||||
durations = {c['out'] - c['in'] for c in letter_clips}
|
durations = {c['out'] - c['in'] for c in letter_clips}
|
||||||
duration = ox.format_duration(sum(durations) * 1000)
|
duration = ox.format_duration(sum(durations) * 1000)
|
||||||
print('%s: %s clips with %s of %s tags total duration: %s' % (letter, len(letter_clips), len(letter_tags), len(KEYWORDS[letter]), duration))
|
print('%s: %s clips with %s of %s tags total duration: %s' % (letter, len(letter_clips), len(letter_tags), len(KEYWORDS[letter]), duration))
|
||||||
if len(letter_tags) != len(KEYWORDS[letter]):
|
if set(KEYWORDS[letter]) - set(letter_tags):
|
||||||
print('missing tags:', ', '.join(set(KEYWORDS[letter]) - set(letter_tags)))
|
print('missing tags:', ', '.join(set(KEYWORDS[letter]) - set(letter_tags)))
|
||||||
|
|
||||||
buckets = {}
|
buckets = {}
|
||||||
|
|
@ -69,16 +69,21 @@ for letter in sorted(KEYWORDS):
|
||||||
buckets[i+1] = letter_clips[p:+p+size[i]]
|
buckets[i+1] = letter_clips[p:+p+size[i]]
|
||||||
p += size[i]
|
p += size[i]
|
||||||
for size in buckets:
|
for size in buckets:
|
||||||
bucket_tags = {c['value'] for c in buckets[size]}
|
bucket_tags = Counter([c['value'] for c in buckets[size]])
|
||||||
durations = {c['out'] - c['in'] for c in buckets[size]}
|
durations = {c['out'] - c['in'] for c in buckets[size]}
|
||||||
dmin = min(durations)
|
dmin = min(durations)
|
||||||
dmax = max(durations)
|
dmax = max(durations)
|
||||||
print(size)
|
print(size)
|
||||||
print('\t', len(buckets[size]), 'clips', len(bucket_tags), 'tags', 'durations from %.3f to %.3f' % (dmin, dmax))
|
print('\t', len(buckets[size]), 'clips', len(bucket_tags), 'tags', 'durations from %.3f to %.3f' % (dmin, dmax))
|
||||||
|
|
||||||
if set(letter_tags) - bucket_tags:
|
if set(letter_tags) - set(bucket_tags):
|
||||||
print('\t', 'used tags:', ', '.join(bucket_tags))
|
used_tags = [
|
||||||
print('\t', 'missing tags:', ', '.join(set(letter_tags) - bucket_tags))
|
'%s (%d)' % (t, bucket_tags[t])
|
||||||
|
for t in sorted(bucket_tags, key=lambda t: (-bucket_tags[t],t))
|
||||||
|
]
|
||||||
|
print('\t', 'used tags:', ', '.join(used_tags))
|
||||||
|
if set(letter_tags) - set(bucket_tags):
|
||||||
|
print('\t', 'missing tags:', ', '.join(sorted(set(letter_tags) - set(bucket_tags))))
|
||||||
|
|
||||||
|
|
||||||
for tag in sorted(known_tags):
|
for tag in sorted(known_tags):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue