def delete_word(word):
    '''delete the word or phrase from database.'''

    conn = sqlite3.connect(os.path.join(DEFAULT_PATH, 'word.db'))
    curs = conn.cursor()
    # search fisrt
    curs.execute('SELECT expl, pr FROM Word WHERE name = "%s"' % word)
    res = curs.fetchall()

    if res:
        try:
            curs.execute('DELETE FROM Word WHERE name = "%s"' % word)
        except Exception as e:
            print(e)
        else:
            print(colored('%s has been deleted from database' % word, 'green'))
            conn.commit()
        finally:
            curs.close()
            conn.close()
    else:
        print(colored('%s not exists in the database' % word, 'white', 'on_red'))
delete the word or phrase from database.