028405190df7a8798b821d1fb1c28cb62f54d7d9,parlai/agents/drqa/agents.py,SimpleDictionaryAgent,span_tokenize,#SimpleDictionaryAgent#Any#,78

Before Change



    def span_tokenize(self, text):
        text = normalize_text(text)
        return [m.span() for m in self._regexp.finditer(text)]

    def add_to_dict(self, tokens):
        Builds dictionary from the list of provided tokens.

After Change



    def span_tokenize(self, text):
        tokens = NLP.tokenizer(text)
        return [(t.idx, t.idx + len(t.text)) for t in tokens]

    def add_to_dict(self, tokens):
        Builds dictionary from the list of provided tokens.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: facebookresearch/ParlAI
Commit Name: 028405190df7a8798b821d1fb1c28cb62f54d7d9
Time: 2017-05-12
Author: adamfisch15@gmail.com
File Name: parlai/agents/drqa/agents.py
Class Name: SimpleDictionaryAgent
Method Name: span_tokenize


Project Name: biolab/orange3
Commit Name: 8d4d199c35f5163ed21ae705a16ce3c8548d60c6
Time: 2012-11-28
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/data/io.py
Class Name: BasketReader
Method Name: prescan_file


Project Name: hanxiao/bert-as-service
Commit Name: 3618f2773407f7c6016940a6dca8c3e12565f6d8
Time: 2018-11-11
Author: hanhxiao@tencent.com
File Name: utils/sentence_split.py
Class Name: SentenceSplitter
Method Name: _split