def smoothed_relative_freq(n_focus, n_ref, size_focus, size_ref, N=1):
    """Simple maths method for finding relative frequency of a word in the
    focus corpus compared to the reference corpus. Frequencies are
    calculated per million and N is the smoothing parameter (default N = 1).

    Args:
        n_focus (int): Number of target words in focus corpus
        n_ref (int): Number of target words in reference corpus
        size_focus (int): Size of focus corpus
        size_ref (int): Size of reference corpus
        N (int, optional): Smoothing parameter

    Returns:
        float
    """

    f_focus = n_focus * 1.0e6 / size_focus
    f_ref = n_ref * 1.0e6 / size_ref

    return (f_focus + N) / (f_ref + N)