de83e84dd87aef0dea564de76c648c72d0f6b5a1,conceptnet5/vectors/evaluation/analogy.py,,analogy_func,#,139
Before Change
def analogy_func(frame, a1, b1, a2):
return get_vector(frame, b1) - get_vector(frame, a1) + get_vector(frame, a2)
def pairwise_analogy_func(wrap, a1, b1, a2, b2, weight_direct, weight_transpose):
va1 = wrap.get_vector(a1)
After Change
va1 = wrap.get_vector(a1)
vb1 = wrap.get_vector(b1)
va2 = wrap.get_vector(a2)
return (
(vb1 - va1) * weight_direct +
(va2 - va1) * weight_transpose +
vb1
)
def best_analogy_3cosmul(wrap, subframe, a1, b1, a2):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances
Project Name: commonsense/conceptnet5
Commit Name: de83e84dd87aef0dea564de76c648c72d0f6b5a1
Time: 2017-04-05
Author: rob@luminoso.com
File Name: conceptnet5/vectors/evaluation/analogy.py
Class Name:
Method Name: analogy_func
Project Name: commonsense/conceptnet5
Commit Name: de83e84dd87aef0dea564de76c648c72d0f6b5a1
Time: 2017-04-05
Author: rob@luminoso.com
File Name: conceptnet5/vectors/evaluation/analogy.py
Class Name:
Method Name: analogy_func