Exemplo n.º 1
0
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)
Exemplo n.º 2
0
def get_clean_repo_songs_mongo():
    songs_ngram_repo = MongoEntityNgramsRepository(url_root="127.0.0.1:27017",
                                                   base_entity_uri=base_entities_URI,
                                                   type_of_entity_collection=SONG_COLLECTION)
    songs_ngram_repo.reset_collection()
    return songs_ngram_repo
Exemplo n.º 3
0
def get_clean_repo_artist_mongo():
    artists_ngram_repo = MongoEntityNgramsRepository(url_root="127.0.0.1:27017",
                                                     base_entity_uri=base_entities_URI,
                                                     type_of_entity_collection=ARTIST_COLLECTION)
    artists_ngram_repo.reset_collection()
    return artists_ngram_repo