Esempio n. 1
0
def loadData(catalog):
    catalog = model.initCatalog(catalog)
    infofile2 = cf.data_dir + 'context_content_features-small.csv'
    input_file2 = csv.DictReader(open(infofile2, encoding="utf-8"),
                                 delimiter=",")
    for event in input_file2:
        model.addEvent2(catalog, event)
        model.addEvent3(catalog, event)
    infofile1 = cf.data_dir + 'user_track_hashtag_timestamp-small.csv'
    input_file1 = csv.DictReader(open(infofile1, encoding="utf-8"),
                                 delimiter=",")
    for event in input_file1:
        model.addEvent1_v2(catalog, event)
    infofile3 = cf.data_dir + 'sentiment_values.csv'
    input_file3 = csv.DictReader(open(infofile3, encoding="utf-8"),
                                 delimiter=",")
    for event in input_file3:
        model.addEvent4(catalog, event)

    return catalog
def initCatalog():
    catalog = model.initCatalog()
    return catalog
def initCatalog():
    return model.initCatalog()