52d69d629e9083fdd4e5ff14e2c52d727bfd9335,nala/preprocessing/tokenizers.py,NLTKTokenizer,tokenize,#NLTKTokenizer#Any#,26

Before Change


        :type dataset: nala.structures.data.Dataset
        
        for part in dataset.parts():
            part.sentences = [[Token(word) for word in word_tokenize(sentence)] for sentence in part.sentences]


class TmVarTokenizer(Tokenizer):
    

After Change


        for part in dataset.parts():
            so_far = 0
            for index, sentence in enumerate(part.sentences):
                part.sentences[index] = []
                for token_word in word_tokenize(sentence):
                    token_start = part.text.find(token_word, so_far)
                    so_far = token_start + len(token_word)
                    part.sentences[index].append(Token(token_word, token_start))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: Rostlab/nalaf
Commit Name: 52d69d629e9083fdd4e5ff14e2c52d727bfd9335
Time: 2015-08-28
Author: aleksandar.bojchevski@gmail.com
File Name: nala/preprocessing/tokenizers.py
Class Name: NLTKTokenizer
Method Name: tokenize


Project Name: Rostlab/nalaf
Commit Name: 52d69d629e9083fdd4e5ff14e2c52d727bfd9335
Time: 2015-08-28
Author: aleksandar.bojchevski@gmail.com
File Name: nala/preprocessing/tokenizers.py
Class Name: TmVarTokenizer
Method Name: tokenize


Project Name: snipsco/snips-nlu
Commit Name: d264e82050700d9aaed31c11dbd65f9dbd03e4d9
Time: 2017-04-25
Author: adrien.ball@snips.net
File Name: snips_nlu/tokenization.py
Class Name:
Method Name: tokenize


Project Name: Rostlab/nalaf
Commit Name: 52d69d629e9083fdd4e5ff14e2c52d727bfd9335
Time: 2015-08-28
Author: aleksandar.bojchevski@gmail.com
File Name: nala/preprocessing/tokenizers.py
Class Name: NLTKTokenizer
Method Name: tokenize


Project Name: allenai/allennlp
Commit Name: f4eef6eeb5e11cc0464d01dd812b6a869405e8d0
Time: 2018-07-17
Author: joelgrus@gmail.com
File Name: allennlp/tests/data/token_indexers/elmo_indexer_test.py
Class Name: TestELMoTokenCharactersIndexer
Method Name: test_elmo_as_array_produces_token_sequence