def getStatsFromFile(path):
    """
    Method adapted from Trusca et al. (2020). Obtains the number of observations as well as the polarity vector

    :param path:
    :return:
    """
    polarity_vector = []
    with open(path, "r") as fd:
        lines = fd.read().splitlines()
        size = len(lines) / 4
        for i in range(0, len(lines), 4):
            # polarity
            polarity_vector.append(lines[i + 2].strip().split()[0])
    return size, polarity_vector