4b21300999e11ba6f91952c05a936ccec0673e2e,nltk/tokenize/treebank.py,TreebankWordTokenizer,span_tokenize,#TreebankWordTokenizer#Any#,147

Before Change


            else:
                real_token = word_token
            ix = text.find(real_token, ix)
            end = ix + len(real_token)
            spans.append((ix, end))
            ix = end

        return spans

After Change


        // treated as starting quotes).
        if (""" in text) or ("""" in text):
            // Find double quotes and converted quotes
            matched = [m.group() for m in re.finditer(r"``|"{2}|\"", text)]
            
            // Replace converted quotes back to double quotes
            tokens = [matched.pop(0) if tok in [""", "``", """"] else tok for tok in raw_tokens]
        else:
            tokens = raw_tokens

        return align_tokens(tokens, text)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: nltk/nltk
Commit Name: 4b21300999e11ba6f91952c05a936ccec0673e2e
Time: 2017-11-29
Author: lyyb46@gmail.com
File Name: nltk/tokenize/treebank.py
Class Name: TreebankWordTokenizer
Method Name: span_tokenize


Project Name: HazyResearch/fonduer
Commit Name: b4ec3ea5a927e5ff3736c180157d8a727b67107d
Time: 2018-09-20
Author: senwu@cs.stanford.edu
File Name: src/fonduer/candidates/mentions.py
Class Name: Ngrams
Method Name: apply


Project Name: coala/coala-bears
Commit Name: bfd61fb7a0c4456ce812a227f3b1962b2c727879
Time: 2016-09-03
Author: abdealikothari@gmail.com
File Name: bears/general/KeywordBear.py
Class Name: KeywordBear
Method Name: run