<commit_before>from book import Book

class Tractatus:
    # This is the book
    tractatus = None

    def __init__(self):
        """ Construct the Tractatus """

        # Build the Book object
        self.tractatus = Book()
        print "Tractatus initialized"

        # Get the tractatus from text
        all_text = open('res/tractatus.txt', 'r')
        output = all_text.readlines()

        print "text file downloaded"

        print len(output)

        # Read the file line by line into self.tractatus
        # The actual content only begins at line 30 until the end
        for i in range(30, len(output)):
            complete_string = str(output[i])

            # We need to separate the index and the text
            split_string = complete_string.partition(" ")
            index = split_string[0]
            text = split_string[2].rstrip("\n")

            # Load them in
            self.tractatus.add_section(index, text)

        print "loop complete"
        print self.tractatus

    def get_book(self):<commit_msg>Trying to fix tractatus initialization...<commit_after>from book import Book

class Tractatus:
    # This is the book
    tractatus = None

    def __init__(self):
        """ Construct the Tractatus """

        # Build the Book object
        self.tractatus = Book()
        # print "Tractatus initialized"

        # Get the tractatus from text
        all_text = open('res/tractatus.txt', 'r')
        output = all_text.readlines()

        print "text file downloaded"

        print len(output)

        # Read the file line by line into self.tractatus
        # The actual content only begins at line 30 until the end
        for i in range(30, len(output)):
            complete_string = str(output[i])

            # We need to separate the index and the text
            split_string = complete_string.partition(" ")
            index = split_string[0]
            text = split_string[2].rstrip("\n")

            # Load them in
            self.tractatus.add_section(index, text)

        print "loop complete"
        print self.tractatus

    def get_book(self):
{'fraction_non_alphanumeric': 0.0830188679245283, 'fraction_numerical': 0.005660377358490566, 'mean_word_length': 2.0256776034236803, 'pattern_counts': {'":': 0, '<': 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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1253081', 'n_tokens_mistral': 585, 'n_tokens_neox': 556, 'n_words': 193}