diff --git a/test/shaping/Makefile.am b/test/shaping/Makefile.am index fa1faf5129cacf5335852c6fbd63ba430e17138d..ffcba9772c72783ed85f7f34bb2e3847a4d4be88 100644 --- a/test/shaping/Makefile.am +++ b/test/shaping/Makefile.am @@ -15,7 +15,6 @@ EXTRA_DIST += \ hb-diff \ hb-diff-colorize \ hb-diff-filter-failures \ - hb-diff-ngrams \ hb-diff-stat \ hb-unicode-decode \ hb-unicode-encode \ diff --git a/test/shaping/hb-diff-ngrams b/test/shaping/hb-diff-ngrams deleted file mode 100755 index c02f5415f75f2249b418b7b238b4ecca06e53b01..0000000000000000000000000000000000000000 --- a/test/shaping/hb-diff-ngrams +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env python - -from hb_test_tools import * - -UtilMains.process_multiple_files (DiffSinks.print_ngrams) diff --git a/test/shaping/hb_test_tools.py b/test/shaping/hb_test_tools.py index c9bb1dd33c5792f2be35cf7cbd23f066c7f5ec4b..f7e5943470354dce1235b7262baa4763bdc9c5e6 100644 --- a/test/shaping/hb_test_tools.py +++ b/test/shaping/hb_test_tools.py @@ -293,32 +293,6 @@ class DiffSinks: total = passed + failed print ("%d out of %d tests passed. %d failed (%g%%)" % (passed, total, failed, 100. * failed / total)) - @staticmethod - def print_ngrams (f, ns=(1,2,3)): - gens = tuple (Ngram.generator (n) for n in ns) - allstats = Stats () - allgrams = {} - for key, lines in DiffHelpers.separate_test_cases (f): - test = Test (lines) - allstats.add (test) - - for gen in gens: - for ngram in gen (test.unicodes): - if ngram not in allgrams: - allgrams[ngram] = Stats () - allgrams[ngram].add (test) - - importantgrams = {} - for ngram, stats in allgrams.iteritems (): - if stats.failed.count >= 30: # for statistical reasons - importantgrams[ngram] = stats - allgrams = importantgrams - del importantgrams - - for ngram, stats in allgrams.iteritems (): - print ("zscore: %9f failed: %6d passed: %6d ngram: <%s>" % (stats.zscore (allstats), stats.failed.count, stats.passed.count, ','.join ("U+%04X" % u for u in ngram))) - - class Test: