def main():
    '''
    Purpose::

    Input::
    
    Output::
    
    Assumptions::
    '''
    # Get arguments
    args = parse_arguments()
    if args.url:
        url = args.url

    # Get file and read it into structure
    try:
        with open(url, 'rb') as rtffile:
            judges = extract_terms(Rtf15Reader.read(rtffile))
            #print PlaintextWriter.write(doc).getvalue()
                
    except IOError as e:
        print 'An error occured fetching %s \n %s' % (url, e.reason)   
        return 1

    f = open('US_legal_lexicon.txt', 'w')
    # Print data
    #f.write("\n".join(str(i).encode('utf8') for i in judges))
    for i in judges:
        f.write((i).encode('utf8') +'\n')

    f.close()
dataset/ETHPy150Open memex-explorer/memex-gate/utility/scrape_legal_lexicon.py/main/original