0a2a023816745921e438cd6eebf183d36d518b9e,pytext/metric_reporters/seq2seq_compositional.py,Seq2SeqCompositionalMetricReporter,stringify_annotation_tree,#Seq2SeqCompositionalMetricReporter#Any#Any#,170

Before Change


    def stringify_annotation_tree(self, tree_tokens, tree_vocab):
        stringified_tree_str = stringify(tree_tokens, tree_vocab._vocab)
        try:
            tree = Annotation(
                stringified_tree_str.upper(),
                accept_flat_intents_slots=self.accept_flat_intents_slots,
            ).tree
        except (ValueError, IndexError):
            tree = Annotation(INVALID_TREE_STR).tree
        return tree

    def batch_context(self, raw_batch, batch):
        return {
            DatasetFieldName.RAW_SEQUENCE: [

After Change



    def stringify_annotation_tree(self, tree_tokens, tree_vocab):
        stringified_tree_str = stringify(tree_tokens, tree_vocab._vocab)
        return self.get_annotation_from_string(stringified_tree_str)

    def get_annotation_from_string(self, stringified_tree_str: str) -> Annotation:
        try:
            tree = Annotation(
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: facebookresearch/pytext
Commit Name: 0a2a023816745921e438cd6eebf183d36d518b9e
Time: 2020-04-21
Author: akshats@fb.com
File Name: pytext/metric_reporters/seq2seq_compositional.py
Class Name: Seq2SeqCompositionalMetricReporter
Method Name: stringify_annotation_tree


Project Name: keiffster/program-y
Commit Name: 0e52ba335afc136f40d9ed60e03fcafca07527e4
Time: 2020-01-09
Author: keith@keithsterling.com
File Name: src/programy/spelling/autocorrection.py
Class Name: AutoCorrectSpellingChecker
Method Name: correct


Project Name: geekcomputers/Python
Commit Name: 45b6cc3b98cc72068ccc0ae0a1564b9adb888f07
Time: 2017-10-23
Author: fares.bessrour@gmail.com
File Name: random-sentences.py
Class Name:
Method Name: random_sentence


Project Name: pantsbuild/pants
Commit Name: 65c65e248f1f8dc0cf5daa98aa6f11566b05c314
Time: 2014-06-11
Author: tien@squareup.com
File Name: src/python/pants/backend/codegen/tasks/protobuf_gen.py
Class Name:
Method Name: camelcase