def get_text_filename(book_id, chapter_num=-1):
    """ Get the filename for a text document with the book identifier and chapter number. """
    if chapter_num != -1:
        filename = book_id + '-' + str(chapter_num) + '.txt'
    else:
        filename = book_id + ".txt"
    return filename