import json


def load_json(filename, samples=100000):
    """
    Loads the generated corpus from a json file by picking the first n samples, random chosing is not neccessary as the sampling process from a language model is random
    :param filename: str, filepath and name
    :param samples: int, number of documents to return
    :return: list of str, corpus
    """
    with open(filename, 'r') as file:
        train_articles = json.load(file)
    return train_articles[:min(samples, len(train_articles))]