Skip to content

Commit cc8e8dc

Browse files
committed
NLP中文文本相似性计算,余弦相似度计算分析示例
1 parent 743bd2f commit cc8e8dc

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

_posts/2022/2022-06/2022-06-27-NLP-中文分词-文本相似度-余弦相似度.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@ author: Franklinfang
1515

1616
- 余弦定理
1717

18-
![image](https://github.com/frankdevhub/frankdevhub.github.io/blob/master/_posts/2022/2022-06/20267488-8c050a854764cb75.jpg)
18+
![image](https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2022/2022-06/20267488-8c050a854764cb75.jpg)
1919

2020
以二维空间为例,上图的a和b是两个向量,我们要计算它们的夹角θ。余弦定理告诉我们,可以用下面的公式求得:
2121

2222
- 三角形的余弦公式
2323

24-
![image](https://github.com/frankdevhub/frankdevhub.github.io/blob/master/_posts/2022/2022-06/20267488-9f823d91cf6090ad.jpg)
24+
![image](https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2022/2022-06/20267488-9f823d91cf6090ad.jpg)
2525

2626
余弦的这种计算方法对n维向量也成立。假定A和B是两个n维向量,A是 [A1, A2, …, An] ,B是 [B1, B2, …, Bn] ,则A与B的夹角θ的余弦等于:
2727

2828
- N维向量的余弦定理
2929

30-
![image](https://github.com/frankdevhub/frankdevhub.github.io/blob/master/_posts/2022/2022-06/20267488-ef9a62890a92b969.jpg)
30+
![image](https://raw.githubusercontent.com/frankdevhub/frankdevhub.github.io/master/_posts/2022/2022-06/20267488-ef9a62890a92b969.jpg)
3131

3232

3333

0 commit comments

Comments
 (0)