Ejemplo n.º 1
0
def main():
    args = input_args().parse_args()

    api = MongoDb()

    api.load_data_to_database(
        fasttext_collection_name,
        Path(args.fasttext),
        fasttext_loader,
        fasttext_transformer,
    )
Ejemplo n.º 2
0
def main():
    args = input_args().parse_args()

    api = MongoDb()

    if args.huffpost:
        api.load_data_to_database(
            HuffPost_collection_name,
            Path(args.huffpost),
            HuffPost_loader,
            HuffPost_transformer,
        )

    if args.newsgroups:
        api.load_data_to_database(
            NewsGroups_collection_name,
            Path(args.newsgroups),
            NewsGroups_loader,
            NewsGroups_transformer,
        )

    if args.tweets:
        api.load_data_to_database(
            Tweets_collection_name, Path(args.tweets), Tweets_loader, Tweets_transformer
        )

    if args.comments:
        api.load_data_to_database(
            Comments_collection_name,
            Path(args.comments),
            Comments_loader,
            Comments_transformer,
        )

    if args.emotions:
        api.load_data_to_database(
            Emotions_collection_name,
            Path(args.emotions),
            Emotions_loader,
            Emotions_transformer,
        )

    if args.fake_news:
        api.load_data_to_database(
            fake_news_collection_name,
            Path(args.fake_news),
            fake_news_loader,
            fake_news_transformer,
        )

    if args.fake_news_detection:
        api.load_data_to_database(
            fake_news_detection_collection_name,
            Path(args.fake_news_detection),
            fake_news_detection_loader,
            fake_news_detection_transformer,
        )

    if args.liar_paragraph:
        api.load_data_to_database(
            liar_paragraph_collection_name,
            Path(args.liar_paragraph),
            liar_paragraph_loader,
            liar_paragraph_transformer,
        )

    if args.liar_full_text:
        api.load_data_to_database(
            liar_full_text_collection_name,
            Path(args.liar_full_text),
            liar_full_text_loader,
            liar_full_text_transformer,
        )