2c4a6e537126f4123de7c97f30587310d3712c06,allennlp/data/tokenizers/word_splitter.py,JustSpacesWordSplitter,split_words,#JustSpacesWordSplitter#Any#,114
Before Change
@overrides
def split_words(self, sentence: str) -> Tuple[List[str], List[Tuple[int, int]]]:
return sentence.split(), None
@WordSplitter.register("nltk")
class NltkWordSplitter(WordSplitter):
After Change
@overrides
def split_words(self, sentence: str) -> List[Token]:
return [Token(t) for t in sentence.split()]
@classmethod
def from_params(cls, params: Params) -> "WordSplitter":
params.assert_empty(cls.__name__)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: allenai/allennlp
Commit Name: 2c4a6e537126f4123de7c97f30587310d3712c06
Time: 2017-09-13
Author: mattg@allenai.org
File Name: allennlp/data/tokenizers/word_splitter.py
Class Name: JustSpacesWordSplitter
Method Name: split_words
Project Name: snipsco/snips-nlu
Commit Name: d3954738b162fb166ef6591edfd9bfb083544073
Time: 2017-07-20
Author: adrien.ball@snips.net
File Name: snips_nlu/tokenization.py
Class Name:
Method Name: tokenize
Project Name: allenai/allennlp
Commit Name: 2c4a6e537126f4123de7c97f30587310d3712c06
Time: 2017-09-13
Author: mattg@allenai.org
File Name: allennlp/data/tokenizers/word_splitter.py
Class Name: NltkWordSplitter
Method Name: split_words