something that can not tell

作者回忆了与高中好友的深厚友谊,并分享了近期朋友们的生活进展,包括入职新工作、购房等重要时刻。
有时候感觉生活中的某些事情真的是被事先规划好了似的。今天一天,同时收到那么多消息。或许也是因为自己最近找工作的事情搞得没什么心情,跟兄弟们很久都没有联系了,所以才会瞬间得到这么多新消息吧。
和子告诉我他到中海油了,小星告诉我他竟然都在北京呆了两个月了。我问他为什么那么久才告诉我,答曰:“现在才有钱请我吃饭”。不晓得是不是玩笑话。如果是认真的,那也太见外了。我这个在北京待了有六七年的人竟然没有在他刚来时提供帮助,真是感到很不安。好在他说刚来时在北京有认识的人,我才稍稍放心了很多。因为我明白,独身一人来北京发展,的确不是那么容易的事。
和子是高二的同桌,一起去食堂吃了一年的饭,从那以后一直不分彼此,直到现在;小星是高三时的前后桌,一起去食堂吃了一年的饭,从那以后一直不分彼此,直到现在。时间真的很快,高中,显得那么遥远了。
QQ上雪飞告诉我自己在雍和宫买了房了。以后又多了个吃好东西的地方哈。
也不知道自己什么时候才能在北京买了房,买了车,找个lp。未可知,就作为努力的一种动力吧。
from nltk.chat.util import Chat # 修改反射字典:使用标准英语替换网络用语 reflections = { "am": "are", # 原"r"改为"are" "was": "were", "i": "you", # 原"u"改为"you" "i'd": "you'd", "i've": "you've", "ive": "you've", "i'll": "you'll", "my": "your", # 原"ur"改为"your" "are": "am", "you're": "I'm", "you've": "I've", "you'll": "I'll", "your": "my", "yours": "mine", "you": "me", "me": "you", # 删除非标准缩写:ur, urs, u } # 重写对话模板:移除网络用语和夸张表达 pairs = ( ( r"I\'m (.*)", ( "You're %1? That's interesting. Tell me more.", # 移除"kekekeke"和表情 "You're %1? That sounds nice.", # 简化表达 ), ), ( r"(.*) don\'t you (.*)", ( "Why do you think I can't %2?", # 改为完整疑问句 "What makes you say I can't %2?", "I probably could if I wanted to, don't you think?" ), ), (r"ye[as] [iI] (.*)", ("You %1? How did that happen?", "Why did you %1?", "I %1 too.")), ( r"do (you|u) (.*)\??", ("Do I %2? Sometimes, depending on the situation.", "I'm not sure. Do you %2?"), ), ( r"(.*)\?", ( "I'm curious why you asked that.", # 移除负面词汇"boring" "That's an interesting question.", ), ), ( r"(cos|because) (.*)", ("I see, that makes sense.", "That's a good reason.", "I understand."), ), ( r"why can\'t [iI] (.*)", ( "I'm not sure why you can't %1.", "Have you tried different approaches?", "When I can't do something, I usually practice more." ), ), ( r"I can\'t (.*)", ( "Why do you think you can't %1?", "That's okay, we all have limitations.", "Maybe with practice you could do it." ), ), ( r"(.*) (like|love|watch) anime", ( "I enjoy anime too. Do you have a favorite series?", # 移除夸张表达 "Anime is an interesting art form.", "What do you like most about anime?" ), ), ( r"I (like|love|watch|play) (.*)", ("That's nice. %2 can be enjoyable.", "Do you have other interests too?"), ), ( r"anime sucks|(.*) (hate|detest) anime", ( "Everyone has different tastes in entertainment.", "What kind of shows do you prefer instead?", ), ), ( r"(are|r) (you|u) (.*)", ("Why do you ask if I'm %3?", "What makes you wonder about that?"), ), ( r"what (.*)", ("I'm not sure about that.", "Could you tell me more about your question?"), ), (r"how (.*)", ("I'd prefer to talk about something else.",)), (r"(hi|hello|hey) (.*)", ("Hello! How are you today?",)), ( r"quit", ( "Goodbye! It was nice talking with you.", # 移除戏剧化表达 "Take care. Hope we can chat again sometime.", ), ), ( r"(.*)", ( "Could you tell me more about that?", "What are your thoughts on this topic?", "Do you enjoy any particular hobbies?", "I'm interested in your perspective." ), ), ) iesha_chatbot = Chat(pairs, reflections) def iesha_chat(): print("Iesha the Normal Chatbot\n---------") # 修改标题 print("Talk to the program by typing in plain English.") print('Enter "quit" when done.') print("=" * 72) print("Hello! I'm Iesha. What's your name?") # 标准化问候语 iesha_chatbot.converse() # 其余代码保持不变... 把她的对话模板变得更复杂
09-28
# Natural Language Toolkit: Teen Chatbot # # Copyright (C) 2001-2024 NLTK Project # Author: Selina Dennis <sjmd@csse.unimelb.edu.au> # URL: <https://www.nltk.org/> # For license information, see LICENSE.TXT """ This chatbot is a tongue-in-cheek take on the average teen anime junky that frequents YahooMessenger or MSNM. All spelling mistakes and flawed grammar are intentional. """ from nltk.chat.util import Chat reflections = { "am": "r", "was": "were", "i": "u", "i'd": "u'd", "i've": "u'v", "ive": "u'v", "i'll": "u'll", "my": "ur", "are": "am", "you're": "im", "you've": "ive", "you'll": "i'll", "your": "my", "yours": "mine", "you": "me", "u": "me", "ur": "my", "urs": "mine", "me": "u", } # Note: %1/2/etc are used without spaces prior as the chat bot seems # to add a superfluous space when matching. pairs = ( ( r"I\'m (.*)", ( "ur%1?? that's so cool! kekekekeke ^_^ tell me more!", "ur%1? neat!! kekeke >_<", ), ), ( r"(.*) don\'t you (.*)", ( r"u think I can%2??! really?? kekeke \<_\<", "what do u mean%2??!", "i could if i wanted, don't you think!! kekeke", ), ), (r"ye[as] [iI] (.*)", ("u%1? cool!! how?", "how come u%1??", "u%1? so do i!!")), ( r"do (you|u) (.*)\??", ("do i%2? only on tuesdays! kekeke *_*", "i dunno! do u%2??"), ), ( r"(.*)\?", ( "man u ask lots of questions!", "booooring! how old r u??", "boooooring!! ur not very fun", ), ), ( r"(cos|because) (.*)", ("hee! i don't believe u! >_<", "nuh-uh! >_<", "ooooh i agree!"), ), ( r"why can\'t [iI] (.*)", ( "i dunno! y u askin me for!", "try harder, silly! hee! ^_^", "i dunno! but when i can't%1 i jump up and down!", ), ), ( r"I can\'t (.*)", ( "u can't what??! >_<", "that's ok! i can't%1 either! kekekekeke ^_^", "try harder, silly! hee! ^&^", ), ), ( r"(.*) (like|love|watch) anime", ( "omg i love anime!! do u like sailor moon??! ^&^", "anime yay! anime rocks sooooo much!", "oooh anime! i love anime more than anything!", "anime is the bestest evar! evangelion is the best!", "hee anime is the best! do you have ur fav??", ), ), ( r"I (like|love|watch|play) (.*)", ("yay! %2 rocks!", "yay! %2 is neat!", "cool! do u like other stuff?? ^_^"), ), ( r"anime sucks|(.*) (hate|detest) anime", ( "ur a liar! i'm not gonna talk to u nemore if u h8 anime *;*", "no way! anime is the best ever!", "nuh-uh, anime is the best!", ), ), ( r"(are|r) (you|u) (.*)", ("am i%1??! how come u ask that!", "maybe! y shud i tell u?? kekeke >_>"), ), ( r"what (.*)", ("hee u think im gonna tell u? .v.", "booooooooring! ask me somethin else!"), ), (r"how (.*)", ("not tellin!! kekekekekeke ^_^",)), (r"(hi|hello|hey) (.*)", ("hi!!! how r u!!",)), ( r"quit", ( "mom says i have to go eat dinner now :,( bye!!", "awww u have to go?? see u next time!!", "how to see u again soon! ^_^", ), ), ( r"(.*)", ( "ur funny! kekeke", "boooooring! talk about something else! tell me wat u like!", "do u like anime??", "do u watch anime? i like sailor moon! ^_^", "i wish i was a kitty!! kekekeke ^_^", ), ), ) iesha_chatbot = Chat(pairs, reflections) def iesha_chat(): print("Iesha the TeenBoT\n---------") print("Talk to the program by typing in plain English, using normal upper-") print('and lower-case letters and punctuation. Enter "quit" when done.') print("=" * 72) print("hi!! i'm iesha! who r u??!") iesha_chatbot.converse() def demo(): iesha_chat() if __name__ == "__main__": demo() 把她的说话风格变得和正常人一样
09-28
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值