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")
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: 6
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: 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
Project Name: allenai/allennlp
Commit Name: 2c4a6e537126f4123de7c97f30587310d3712c06
Time: 2017-09-13
Author: mattg@allenai.org
File Name: allennlp/data/tokenizers/character_tokenizer.py
Class Name: CharacterTokenizer
Method Name: tokenize