IGNORE_GRAMMAR = ['!', '.', ',', '?', ';', '/', '-', '\\']

class Reader():

    def __init__(self):
        self.folder = "./Training Files/"
        self.file = "test.txt"

    def read(self, gram_remove=False):
        filepath = self.folder + self.file
        with open(filepath, 'r') as f:
            lines = f.readlines()
        for i in range(len(lines)):
            lines[i] = lines[i].rstrip('\n')
        while('' in lines):
            lines.remove('')
        
        words = []
        for line in lines:
            temp = line.split()
            for word in temp:
                words.append(word)
        
        self.words = words
        if gram_remove:
            self.remove_grammar()

    def remove_grammar(self):
        for grammar in IGNORE_GRAMMAR:
            for i in range(len(self.words)):
                self.words[i] = self.words[i].rstrip(grammar)
        while('' in self.words):
            self.words.remove('')

    def get_words(self):
        return self.words

957cde04069a1388a6e94f6d9768d1e0b29c8e9d
<mask token>


class Reader:
    <mask token>
    <mask token>
    <mask token>
    <mask token>

<mask token>


class Reader:

    def __init__(self):
        self.folder = './Training Files/'
        self.file = 'test.txt'

    def read(self, gram_remove=False):
        filepath = self.folder + self.file
        with open(filepath, 'r') as f:
            lines = f.readlines()
        for i in range(len(lines)):
            lines[i] = lines[i].rstrip('\n')
        while '' in lines:
            lines.remove('')
        words = []
        for line in lines:
            temp = line.split()
            for word in temp:
                words.append(word)
        self.words = words
        if gram_remove:
            self.remove_grammar()
    <mask token>

    def get_words(self):
        return self.words

<mask token>


class Reader:

    def __init__(self):
        self.folder = './Training Files/'
        self.file = 'test.txt'

    def read(self, gram_remove=False):
        filepath = self.folder + self.file
        with open(filepath, 'r') as f:
            lines = f.readlines()
        for i in range(len(lines)):
            lines[i] = lines[i].rstrip('\n')
        while '' in lines:
            lines.remove('')
        words = []
        for line in lines:
            temp = line.split()
            for word in temp:
                words.append(word)
        self.words = words
        if gram_remove:
            self.remove_grammar()

    def remove_grammar(self):
        for grammar in IGNORE_GRAMMAR:
            for i in range(len(self.words)):
                self.words[i] = self.words[i].rstrip(grammar)
        while '' in self.words:
            self.words.remove('')

    def get_words(self):
        return self.words

IGNORE_GRAMMAR = ['!', '.', ',', '?', ';', '/', '-', '\\']


class Reader:

    def __init__(self):
        self.folder = './Training Files/'
        self.file = 'test.txt'

    def read(self, gram_remove=False):
        filepath = self.folder + self.file
        with open(filepath, 'r') as f:
            lines = f.readlines()
        for i in range(len(lines)):
            lines[i] = lines[i].rstrip('\n')
        while '' in lines:
            lines.remove('')
        words = []
        for line in lines:
            temp = line.split()
            for word in temp:
                words.append(word)
        self.words = words
        if gram_remove:
            self.remove_grammar()

    def remove_grammar(self):
        for grammar in IGNORE_GRAMMAR:
            for i in range(len(self.words)):
                self.words[i] = self.words[i].rstrip(grammar)
        while '' in self.words:
            self.words.remove('')

    def get_words(self):
        return self.words

IGNORE_GRAMMAR = ['!', '.', ',', '?', ';', '/', '-', '\\']

class Reader():

    def __init__(self):
        self.folder = "./Training Files/"
        self.file = "test.txt"

    def read(self, gram_remove=False):
        filepath = self.folder + self.file
        with open(filepath, 'r') as f:
            lines = f.readlines()
        for i in range(len(lines)):
            lines[i] = lines[i].rstrip('\n')
        while('' in lines):
            lines.remove('')
        
        words = []
        for line in lines:
            temp = line.split()
            for word in temp:
                words.append(word)
        
        self.words = words
        if gram_remove:
            self.remove_grammar()

    def remove_grammar(self):
        for grammar in IGNORE_GRAMMAR:
            for i in range(len(self.words)):
                self.words[i] = self.words[i].rstrip(grammar)
        while('' in self.words):
            self.words.remove('')

    def get_words(self):
        return self.words
