Skip to content

Commit 2d71b4c

Browse files
committed
Add macro count tracking in analyze_data.py
1 parent c2ce6f6 commit 2d71b4c

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

Source/Data/scripts/analyze_data.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,15 @@
1212
unigram_1char_count = 0
1313
unigram_multichar_count = 0
1414
emoji_count = 0
15+
macro_count = 0
1516

1617
for (r, v, s) in data:
1718
# Skip emojis.
19+
20+
if v.startswith('MACRO@'):
21+
macro_count += 1
22+
continue
23+
1824
if s == -8:
1925
emoji_count += 1
2026
key = '-'.join(r)
@@ -95,7 +101,7 @@
95101
print('%6d unigrams with one character' % unigram_1char_count)
96102
print('%6d unigrams with multiple characters' % unigram_multichar_count)
97103
print("%6d emojis" % emoji_count)
98-
104+
print("%6d macros" % macro_count)
99105
print(separator)
100106
print('summary for unigrams with scores lower than their competing characters:')
101107
print('%6d unigrams that are indifferent since the characters are the same' %

0 commit comments

Comments
 (0)