コード例 #1
0
ファイル: t_factory.py プロジェクト: DaniFdezAlvarez/wMERA
def get_clean_graph_generator_mongo_repos():
    artists_ngram_repo = MongoEntityNgramsRepository(url_root="127.0.0.1:27017",
                                                     base_entity_uri=base_entities_URI,
                                                     type_of_entity_collection=ARTIST_COLLECTION)

    songs_ngram_repo = MongoEntityNgramsRepository(url_root="127.0.0.1:27017",
                                                   base_entity_uri=base_entities_URI,
                                                   type_of_entity_collection=SONG_COLLECTION)

    entity_counter_repo = EntityCounterRepositoryMongo(url_root="127.0.0.1:27017",
                                                       collection="entities_count")

    songs_ngram_repo.reset_collection()
    artists_ngram_repo.reset_collection()
    entity_counter_repo.reset_count()

    return GraphGenerator(repo_songs=songs_ngram_repo,
                          repo_artist=artists_ngram_repo,
                          repo_counter=entity_counter_repo)
コード例 #2
0
ファイル: t_factory.py プロジェクト: DaniFdezAlvarez/wMERA
def get_clean_repo_counter_mongo():
    entity_counter_repo = EntityCounterRepositoryMongo(url_root="127.0.0.1:27017",
                                                       collection="entities_count")
    entity_counter_repo.reset_count()
    return entity_counter_repo