mirror of
https://github.com/explosion/spaCy.git
synced 2025-02-03 21:24:11 +03:00
Merge branch 'develop' of https://github.com/explosion/spaCy into develop
This commit is contained in:
commit
18f1c1d0ba
|
@ -33,8 +33,7 @@ class Japanese(Language):
|
||||||
Defaults = JapaneseDefaults
|
Defaults = JapaneseDefaults
|
||||||
|
|
||||||
def make_doc(self, text):
|
def make_doc(self, text):
|
||||||
words = self.tokenizer(text)
|
return self.tokenizer(text)
|
||||||
return Doc(self.vocab, words=words, spaces=[False]*len(words))
|
|
||||||
|
|
||||||
|
|
||||||
__all__ = ['Japanese']
|
__all__ = ['Japanese']
|
||||||
|
|
18
spacy/lang/ja/examples.py
Normal file
18
spacy/lang/ja/examples.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# coding: utf8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Example sentences to test spaCy and its language models.
|
||||||
|
|
||||||
|
>>> from spacy.lang.ja.examples import sentences
|
||||||
|
>>> docs = nlp.pipe(sentences)
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
sentences = [
|
||||||
|
'アップルがイギリスの新興企業を10億ドルで購入を検討',
|
||||||
|
'自動運転車の損害賠償責任、自動車メーカーに一定の負担を求める',
|
||||||
|
'歩道を走る自動配達ロボ、サンフランシスコ市が走行禁止を検討',
|
||||||
|
'ロンドンはイギリスの大都市です。'
|
||||||
|
]
|
18
spacy/lang/zh/examples.py
Normal file
18
spacy/lang/zh/examples.py
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# coding: utf8
|
||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
|
||||||
|
"""
|
||||||
|
Example sentences to test spaCy and its language models.
|
||||||
|
|
||||||
|
>>> from spacy.lang.zh.examples import sentences
|
||||||
|
>>> docs = nlp.pipe(sentences)
|
||||||
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
sentences = [
|
||||||
|
"蘋果公司正考量用一億元買下英國的新創公司",
|
||||||
|
"自駕車將保險責任歸屬轉移至製造商",
|
||||||
|
"舊金山考慮禁止送貨機器人在人行道上行駛",
|
||||||
|
"倫敦是英國的大城市"
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user