the sun also rises day 7

在Quai d'Orsay,一位战地记者与一位年轻的法国外交官进行了一场对话,期间讨论了关于Brett的话题,引发了Cohn的兴趣。然而,记者对Brett的评价引起争议,展现了其深藏不露的性格。

obligation (债务,责任)

bloom(开花)

1.i went over to  the quaid'Orsay in a taxi and went in and  sat with about dozen correspondents, while the foriegn-office mouthpiece , a young Nouvelle Revue Francaise diplomat in hornnimmed spectales, talked and answered questions for half an hour.
十一点钟,我打车前往Quaid'Orsay ,和我坐在一起的有十几个个战地记者,有一个是带着角质眼镜的年轻法国《新法兰西评论》外交官,连发言带回答用了半个钟。

2.lucky beggers. 幸运儿

3.i'm sorry, i've got a nasty tongue. i never mean it when i say nasty things.
我很抱歉,说话不太好听。但我说这些的时候心里真的都不是这么想的。

4. i could feel Cohn wanted to bring up brett again, but i held him off it.
我能感受到Cohn想要再次提起Brett, 但是我把话题岔开了

Jake goes to  work as usually, walks the street, cross the avenvue, up tothe elevator, there is no news. but when he to the office, he met Cohn, sho rises a great interesting to brett but awared nothing between jake and brett. firstly jake praises brett as a noce girl, but he got a nasty touge about brett, it anger Cohn, of course he takes it back when Chon got so anger. so we can tell that jake was that kind of person who hides his felling deeply.

 

要画出MapReduce对这两个文件进行单词统计的过程示意图,以下是各个步骤及对应的解释,可根据这些步骤来绘制示意图: ### 1. 输入分割 将两个文件分别进行分割,按照行进行切分。 - 文件1: - “East is a direction.” - “The sun rises in the east.” - “East is the opposite of west.” - 文件2: - “West is a direction.” - “The sun sets in the west.” - “West is the opposite of east.” ### 2. Map阶段 对每一行进行单词分割,并输出键值对(单词,1)。 - 对于文件1的第一行 “East is a direction.”,输出:(East, 1), (is, 1), (a, 1), (direction, 1) - 以此类推,对所有行进行处理。 ### 3. Map端排序 Map输出的键值对会按照键(单词)进行排序。例如,会将所有以 “a” 开头的单词放在一起,“b” 开头的单词放在一起,依此类推。 ### 4. Combine阶段 在Map端进行局部聚合,对相同键(单词)的值进行求和。例如,如果有多个 (East, 1),会合并为 (East, n),n 是 “East” 出现的次数。 ### 5. Shuffle阶段 将Map端的输出根据键(单词)分发到不同的Reduce任务中。例如,所有 “East” 的键值对会被发送到同一个Reduce任务。 ### 6. Reduce阶段 Reduce任务接收相同键(单词)的所有键值对,并对值进行求和。例如,接收 (East, 2), (East, 1) 会合并为 (East, 3)。 ### 7. Reduce端排序 Reduce输出的结果会按照键(单词)再次进行排序,最终得到按字母顺序排列的单词统计结果。 ### 代码示例(Python伪代码) ```python # Map函数 def map_function(line): words = line.split() for word in words: yield (word.lower(), 1) # Combine函数 def combine_function(key_values): word_count = {} for key, value in key_values: if key in word_count: word_count[key] += value else: word_count[key] = value for key, value in word_count.items(): yield (key, value) # Reduce函数 def reduce_function(key, values): total = sum(values) return (key, total) # 模拟输入文件 file1 = ["East is a direction.", "The sun rises in the east.", "East is the opposite of west."] file2 = ["West is a direction.", "The sun sets in the west.", "West is the opposite of east."] # Map阶段 map_output = [] for line in file1 + file2: for key, value in map_function(line): map_output.append((key, value)) # Map端排序 map_output.sort() # Combine阶段 combine_output = [] current_key = None current_values = [] for key, value in map_output: if current_key is None: current_key = key if key == current_key: current_values.append(value) else: for result in combine_function([(current_key, v) for v in current_values]): combine_output.append(result) current_key = key current_values = [value] # 处理最后一组 for result in combine_function([(current_key, v) for v in current_values]): combine_output.append(result) # Shuffle阶段(模拟) shuffled_output = {} for key, value in combine_output: if key not in shuffled_output: shuffled_output[key] = [] shuffled_output[key].append(value) # Reduce阶段 reduce_output = [] for key, values in shuffled_output.items(): result = reduce_function(key, values) reduce_output.append(result) # Reduce端排序 reduce_output.sort() print(reduce_output) ``` ### 示意图绘制建议 - 可以使用流程图工具(如Visio、Draw.io等)来绘制。 - 每个阶段用一个矩形框表示,并用箭头连接表示数据流向。 - 在每个阶段的框内详细标注该阶段的操作和数据变化。
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值