コード例 #1
0
ファイル: run.py プロジェクト: windowsyuli/cross_domain
def index_content():
    qq_index = make_index("pre_data/QQ", "data/QQ/qqlabel", "pre_data/QQ_dic")
    qq_index.process_index()

    sina_index = make_index("pre_data/Sina", "data/Sina/sinalabel",
                            "pre_data/Sina_dic")
    sina_index.process_index()

    reddit_st_index = make_index("pre_data/Reddit_st",
                                 "data/Reddit_st/redditlabel",
                                 "pre_data/Reddit_st_dic")
    reddit_st_index.process_index()

    reddit_pw_index = make_index("pre_data/Reddit_pw",
                                 "data/Reddit_pw/redditlabel",
                                 "pre_data/Reddit_pw_dic")
    reddit_pw_index.process_index()

    # source target source_dic source->target
    transform("pre_data/Sina_dic", "pre_data/QQ_dic",
              "pre_data/Sina_dic_trans", "pre_data/Sina--QQ_trans")
    transform("pre_data/QQ_dic", "pre_data/Sina_dic", "pre_data/QQ_dic_trans",
              "pre_data/QQ--Sina_trans")
    transform("pre_data/Reddit_st_dic", "pre_data/Reddit_pw_dic",
              "pre_data/Reddit_st_dic_trans", "pre_data/Reddit_st--pw_trans")
    transform("pre_data/Reddit_pw_dic", "pre_data/Reddit_st_dic",
              "pre_data/Reddit_pw_dic_trans", "pre_data/Reddit_pw--st_trans")
コード例 #2
0
def index_content():
    qq_index = make_index("pre_data/QQ", "data/QQ/qqlabel", "pre_data/QQ_dic")
    qq_index.process_index()

    sina_index = make_index("pre_data/Sina", "data/Sina/sinalabel",
                            "pre_data/Sina_dic")
    sina_index.process_index()

    reddit_index = make_index("pre_data/Reddit", "data/Reddit/redditlabel",
                              "pre_data/Reddit_dic")
    reddit_index.process_index()

    transform("pre_data/Reddit_dic", "pre_data/QQ_dic",
              "pre_data/Reddit_dic_trans", "pre_data/Reddit_QQ_trans")
    transform("pre_data/Reddit_dic", "pre_data/Sina_dic",
              "pre_data/Reddit_dic_trans", "pre_data/Reddit_Sina_trans")