Skip to content

Commit b56bfab

Browse files
[投稿] 添加脚本: flight — by ioo
1 parent 42b0790 commit b56bfab

1 file changed

Lines changed: 69 additions & 0 deletions

File tree

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
import random
2+
import time
3+
words = {
4+
"prep": ['在', '于', '从', '自', '往', '向', '朝', '沿', '顺', '对', '为', '给', '替', '跟', '和', '同', '以', '用', '凭', '靠', '因', '除', '比'],
5+
"noun":[
6+
"猫", "狗", "鱼", "鸟", "兔子", "仓鼠",
7+
"手机", "电脑", "键盘", "鼠标", "耳机", "充电器",
8+
"咖啡", "奶茶", "可乐", "面包", "泡面", "火锅",
9+
"床", "沙发", "桌子", "椅子", "灯", "窗帘",
10+
"书", "笔", "本子", "试卷", "书包", "文件夹",
11+
"太阳", "月亮", "星星", "云", "雨", "风",
12+
"山", "河", "海", "树", "花", "草",
13+
"朋友", "老师", "同学", "老板", "同事", "家人",
14+
"游戏", "电影", "音乐", "小说", "漫画", "动画",
15+
"代码", "bug", "服务器", "数据库", "接口", "前端"
16+
],
17+
"verb": ['走', '跑', '跳', '飞', '爬', '游', '看', '听', '说', '读', '写', '吃', '喝', '穿', '戴', '拿', '放', '打', '骂', '推', '拉', '提', '扛', '想', '爱', '恨', '怕', '愁', '盼', '愿', '喜', '怒', '哀', '乐', '在', '有', '存', '留', '住', '停', '坐', '站', '躺', '卧', '变', '改', '换', '成', '长', '生', '死', '灭', '兴', '衰'],
18+
"pron": ['我', '我们', '咱们', '你', '您', '你们', '他', '她', '它', '他们', '她们', '它们', '大家', '大伙儿', '别人', '人家'],
19+
"adv": ['都', '就', '才', '只', '也', '再', '又', '还', '正', '刚', '先', '老', '总', '常', '已', '早', '晚', '快', '慢', '好', '真', '最', '更', '越', '极', '偏', '竟'],
20+
"adj": [
21+
"大", "小", "多", "少", "好", "坏",
22+
"高", "低", "快", "慢", "新", "旧",
23+
"红", "绿", "黑", "白", "美", "丑",
24+
"长", "短", "冷", "热", "轻", "重"],
25+
"other":["是","很","太"],
26+
"ve":["的"],
27+
"sound":["吧","啊","啊"],
28+
"func":[",","。","?","!"],
29+
30+
}
31+
collocation = {
32+
"prep": ["pron", "noun", "verb","ve"],
33+
"verb": ["noun", "prep",
34+
"adv","noun","noun","noun","pron","other","ve"],
35+
"adj": ["ve","sound"],
36+
"adv": ["verb"],
37+
"noun": ['prep',"other","ve"],
38+
"pron": ["verb","other"],
39+
"other":["adj"],
40+
"ve":["noun","sound"]
41+
}
42+
word=["prep","verb","adj","adv","noun","pron","other","ve","sound"]
43+
now="pron"
44+
text=""
45+
def wordrand():
46+
global now
47+
global text
48+
now_word=words.get(now)
49+
rand_word=random.randint(1,len(now_word))-1
50+
text+=now_word[rand_word]
51+
now_list=collocation.get(now)
52+
if not now_list:return ""
53+
#print(now_list)#这行没*用
54+
rand_type=random.randint(1,len(now_list))-1
55+
now=now_list[rand_type]
56+
#¯\_(ツ)_/¯oiia
57+
for t in range(random.randint(5,5)):
58+
now="pron"
59+
text=""
60+
for i in range(random.randint(5,8)):
61+
#print(now)
62+
if now != "sound":
63+
wordrand()
64+
else:
65+
wordrand()
66+
now="pron"
67+
break
68+
text+=words["func"][random.randint(0,3)]
69+
print(text)

0 commit comments

Comments
 (0)