638810ae894784dec9d65abe156ea2fba11f289e,torchtext/experimental/transforms.py,BasicEnglishNormalize,__init__,#BasicEnglishNormalize#,42

Before Change


            (r"\:", " "),
            (r"\s+", " ")]

        regex_objects = map(lambda pattern_tuple: torch.classes.torchtext.Regex(pattern_tuple[0]), patterns_list)
        replacement_strings = map(lambda pattern_tuple: pattern_tuple[1], patterns_list)
        self.regex_and_replacement_string_pairs = list(zip(regex_objects, replacement_strings))

    def forward(self, line: str) -> List[str]:
        r
        Args:

After Change


            (r"\:", " "),
            (r"\s+", " ")]

        patterns = [pair[0] for pair in patterns_list]
        replacements = [pair[1] for pair in patterns_list]
        self.regex_tokenizer = torch.classes.torchtext.RegexTokenizer(patterns, replacements, True)

    def forward(self, line: str) -> List[str]:
        r
        Args:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: pytorch/text
Commit Name: 638810ae894784dec9d65abe156ea2fba11f289e
Time: 2020-08-07
Author: 22487263+Nayef211@users.noreply.github.com
File Name: torchtext/experimental/transforms.py
Class Name: BasicEnglishNormalize
Method Name: __init__


Project Name: pytorch/text
Commit Name: 638810ae894784dec9d65abe156ea2fba11f289e
Time: 2020-08-07
Author: 22487263+Nayef211@users.noreply.github.com
File Name: torchtext/experimental/transforms.py
Class Name: RegexTokenizer
Method Name: __init__


Project Name: rusty1s/pytorch_geometric
Commit Name: 48da7a82bc8b9bca8c503f436d982c816573291d
Time: 2017-10-29
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/pubmed.py
Class Name: PubMed
Method Name: _read