{"id":256,"date":"2016-04-15T19:45:55","date_gmt":"2016-04-15T17:45:55","guid":{"rendered":"http:\/\/yellingstone.info\/?p=256"},"modified":"2016-04-22T18:25:18","modified_gmt":"2016-04-22T16:25:18","slug":"%e6%8a%93%e5%8f%96%e5%90%ab%e6%9c%89%e7%89%b9%e5%ae%9a%e6%97%b6%e6%80%81%e6%a0%87%e7%ad%be%e7%9a%84%e4%be%8b%e5%8f%a5","status":"publish","type":"post","link":"http:\/\/yellingstone.info\/?p=256","title":{"rendered":"\u6293\u53d6\u65af\u74e6\u5e0c\u91cc\u8bed\u4e2d\u542b\u6709\u7279\u5b9a\u65f6\u6001\u6807\u7b7e\u7684\u4f8b\u53e5"},"content":{"rendered":"<p>\u56e0\u4e3a\u5199\u4e00\u7bc7\u5173\u4e8e\u65af\u74e6\u5e0c\u91cc\u8bed\uff08\u4ee5\u4e0b\u7b80\u79f0\u65af\u8bed\uff09-ki-\u65f6\u6001\u7684\u8bba\u6587\uff0c\u6240\u4ee5\u60f3\u5728\u6587\u672c\u5e93\u4e2d\u641c\u7d22\u6240\u6709-ki-\u51fa\u73b0\u7684\u4f8b\u5b50\uff0c\u597d\u53c2\u8003\u4e00\u4e0b\u4e0a\u4e0b\u6587\u3002<a href=\"http:\/\/www.laurenceanthony.net\/software\/antconc\/\">AntConc<\/a> \u662f\u53ef\u4ee5\u5b8c\u6210\u8fd9\u4e2a\u4efb\u52a1\u7684\uff0c\u4f46\u662f\u6211\u89c9\u5f97\u7528 Python \u53ef\u80fd\u66f4\u65b9\u4fbf\u3002\u5177\u4f53\u7684\u505a\u6cd5\u662f\u5c06\u6574\u6bb5\u8bdd\u5148\u7528<code>split<\/code>\u65ad\u5f00\uff0c\u7136\u540e\u6bcf\u4e00\u4e2a\u5355\u8bcd\u67e5\u770b\u5176\u662f\u4e0d\u662f\u5305\u542b\u52a8\u8bcd\u8bcd\u5e72\uff08\u5982\u4f55\u751f\u6210\u65af\u8bed\u52a8\u8bcd\u8bcd\u5e72\u7684\u5217\u8868\u89c1<a href=\"http:\/\/yellingstone.info\/?p=84\">\u8fd9\u91cc<\/a>\uff09\uff0c\u5982\u679c\u65e2\u5305\u542b\u52a8\u8bcd\u8bcd\u5e72\u5e76\u4e14\u5728\u5355\u8bcd\u7684\u524d\u56db\u4f4d\u91cc\u51fa\u73b0\u4e86-ki-\u7684\u6807\u7b7e\uff0c\u5219\u6536\u5f55\u4e00\u4e0b\u3002<!--more--><\/p>\n<p>[code language=&#8221;python&#8221;]<br \/>\nmyfile=open(&quot;I.txt&quot;)<br \/>\nmydict=open(&quot;verb_stems.txt&quot;)<br \/>\ndictF=mydict.read()<br \/>\ndict=dictF.split()<br \/>\nline=myfile.readline()<br \/>\nnewfile=open(&quot;I_new.txt&quot;,&quot;w&quot;)<br \/>\nnewfile.write(line)<br \/>\npop=[]<br \/>\njunk=[&quot;hakika&quot;,&quot;akili&quot;]<br \/>\nwhile line:<br \/>\n\twords=line.split()<br \/>\n\tfor word in words:<br \/>\n\t\tword=word.strip(&quot;.,!?&quot;)<br \/>\n\t\tif word not in junk:<br \/>\n\t\t\tfor l in dict:<br \/>\n\t\t\t\tlL=len(l)<br \/>\n\t\t\t\twL=len(word)<br \/>\n\t\t\t\t#find word which contains verb stem&quot;<br \/>\n\t\t\t\tif word.rfind(l)&gt;2 and wL-lL-word.rfind(l)&lt;=2 and len(word)&gt;=5:<br \/>\n\t\t\t\t\tif &quot;ki&quot; in word[1:4]:<br \/>\n\t\t\t\t\t\tprint &quot;found &quot;+l+&quot; in dictionary&quot;<br \/>\n\t\t\t\t\t\tprint &quot;for the word: &quot;+word<br \/>\n\t\t\t\t\t\tprint &quot;phrase is &quot;+word[word.rfind(l):]<br \/>\n\t\t\t\t\t\tprint &quot;the preceding sequense is &quot;+word[:word.rfind(l)]+&quot; which contains &#8216;ki&#8217;&quot;<br \/>\n\t\t\t\t\t\tprint &quot;\\n&quot;<br \/>\n\t\t\t\t\t\tif line not in pop:<br \/>\n\t\t\t\t\t\t\tpop.append(line)<br \/>\n\tline=myfile.readline()<br \/>\nfor p in pop:<br \/>\n\tnewfile.write(p)<br \/>\n[\/code]<\/p>\n<p>\u901a\u8fc7\u8fd9\u79cd\u65b9\u6cd5\uff0c\u627e\u5230\u4e00\u53e5\u5f88\u6709\u8da3\u7684\u65af\u74e6\u5e0c\u91cc\u8bed\uff0c\u6709\u4e00\u79cd\u6b7b\u4f8d\u7684\u6f2b\u753b\u91cc\u548c\u9605\u8bfb\u8005\u4e92\u52a8\u7684\u5373\u65f6\u611f\u3002<\/p>\n<p><code>Walikuwa maskini, ukipenda waite maskini wa mwisho.<\/code><br \/>\n<code>\u201c\u4ed6\u4eec\u90a3\u65f6\u5f88\u7a77\uff0c\u5982\u679c\u4f60\u559c\u6b22\uff0c\u4f60\u53ef\u4ee5\u628a\u4ed6\u4eec\u53eb\u505a\u7a77\u5230\u5bb6\u4e86\u7684\u4eba\u3002\u201d<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u56e0\u4e3a\u5199\u4e00\u7bc7\u5173\u4e8e\u65af\u74e6\u5e0c\u91cc\u8bed\uff08\u4ee5\u4e0b\u7b80\u79f0\u65af\u8bed\uff09-ki-\u65f6\u6001\u7684\u8bba\u6587\uff0c\u6240\u4ee5\u60f3\u5728\u6587\u672c\u5e93\u4e2d\u641c\u7d22\u6240\u6709-ki-\u51fa\u73b0\u7684\u4f8b\u5b50\uff0c\u597d\u53c2\u8003\u4e00\u4e0b\u4e0a\u4e0b\u6587\u3002AntConc \u662f\u53ef\u4ee5\u5b8c\u6210\u8fd9\u4e2a\u4efb\u52a1\u7684\uff0c\u4f46\u662f\u6211\u89c9\u5f97\u7528 Python \u53ef\u80fd\u66f4\u65b9\u4fbf\u3002\u5177\u4f53\u7684\u505a\u6cd5\u662f\u5c06\u6574\u6bb5\u8bdd\u5148\u7528split\u65ad\u5f00\uff0c\u7136\u540e\u6bcf\u4e00\u4e2a\u5355\u8bcd\u67e5\u770b\u5176\u662f\u4e0d\u662f\u5305\u542b\u52a8\u8bcd\u8bcd\u5e72\uff08\u5982\u4f55\u751f\u6210\u65af\u8bed\u52a8\u8bcd\u8bcd\u5e72\u7684\u5217\u8868\u89c1\u8fd9\u91cc\uff09\uff0c\u5982\u679c\u65e2\u5305\u542b\u52a8\u8bcd\u8bcd\u5e72\u5e76\u4e14\u5728\u5355\u8bcd\u7684\u524d\u56db\u4f4d\u91cc\u51fa\u73b0\u4e86-ki-\u7684\u6807\u7b7e\uff0c\u5219\u6536\u5f55\u4e00\u4e0b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/yellingstone.info\/index.php?rest_route=\/wp\/v2\/posts\/256"}],"collection":[{"href":"http:\/\/yellingstone.info\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/yellingstone.info\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/yellingstone.info\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/yellingstone.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=256"}],"version-history":[{"count":0,"href":"http:\/\/yellingstone.info\/index.php?rest_route=\/wp\/v2\/posts\/256\/revisions"}],"wp:attachment":[{"href":"http:\/\/yellingstone.info\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/yellingstone.info\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/yellingstone.info\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}