6ab79bff0c68cf1b6b58d8d43885de805d036cb4,experiment/wsd.py,WSD,dis_context,#WSD#Any#Any#,73

Before Change


		if len(senses)==0:
			return None
		probs = [self.__prob__(context, self.vs[sense]) for sense in senses]
		return senses[np.argmax(probs)], max(probs)
		// TODO: manage situation where senses is empty
// Example:
// text = "However , the term mouse can also be applied to species outside of this genus . Mouse often refers to any small muroid rodent , while rat refers to larger muroid rodents"

After Change


            return None 
        context = [ctx for ctx in context if ctx in self.vc] // this check happens in __prob__
        prob_dist = [self.__prob__(context, self.vs[sense]) for sense in senses]
        e_confidence = self.entropy(prob_dist)
        diff_confidence = self.diff_confidence(prob_dist)
        // return sense (word//id), probability, entropy confidence, differences confidence, prob_dist and length of context
        return senses[np.argmax(prob_dist)], prob_dist, e_confidence, diff_confidence, len(context)
// Example:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: uhh-lt/sensegram
Commit Name: 6ab79bff0c68cf1b6b58d8d43885de805d036cb4
Time: 2016-02-23
Author: m.pelevina@gmail.com
File Name: experiment/wsd.py
Class Name: WSD
Method Name: dis_context


Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 18022693482182082f178cd73fa3a3cfdecc160a
Time: 2018-05-02
Author: ikostrikov@gmail.com
File Name: model.py
Class Name: Policy
Method Name: evaluate_actions


Project Name: ikostrikov/pytorch-a2c-ppo-acktr
Commit Name: 18022693482182082f178cd73fa3a3cfdecc160a
Time: 2018-05-02
Author: ikostrikov@gmail.com
File Name: model.py
Class Name: Policy
Method Name: act


Project Name: scikit-learn-contrib/DESlib
Commit Name: a22defa871144b4e451364e0c2ba23db359d77f0
Time: 2020-02-09
Author: rafaelmenelau@gmail.com
File Name: deslib/util/prob_functions.py
Class Name:
Method Name: entropy_func