diff --git a/wani.py b/wani.py index 916ad88..573c031 100644 --- a/wani.py +++ b/wani.py @@ -1026,6 +1026,27 @@ class Writer: return Writer(False, args.output, args.multiple_output, int(args.sort_by), args.sort_reversed, args.stats) +class Formatter: + def __init__(self, colocation_ids): + self.colocation_ids = colocation_ids + self.additional_init() + + def header_repeat(self): + raise NotImplementedError("Header repeat formatter not implemented") + def header_right(self): + raise NotImplementedError("Header right formatter not implemented") + def content_repeat(self, words, representations, idx): + raise NotImplementedError("Content repeat formatter not implemented") + def content_right(self, freq): + raise NotImplementedError("Content right formatter not implemented") + def group(self): + raise NotImplementedError("Group for formatter not implemented") + + def additional_init(self): + pass + def length(self): + return len(self.header_repeat()) + @staticmethod def make_all_writer(args): return Writer(True, args.all, False, -1, False, False)