首页/文章/ 详情

[算法] 计算一部电影的相似影片(MoiveIndex)

2年前浏览777


1 引言

在《一个集成的电影评分指标MovieIndex》中,提出了一个新的影片评价指标MovieIndex,本文继续讨论“找出一部影片的相似影片.py”代码的后半部分,根据一个字符串找出最接近的电影名称后,寻找与这部电影相似的电影,然后对每部电影计算MovieIndex, 并获取其关键字. 下面以一个实例演示这个代码是如何工作的。

基于大数据的疫情电影---你看过几部?

基于文档名称的相似度查询---以电影数据库为例

基于附加信息cast和genres的相似电影查询


2 带有MovieIndex的相似电影

以2020年的一部电影【A Quiet Place Part II (2020) 寂静之地2】为例,计算的MovieIndex为25.1. 

[25.1] A Quiet Place Part II (2020) 寂静之地2 [7.4/7.5/71/1048/84458] (97m) Drama|Horror|Sci-Fi|Thriller 

当得出这部电影的名称后,寻找相似的电影,结果如下:

(1) [63.7] A Quiet Place (2018) 寂静之地 [7.5/7.2/82/3139/450326] (90m)

Keywords: survival, sign language, deafness, silence, post apocalypse 


(2) [20.7] The Conjuring: The Devil Made Me Do It (2021) 招魂3 [6.3/6.4/53/1105/63797] (112m)

Keywords: the conjuring universe, demon, year 1981, third part, devil 


(4) [22.8] Wrath of Man (2021) 人之怒 [7.2/6.9/57/821/72851] (119m)

Keywords: revenge, truck, police, police officer, security 


(5) [29.3] Nobody (2021) 小人物 [7.4/7.6/64/1569/120824] (92m)

Keywords: fighting back, russian mafia, husband, black comedy, violence 


(6) [31.0] Godzilla vs. Kong (2021) 哥斯拉大战金刚[6.4/6.8/59/1980/152217] (113m)

Keywords: kaiju, monsterverse, giant monster, monster versus monster, godzilla character 


(7) [13.5] The Hitman's Wife's Bodyguard (2021) 杀手妻子的保镖[6.3/5.2/32/277/14373] (100m)

Keywords: sequel, buddy comedy, wisecrack humor, marriage, hitman 


(8) [25.3] The Tomorrow War (2021)  [6.7/6.6/45/2999/85295] (138m)

Keywords: time travel, soldier, alien invasion, alien, three word title

 

(9) [12.8] The Ice Road (2021) 冰路营救 [5.5/4.8/42/622/14878] (109m)

Keywords: diamond, mine, rescue, mission, ice 


(10) [63.9] The Conjuring (2013) 招魂[7.5/8.2/68/1187/463300] (112m)

Keywords: ghost, exorcism, possession, haunted house, supernatural power 


(11) [58.5] Tenet (2020) 信条 [7.4/7.2/69/5074/381536] (150m)

Keywords: time paradox, car chase, espionage, bearded man, car crash 


(12) [13.1] Infinite (2021) 无限 [5.4/5.1/28/522/17963] (106m)

Keywords: reincarnation, bullet dodging, deflecting bullets with sword, bomb on plane, russian roulette 


(13) [27.5] Mortal Kombat (2021) 真人快打 [6.2/6.3/44/2465/121415] (110m)

Keywords: reincarnation, bullet dodging, deflecting bullets with sword, bomb on plane, russian roulette 


(14) [14.3] No Sudden Move (2021) 切勿擅动 [6.6/5.8/77/176/9673] (115m)

Keywords: criminal, work, together, job, mysterious 


(15) A Quiet Place (2018)

(16) A Quiet Place (II) (2016)

(17) A Quiet Place Part II (2020)

(18) A Quiet Place Part III (2023)

(19) A Quiet Place to Kill (I) (1970)

(20) A Quiet Place in the Country (1968)


3 简化的相似电影算法

一个简化的寻找相似电影算法包括在代码latest-search-similar-movie.py中,这个算法不计算任何附加数据,只寻找相似电影,仍以“A Quiet Place”为例,其运行结果如下所示。

A Quiet Place Part II (2020); A Quiet Place (2018); A Quiet Place Part III (2023); A Quiet Place to Kill (1970); A Quiet Place in the Country (1968); A Quiet Place (2016); A Quiet Place (1986); A Quieter Place (None); The Conjuring (2013); Tenet (2020); Joker (2019); It (2017); Godzilla vs. Kong (2021); Get Out (2017); The Conjuring: The Devil Made Me Do It (2021); Avengers: Endgame (2019); Bird Box (2018); Once Upon a Time... in Hollywood (2019); The Shawshank Redemption (1994); The Dark Knight (2008); Interstellar (2014); Thor: Ragnarok (2017) 

来源:计算岩土力学
科普通用
著作权归作者所有,欢迎分享,未经许可,不得转载
首次发布时间:2022-11-19
最近编辑:2年前
计算岩土力学
传播岩土工程教育理念、工程分析...
获赞 151粉丝 1113文章 1782课程 0
点赞
收藏
未登录
还没有评论
课程
培训
服务
行家
VIP会员 学习计划 福利任务
下载APP
联系我们
帮助与反馈