<commit_before>import json

__version__ = "0.1"

class PaperPass:
    " This Class constructs first pass of a paper "

    def __init__(self, outline):
        self.outline = outline

    def setCategory(self, category):
        self.category = category

    def setContext(self, context):
        self.context = context

    def setCorrectness(self, correctness):
        self.correctness = correctness

    def setContributions(self, contributions):
        self.contributions = contributions

    def setClarity(self, clarity):
        self.clarity = clarity

    def outputjson(self, filename):
        fp = open(filename, 'w')
        json.dump(self.outline, fp)

""""
if __name__ == "__main__":
    import sys
<commit_msg>modify outputjson method<commit_after>import json

__version__ = "0.1"

class PaperPass:
    " This Class constructs first pass of a paper "

    def __init__(self, outline):
        self.outline = outline

    def setCategory(self, category):
        self.category = category

    def setContext(self, context):
        self.context = context

    def setCorrectness(self, correctness):
        self.correctness = correctness

    def setContributions(self, contributions):
        self.contributions = contributions

    def setClarity(self, clarity):
        self.clarity = clarity

    def outputjson(self, filename):
        fp = open(filename, 'w')
        content = {'category'      : self.category,
                   'context'       : self.context,
                   'correctness'   : self.correctness,
                   'contributions' : self.contributions,
                   'clarity'       : self.clarity,
        }
                   
        json.dump(content, fp)

""""
if __name__ == "__main__":
    import sys

{'fraction_non_alphanumeric': 0.0949943117178612, 'fraction_numerical': 0.0022753128555176336, 'mean_word_length': 2.306390977443609, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4349206', 'n_tokens_mistral': 504, 'n_tokens_neox': 472, 'n_words': 127}