mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 01:46:28 +03:00
Fix formatting
This commit is contained in:
parent
d730eb0c0d
commit
3ea23a3f4d
|
@ -17,6 +17,7 @@ class Japanese(Language):
|
||||||
try:
|
try:
|
||||||
from janome.tokenizer import Tokenizer
|
from janome.tokenizer import Tokenizer
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError("The Japanese tokenizer requires the Janome library: https://github.com/mocobeta/janome")
|
raise ImportError("The Japanese tokenizer requires the Janome library: "
|
||||||
|
"https://github.com/mocobeta/janome")
|
||||||
words = [x.surface for x in Tokenizer().tokenize(text)]
|
words = [x.surface for x in Tokenizer().tokenize(text)]
|
||||||
return Doc(self.vocab, words=words, spaces=[False]*len(words))
|
return Doc(self.vocab, words=words, spaces=[False]*len(words))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user