TA的每日心情 | 无聊 昨天 00:00 |
---|
签到天数: 1441 天 [LV.10]以坛为家III
状元
- 积分
- 108575
|
本帖最后由 ohbit 于 2019-1-18 19:55 编辑
用python写了一个美剧词频脚本,可以用来DIY欧陆词典的单词本,比较粗糙,未考虑单词时态变化。
字幕来源 www.springfieldspringfield.co.uk
需要第三方库:pip install requests beautifulsoup4 lxml
使用方法:
比如要modern-family的词频:
https://www.springfieldspringfield.co.uk/episode_scripts.php?tv-show=modern-family
脚本提示TV show时输入modern-family
---------------------------------------
python3 word_frequency.py
TV show:modern-family
modern-family:found 222 episodes.
season 01 has 24 episodes
season 02 has 24 episodes
season 03 has 24 episodes
season 04 has 24 episodes
season 05 has 24 episodes
season 06 has 24 episodes
season 07 has 22 episodes
season 08 has 22 episodes
season 09 has 22 episodes
season 10 has 12 episodes
Regular expression filter(s01e01):
Enter to start...
Progress: 222\222
Done.
---------------------------------------
支持正则筛选,比如只统计Game of Thrones Episode的1,5季,可以用正则:s(01|05),不想筛选直接回车就行。
---------------------------------------
TV show:game-of-thrones
game-of-thrones:found 69 episodes.
season 01 has 10 episodes
season 02 has 10 episodes
season 03 has 10 episodes
season 04 has 10 episodes
season 05 has 11 episodes
season 06 has 10 episodes
season 07 has 8 episodes
Regular expression filter(s01e01):s(01|05)
After filterd:
season 01 has 10 episodes
season 05 has 11 episodes
Enter to start...
Progress: 21\21
Done.
---------------------------------------
稍加编辑,导入欧陆词典就可以开刷了。
|
-
-
word_frequency.zip
1.32 KB, 下载次数: 14, 下载积分: 米 -5 粒
售价: 29 粒米 [记录]
[购买]
python脚本
-
-
raising-hope_s1-s4.zip
55.24 KB, 下载次数: 3, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
-
-
brothers-and-sisters_s1-s5.zip
75.28 KB, 下载次数: 8, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
-
-
desperate-housewives_s1-s8.zip
88.18 KB, 下载次数: 4, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
-
-
parenthood_s1-s6.zip
62.49 KB, 下载次数: 3, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
-
-
felicity_s1-s4.zip
47.76 KB, 下载次数: 4, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
-
-
friends_s1-s10.zip
64.16 KB, 下载次数: 11, 下载积分: 米 -5 粒
-
-
breaking-bad_s1-s5.zip
45.44 KB, 下载次数: 3, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
-
-
modern-family_s1-s10.zip
101.39 KB, 下载次数: 4, 下载积分: 米 -5 粒
售价: 5 粒米 [记录]
[购买]
本帖被以下淘专辑推荐:
- · 语言态度|主题: 150, 订阅: 19
- · 其他资料|主题: 23, 订阅: 1
|