75e542becc20aaed0bbc377560501dde8cfc7509,src/entity2rel.py,,,#,187

Before Change



	start_time = time.time()

	args = entity2rel.parse_args()

	e2r = entity2rel(args.ground_truth)

	e2r.add_embedding(args.embedding)

	e2r.run()

After Change



    start_time = time.time()

    uri1 = "http://dbpedia.org/resource/Pulp_Fiction"

    uri2 = "http://dbpedia.org/resource/Jackie_Brown_(film)"

    uri3 = "http://dbpedia.org/resource/Romeo_and_Juliet_(1996_movie)"

    embedding1 = "emb/movielens_1m/feedback/num500_p1_q4_l10_d500_iter5_winsize10.emd"

    embedding2 = "emb/movielens_1m/dbo:director/num500_p1_q4_l10_d500_iter5_winsize10.emd"

    rel = Entity2Rel()

    rel.add_embedding(embedding1)
    rel.add_embedding(embedding2)

    print("\n")
    print("Relatedness between Pulp Fiction and Jackie Brown is:\n")
    scores = rel.relatedness_scores(uri1, uri2)
    for s in scores:
        print(s)
        print("\n")

    print("Relatedness between Pulp Fiction and Romeo and Juliet is:\n")
    scores = rel.relatedness_scores(uri1, uri3)

    for s in scores:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: D2KLab/entity2rec
Commit Name: 75e542becc20aaed0bbc377560501dde8cfc7509
Time: 2017-07-28
Author: enricopalumbo0@gmail.com
File Name: src/entity2rel.py
Class Name:
Method Name:


Project Name: pantsbuild/pants
Commit Name: efdb32a6d9a8aeea5f59100f1659583507f643b2
Time: 2014-11-10
Author: benjyw@gmail.com
File Name: src/python/pants/commands/goal_runner.py
Class Name: GoalRunner
Method Name: setup_parser


Project Name: deepmipt/DeepPavlov
Commit Name: 3de066d408d811db29161d90c1c81c43d08f7efc
Time: 2018-11-01
Author: yoptar@gmail.com
File Name: deeppavlov/download.py
Class Name:
Method Name: deep_download