afef07922d8a5070e1afd54ee53b210c6b3ec527,finetune/target_models/sequence_labeling.py,SequenceLabeler,_predict,#SequenceLabeler#Any#Any#Any#,214

Before Change



            proba_seq_masked = proba_seq.copy()
            for il, label in enumerate(label_seq):
                label_idx = self.input_pipeline.label_encoder.classes_.index(label)
                proba_seq_masked[il:, label_idx] = 0.0
            doc_level_probas.append(np.max(proba_seq_masked, axis=0))

            for label, start_idx, end_idx, proba in zip(

After Change


        elif return_negative_probs:
            classes = self.input_pipeline.label_encoder.classes_
            output = []
            for anno, probas in zip(doc_annotations, all_doc_level_probas):
                output.append(
                    {
                        "prediction": anno,
                        "negative_probs": dict(zip(classes, probs))
                    }
                )
            return output
        else:
            return doc_annotations
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: IndicoDataSolutions/finetune
Commit Name: afef07922d8a5070e1afd54ee53b210c6b3ec527
Time: 2020-10-15
Author: benlt@hotmail.co.uk
File Name: finetune/target_models/sequence_labeling.py
Class Name: SequenceLabeler
Method Name: _predict


Project Name: WZBSocialScienceCenter/tmtoolkit
Commit Name: 994004cca3b3153cc9c5b2d1ff0f6c4ba1b3cd13
Time: 2020-01-29
Author: markus.konrad@wzb.eu
File Name: tmtoolkit/preprocess/_preprocworker.py
Class Name: PreprocWorker
Method Name: _task_lemmatize


Project Name: hyperopt/hyperopt
Commit Name: 8e3239f05f48b10b63332662fc3f80e9fff1220d
Time: 2012-03-01
Author: james.bergstra@gmail.com
File Name: hyperopt/vectorize.py
Class Name:
Method Name: idxs_map