a8fcf0d1d83e3d2999b94e14895b64e5e9ee9681,wsd.py,WSD,_disambiguate_context,#WSD#,85

Before Change


                print(scores)

        else:
            raise ValueError("Unknown context handling method "%s"" % self._ctx_method)

            // return sense (word//id), scores for senses
        return senses[np.argmax(scores)][0], scores

After Change


        context_vectors = [self._word_vectors[c] for c in context]
        if len(context_vectors) == 0:  // means we have no context
            mfs_sense_id, mfs_prob = self._sense_vectors.get_most_probable_sense(word, self._ignore_case)
            return mfs_sense_id, [p for s, p in senses] 

        // filter context vectors, if aplicable
        if self._max_context_words >= 0:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: uhh-lt/sensegram
Commit Name: a8fcf0d1d83e3d2999b94e14895b64e5e9ee9681
Time: 2018-03-21
Author: panchenko.alexander@gmail.com
File Name: wsd.py
Class Name: WSD
Method Name: _disambiguate_context


Project Name: librosa/librosa
Commit Name: 7ca0da3854c49f73bd2aae5592f1cf5a9f7177d4
Time: 2014-11-06
Author: brian.mcfee@nyu.edu
File Name: librosa/core.py
Class Name:
Method Name: note_to_midi


Project Name: pymanopt/pymanopt
Commit Name: 618c1cac7908e5aa61fd95e0d1c6c1f31a2db95d
Time: 2016-02-19
Author: niklas.koep@gmail.com
File Name: pymanopt/core/problem.py
Class Name: Problem
Method Name: backend