How to use the asreview.data.ASReviewData.from_file function in asreview

To help you get started, we’ve selected a few asreview examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github msdslab / automated-systematic-review / asreview / review / factory.py View on Github external
if isinstance(excluded_dataset, (str, PurePath)):
        excluded_dataset = [excluded_dataset]

    if isinstance(prior_dataset, (str, PurePath)):
        prior_dataset = [prior_dataset]

    as_data = ASReviewData()
    # Find the URL of the datasets if the dataset is an example dataset.
    for data in dataset:
        as_data.append(ASReviewData.from_file(find_data(data)))

    if new:
        as_data.labels = np.full((len(as_data),), LABEL_NA, dtype=int)
    for data in included_dataset:
        as_data.append(ASReviewData.from_file(
            find_data(data), data_type="included"))
    for data in excluded_dataset:
        as_data.append(ASReviewData.from_file(
            find_data(data), data_type="excluded"))
    for data in prior_dataset:
        as_data.append(ASReviewData.from_file(
            find_data(data), data_type="prior"))
    return as_data
github msdslab / automated-systematic-review / asreview / review / factory.py View on Github external
if isinstance(prior_dataset, (str, PurePath)):
        prior_dataset = [prior_dataset]

    as_data = ASReviewData()
    # Find the URL of the datasets if the dataset is an example dataset.
    for data in dataset:
        as_data.append(ASReviewData.from_file(find_data(data)))

    if new:
        as_data.labels = np.full((len(as_data),), LABEL_NA, dtype=int)
    for data in included_dataset:
        as_data.append(ASReviewData.from_file(
            find_data(data), data_type="included"))
    for data in excluded_dataset:
        as_data.append(ASReviewData.from_file(
            find_data(data), data_type="excluded"))
    for data in prior_dataset:
        as_data.append(ASReviewData.from_file(
            find_data(data), data_type="prior"))
    return as_data