def calcOutputLen(outputFormat, article_len, wrd):
    """calc length of the summary. wrd is the user-specified output length or ratio"""
    if outputFormat == "word_count":
        return int(wrd)
    else:
        return article_len * float(wrd)