-4
在python中,我該如何開發此算法來查找數組中文本的常見模式,並說這些是這些項目出現的次數。python查找數組中的所有常見模式
For ex:
line_arr=""" :)hello hi there,My name is 'pixel' can i speak to 'Tom'
Hi, tom here :) 'pixel'
how are u doing today.
i just called to ask whats the cost of the microwae oven is it $50 or $60
it is $75
any d $iscounts on this..
10% to 30%"""
reg_dict={}
for l in line_arr:
#find all common patterns and update it in an dictionary
我們可以得到所有的表情,在單引號的名字,currecncy開始$和percentages..Also如果有更多的共同things.and說,我們在這dictionary..Is可能在所有更新這個..
它的一個非常複雜的程序,所以我沒有提及它..... – Rajeev 2012-04-03 11:40:32