回答編集履歴
1
Update
answer
CHANGED
@@ -13,14 +13,14 @@
|
|
13
13
|
ウォズニアックが開発したパーソナルコンピュータ、Apple Iを開発・販売していたが、
|
14
14
|
ウェインは12日以内に自分の持ち分をジョブズとウォズニアックに売り戻した[19][20]。
|
15
15
|
ジョブズのガレージは製造したコンピュータの動作確認や納品のために使用されていた [21][22]。
|
16
|
-
'''
|
16
|
+
'''.strip()
|
17
17
|
|
18
18
|
text2 = '''
|
19
19
|
Apple(アップル)は1976/4/1/にスティーブ・ジョブズ、スティーブ・ウォズニアック、ロナルド・ウェイン(英語版)の3人で設立され、
|
20
20
|
ウォズニアックが開発したパーソナルコンピュータ、Apple Iを開発・販売していたが、
|
21
21
|
(中略)
|
22
22
|
ジョブズのガレージは製造したコンピュータの動作確認や納品のために使用されていた [21][22]。
|
23
|
-
'''
|
23
|
+
'''.strip()
|
24
24
|
|
25
25
|
nlp = spacy.load('ja_core_news_sm')
|
26
26
|
|
@@ -30,8 +30,12 @@
|
|
30
30
|
print(text1.similarity(text2))
|
31
31
|
|
32
32
|
#
|
33
|
-
UserWarning: [W007] The model you're using has no word vectors loaded, so the result of the
|
33
|
+
UserWarning: [W007] The model you're using has no word vectors loaded, so the result of the
|
34
|
+
Doc.similarity method will be based on the tagger, parser and NER, which may not give useful
|
35
|
+
similarity judgements. This may happen if you're using one of the small models,
|
36
|
+
e.g. `en_core_web_sm`, which don't ship with word vectors and only use context-sensitive tensors.
|
37
|
+
You can always add your own word vectors, or use one of the larger models instead if available.
|
34
38
|
print(text1.similarity(text2))
|
35
39
|
|
36
|
-
0.
|
40
|
+
0.9702315447787564
|
37
41
|
```
|