def dict_scrape(POS, dictionaryfile='as_freq.txt'):
    'Scrapes a dictionary for a given part of speech. POS tags in POS_tags.\n\n    POS(str), dictionaryfile(str-of-filename) -> list-of-strings\n    '
    if (POS in POS_tags):
        with open(dictionaryfile) as to_scrape:
            for line in to_scrape:
                if (POS in line):
                    lemmas.append(line)
    for line in lemmas:
        i = 0
        for char in line[:44]:
            if (char not in alphabet):
                i = (i + 1)
        lemmas_cleaned.append((line[i:].strip().replace('*', '').replace('?', '') + '\n'))
    return lemmas_cleaned
Scrapes a dictionary for a given part of speech. POS tags in POS_tags.

POS(str), dictionaryfile(str-of-filename) -> list-of-strings
def dict_scrape(POS, dictionaryfile='as_freq.txt'):
    'Scrapes a dictionary for a given part of speech. POS tags in POS_tags.\n\n    POS(str), dictionaryfile(str-of-filename) -> list-of-strings\n    '
    if (POS in POS_tags):
        with open(dictionaryfile) as to_scrape:
            for line in to_scrape:
                if (POS in line):
                    lemmas.append(line)
    for line in lemmas:
        i = 0
        for char in line[:44]:
            if (char not in alphabet):
                i = (i + 1)
        lemmas_cleaned.append((line[i:].strip().replace('*', ).replace('?', ) + '\n'))
    return lemmas_cleaned