锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲免费日韩无码系列,亚洲乱码日产精品一二三,亚洲精品乱码久久久久久下载 http://www.tkk7.com/nianzai/category/49304.htmlzh-cnThu, 04 Jul 2013 06:30:36 GMTThu, 04 Jul 2013 06:30:36 GMT60闅愰┈鍙か(HMM)涓枃鍒嗚瘝璇嶆ф爣娉ㄧ▼搴?/title><link>http://www.tkk7.com/nianzai/archive/2012/09/14/387740.html</link><dc:creator>nianzai</dc:creator><author>nianzai</author><pubDate>Fri, 14 Sep 2012 09:08:00 GMT</pubDate><guid>http://www.tkk7.com/nianzai/archive/2012/09/14/387740.html</guid><wfw:comment>http://www.tkk7.com/nianzai/comments/387740.html</wfw:comment><comments>http://www.tkk7.com/nianzai/archive/2012/09/14/387740.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/nianzai/comments/commentRss/387740.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/nianzai/services/trackbacks/387740.html</trackback:ping><description><![CDATA[     鎽樿: 鏈殣椹彲澶?HMM)涓枃鍒嗚瘝璇嶆ф爣娉ㄧ▼搴?涓殑 闅愰┈鍙か(HMM)姒傜巼妯″瀷 鏄敱 PFR浜烘皯鏃ユ姤鏍囨敞璇枡199801璇枡搴?鐢熸垚Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public class HMM{  ...  <a href='http://www.tkk7.com/nianzai/archive/2012/09/14/387740.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/nianzai/aggbug/387740.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/nianzai/" target="_blank">nianzai</a> 2012-09-14 17:08 <a href="http://www.tkk7.com/nianzai/archive/2012/09/14/387740.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏈澶ф鐜囧垎璇嶇▼搴?/title><link>http://www.tkk7.com/nianzai/archive/2012/08/31/386664.html</link><dc:creator>nianzai</dc:creator><author>nianzai</author><pubDate>Fri, 31 Aug 2012 02:12:00 GMT</pubDate><guid>http://www.tkk7.com/nianzai/archive/2012/08/31/386664.html</guid><wfw:comment>http://www.tkk7.com/nianzai/comments/386664.html</wfw:comment><comments>http://www.tkk7.com/nianzai/archive/2012/08/31/386664.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/nianzai/comments/commentRss/386664.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/nianzai/services/trackbacks/386664.html</trackback:ping><description><![CDATA[     鎽樿: 鏈澶ф鐜囧垎璇嶇▼搴忥紝鍦ㄦ墍鏈夊彲鑳藉垎璇嶈礬寰勪腑閫夋嫨姒傜巼鏈澶х殑涓鏉¤礬寰勬渶涓哄垎璇嶇粨鏋淐ode highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->public class MPM extends M{   &...  <a href='http://www.tkk7.com/nianzai/archive/2012/08/31/386664.html'>闃呰鍏ㄦ枃</a><img src ="http://www.tkk7.com/nianzai/aggbug/386664.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/nianzai/" target="_blank">nianzai</a> 2012-08-31 10:12 <a href="http://www.tkk7.com/nianzai/archive/2012/08/31/386664.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鏈鐭礬寰勫垎璇嶇▼搴?/title><link>http://www.tkk7.com/nianzai/archive/2012/08/24/386216.html</link><dc:creator>nianzai</dc:creator><author>nianzai</author><pubDate>Fri, 24 Aug 2012 06:57:00 GMT</pubDate><guid>http://www.tkk7.com/nianzai/archive/2012/08/24/386216.html</guid><wfw:comment>http://www.tkk7.com/nianzai/comments/386216.html</wfw:comment><comments>http://www.tkk7.com/nianzai/archive/2012/08/24/386216.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/nianzai/comments/commentRss/386216.html</wfw:commentRss><trackback:ping>http://www.tkk7.com/nianzai/services/trackbacks/386216.html</trackback:ping><description><![CDATA[ 鏈鐭礬寰勫垎璇嶆硶<div style="padding: 4px 5px 4px 4px; border: 1px solid rgb(204, 204, 204); width: 98%; font-size: 13px; word-break: break-all; background-color: rgb(238, 238, 238);"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" /><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">class</span><span style="color: rgb(0, 0, 0);"> SPM2 </span><span style="color: rgb(0, 0, 255);">extends</span><span style="color: rgb(0, 0, 0);"> M<br /><img id="Codehighlighter1_28_2603_Open_Image" onclick="this.style.display='none'; Codehighlighter1_28_2603_Open_Text.style.display='none'; Codehighlighter1_28_2603_Closed_Image.style.display='inline'; Codehighlighter1_28_2603_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif"><img style="display: none;" id="Codehighlighter1_28_2603_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_28_2603_Closed_Text.style.display='none'; Codehighlighter1_28_2603_Open_Image.style.display='inline'; Codehighlighter1_28_2603_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedBlock.gif"></span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_28_2603_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_28_2603_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">final</span><span style="color: rgb(0, 0, 0);"> HashMap</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Character,TreeNode</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> dic </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> Dictionary.loadFreqDictionary(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">sogou.txt</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /><img id="Codehighlighter1_132_173_Open_Image" onclick="this.style.display='none'; Codehighlighter1_132_173_Open_Text.style.display='none'; Codehighlighter1_132_173_Closed_Image.style.display='inline'; Codehighlighter1_132_173_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_132_173_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_132_173_Closed_Text.style.display='none'; Codehighlighter1_132_173_Open_Image.style.display='inline'; Codehighlighter1_132_173_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_132_173_Closed_Text">/** */</span><span id="Codehighlighter1_132_173_Open_Text"><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />     * </span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"> 榪斿洖鍙兘鍖歸厤璇嶇殑闀垮害, 娌℃湁鎵懼埌榪斿洖 0.<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />     </span><span style="color: rgb(0, 128, 0);">*/</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> maxMatch(TreeNode node,</span><span style="color: rgb(0, 0, 255);">char</span><span style="color: rgb(0, 0, 0);">[] sen, </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> offset) <br /><img id="Codehighlighter1_251_499_Open_Image" onclick="this.style.display='none'; Codehighlighter1_251_499_Open_Text.style.display='none'; Codehighlighter1_251_499_Closed_Image.style.display='inline'; Codehighlighter1_251_499_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_251_499_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_251_499_Closed_Text.style.display='none'; Codehighlighter1_251_499_Open_Image.style.display='inline'; Codehighlighter1_251_499_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_251_499_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_251_499_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> list</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">();<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">offset; i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">sen.length; i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">) <br /><img id="Codehighlighter1_347_481_Open_Image" onclick="this.style.display='none'; Codehighlighter1_347_481_Open_Text.style.display='none'; Codehighlighter1_347_481_Closed_Image.style.display='inline'; Codehighlighter1_347_481_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_347_481_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_347_481_Closed_Text.style.display='none'; Codehighlighter1_347_481_Open_Image.style.display='inline'; Codehighlighter1_347_481_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_347_481_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_347_481_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            node </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> node.subNode(sen[i]);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(node </span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">) <br /><img id="Codehighlighter1_405_457_Open_Image" onclick="this.style.display='none'; Codehighlighter1_405_457_Open_Text.style.display='none'; Codehighlighter1_405_457_Closed_Image.style.display='inline'; Codehighlighter1_405_457_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_405_457_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_405_457_Closed_Text.style.display='none'; Codehighlighter1_405_457_Open_Image.style.display='inline'; Codehighlighter1_405_457_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_405_457_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_405_457_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(node.isAlsoLeaf()) <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                    list.add(i</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />            }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);"> <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                </span><span style="color: rgb(0, 0, 255);">break</span><span style="color: rgb(0, 0, 0);">;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />        }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> list;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    @Override<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Token</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> getToken(ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Sentence</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> list) <br /><img id="Codehighlighter1_576_1592_Open_Image" onclick="this.style.display='none'; Codehighlighter1_576_1592_Open_Text.style.display='none'; Codehighlighter1_576_1592_Closed_Image.style.display='inline'; Codehighlighter1_576_1592_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_576_1592_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_576_1592_Closed_Text.style.display='none'; Codehighlighter1_576_1592_Open_Image.style.display='inline'; Codehighlighter1_576_1592_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_576_1592_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_576_1592_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Token</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> tokenlist</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Token</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">();<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(Sentence sen:list)<br /><img id="Codehighlighter1_658_1569_Open_Image" onclick="this.style.display='none'; Codehighlighter1_658_1569_Open_Text.style.display='none'; Codehighlighter1_658_1569_Closed_Image.style.display='inline'; Codehighlighter1_658_1569_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_658_1569_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_658_1569_Closed_Text.style.display='none'; Codehighlighter1_658_1569_Open_Image.style.display='inline'; Codehighlighter1_658_1569_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_658_1569_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_658_1569_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            AdjList g </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> AdjList(sen.getText().length</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">瀛樺偍鎵鏈夎鍒囧垎鐨勫彲鑳界殑璇?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">            </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(i</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">sen.getText().length)<br /><img id="Codehighlighter1_774_1251_Open_Image" onclick="this.style.display='none'; Codehighlighter1_774_1251_Open_Text.style.display='none'; Codehighlighter1_774_1251_Closed_Image.style.display='inline'; Codehighlighter1_774_1251_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_774_1251_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_774_1251_Closed_Text.style.display='none'; Codehighlighter1_774_1251_Open_Image.style.display='inline'; Codehighlighter1_774_1251_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_774_1251_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_774_1251_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                Token token </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Token(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(sen.getText(),i,</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">),i,i</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                token.setWeight(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                g.addEdge(token);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                TreeNode n</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">dic.get(sen.getText()[i]);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(n</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">)<br /><img id="Codehighlighter1_955_1237_Open_Image" onclick="this.style.display='none'; Codehighlighter1_955_1237_Open_Text.style.display='none'; Codehighlighter1_955_1237_Closed_Image.style.display='inline'; Codehighlighter1_955_1237_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_955_1237_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_955_1237_Closed_Text.style.display='none'; Codehighlighter1_955_1237_Open_Image.style.display='inline'; Codehighlighter1_955_1237_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">                </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_955_1237_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_955_1237_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                    ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> ilist </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">maxMatch(n, sen.getText(),i);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                    </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">(ilist.size()</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> j</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;j</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">ilist.size();j</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)<br /><img id="Codehighlighter1_1086_1231_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1086_1231_Open_Text.style.display='none'; Codehighlighter1_1086_1231_Closed_Image.style.display='inline'; Codehighlighter1_1086_1231_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1086_1231_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1086_1231_Closed_Text.style.display='none'; Codehighlighter1_1086_1231_Open_Image.style.display='inline'; Codehighlighter1_1086_1231_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">                        </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1086_1231_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1086_1231_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                            token </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Token(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(sen.getText(),i,ilist.get(j)</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">i),i,ilist.get(j));<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                            token.setWeight(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                            g.addEdge(token);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />                        }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />                }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />            }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">System.out.println(g);</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">            ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> ret</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">maxProb(g);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            Collections.reverse(ret);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> first</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(Integer last:ret)<br /><img id="Codehighlighter1_1392_1565_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1392_1565_Open_Text.style.display='none'; Codehighlighter1_1392_1565_Closed_Image.style.display='inline'; Codehighlighter1_1392_1565_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1392_1565_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1392_1565_Closed_Text.style.display='none'; Codehighlighter1_1392_1565_Open_Image.style.display='inline'; Codehighlighter1_1392_1565_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">            </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1392_1565_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1392_1565_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                Token token </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> Token(</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> String(sen.getText(),first,last</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">first),sen.getStartOffset()</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">first,sen.getStartOffset()</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">last);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                tokenlist.add(token);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                first</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">last;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />            }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />        }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> tokenlist;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[] prevNode;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 0, 255);">double</span><span style="color: rgb(0, 0, 0);">[] prob;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">璁$畻鍑鴻礬寰勬渶鐭殑鏁扮粍</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);"> ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> maxProb(AdjList g)<br /><img id="Codehighlighter1_1692_2066_Open_Image" onclick="this.style.display='none'; Codehighlighter1_1692_2066_Open_Text.style.display='none'; Codehighlighter1_1692_2066_Closed_Image.style.display='inline'; Codehighlighter1_1692_2066_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_1692_2066_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_1692_2066_Closed_Text.style.display='none'; Codehighlighter1_1692_2066_Open_Image.style.display='inline'; Codehighlighter1_1692_2066_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_1692_2066_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_1692_2066_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        prevNode </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[g.verticesNum]; </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鏈浣沖墠椹辮妭鐐?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">        prob </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">double</span><span style="color: rgb(0, 0, 0);">[g.verticesNum]; </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鑺傜偣璺緞</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">        prob[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鑺傜偣0鐨勫垵濮嬭礬寰勬槸0<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鎸夎妭鐐規眰鏈浣沖墠椹?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);"> (</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> index </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">; index </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> g.verticesNum; index</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            getBestPrev(g,index);</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">姹傚嚭鏈浣沖墠椹?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">        <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> ret </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);"> ArrayList</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Integer</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">();<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">(g.verticesNum</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);i</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;i</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">prevNode[i]) </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);"> 浠庡彸鍚戝乏鎵炬渶浣沖墠椹辮妭鐐?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">            ret.add(i);<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);"> ret;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />    </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">璁$畻鑺傜偣i鐨勬渶浣沖墠椹辮妭鐐?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">    </span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);"> getBestPrev(AdjList g,</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> i)<br /><img id="Codehighlighter1_2122_2601_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2122_2601_Open_Text.style.display='none'; Codehighlighter1_2122_2601_Closed_Image.style.display='inline'; Codehighlighter1_2122_2601_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_2122_2601_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2122_2601_Closed_Text.style.display='none'; Codehighlighter1_2122_2601_Open_Image.style.display='inline'; Codehighlighter1_2122_2601_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">    </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2122_2601_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_2122_2601_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        Iterator</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">Token</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);"> it </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> g.getPrev(i);</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">寰楀埌鍓嶉┍璇嶉泦鍚堬紝浠庝腑鎸戦夋渶浣沖墠瓚嬭瘝</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">        </span><span style="color: rgb(0, 0, 255);">double</span><span style="color: rgb(0, 0, 0);"> maxProb </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">1000</span><span style="color: rgb(0, 0, 0);">;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);"> maxNode </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> </span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        <br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        </span><span style="color: rgb(0, 0, 255);">while</span><span style="color: rgb(0, 0, 0);">(it.hasNext())<br /><img id="Codehighlighter1_2252_2538_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2252_2538_Open_Text.style.display='none'; Codehighlighter1_2252_2538_Closed_Image.style.display='inline'; Codehighlighter1_2252_2538_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_2252_2538_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2252_2538_Closed_Text.style.display='none'; Codehighlighter1_2252_2538_Open_Image.style.display='inline'; Codehighlighter1_2252_2538_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif">        </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2252_2538_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_2252_2538_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            Token itr </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> it.next();<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 0, 255);">double</span><span style="color: rgb(0, 0, 0);"> nodeProb </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> prob[itr.getStart()]</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">itr.getWeight();</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍊欓夎妭鐐硅礬寰?br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />            </span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">System.out.println(itr.getWord()+","+nodeProb);</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">              </span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);"> (nodeProb </span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);"> maxProb)</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">璺緞鏈鐭殑綆椾綔鏈浣沖墠瓚?/span><span style="color: rgb(0, 128, 0);"><br /><img id="Codehighlighter1_2459_2533_Open_Image" onclick="this.style.display='none'; Codehighlighter1_2459_2533_Open_Text.style.display='none'; Codehighlighter1_2459_2533_Closed_Image.style.display='inline'; Codehighlighter1_2459_2533_Closed_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockStart.gif"><img style="display: none;" id="Codehighlighter1_2459_2533_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_2459_2533_Closed_Text.style.display='none'; Codehighlighter1_2459_2533_Open_Image.style.display='inline'; Codehighlighter1_2459_2533_Open_Text.style.display='inline';" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ContractedSubBlock.gif"></span><span style="color: rgb(0, 0, 0);">              </span><span style="border: 1px solid rgb(128, 128, 128); display: none; background-color: rgb(255, 255, 255);" id="Codehighlighter1_2459_2533_Closed_Text"><img alt="" src="http://www.tkk7.com/Images/dot.gif" /></span><span id="Codehighlighter1_2459_2533_Open_Text"><span style="color: rgb(0, 0, 0);">{<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                  maxNode </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> itr.getStart();<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />                  maxProb </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> nodeProb;<br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />              }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" />         }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" />        prob[i] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> maxProb;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鑺傜偣璺緞</span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" /></span><span style="color: rgb(0, 0, 0);">        prevNode[i] </span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);"> maxNode;</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鏈浣沖墠椹辮妭鐐?/span><span style="color: rgb(0, 128, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" /></span><span style="color: rgb(0, 0, 0);">    }</span></span><span style="color: rgb(0, 0, 0);"><br /><img alt="" align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span></div><br /><br /> <img src ="http://www.tkk7.com/nianzai/aggbug/386216.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/nianzai/" target="_blank">nianzai</a> 2012-08-24 14:57 <a href="http://www.tkk7.com/nianzai/archive/2012/08/24/386216.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>鍏ㄥ垏鍒嗗垎璇嶇▼搴?鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝http://www.tkk7.com/nianzai/archive/2012/07/02/381988.htmlnianzainianzaiMon, 02 Jul 2012 06:17:00 GMThttp://www.tkk7.com/nianzai/archive/2012/07/02/381988.htmlhttp://www.tkk7.com/nianzai/comments/381988.htmlhttp://www.tkk7.com/nianzai/archive/2012/07/02/381988.html#Feedback3http://www.tkk7.com/nianzai/comments/commentRss/381988.htmlhttp://www.tkk7.com/nianzai/services/trackbacks/381988.html
鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝銆傛瘮濡傝兘鍒嗗嚭榪欐牱鐨勮瘝錛歜b闇溿?瀹ゃ佷箰phone銆乼ouch4銆乵p3銆乀鎭ゃ?br />
public class FMW extends M
{
    
public static final HashMap<Character,TreeNode> dic = Dictionary.getFmmdic();
    
    
/**
     * 
@return 榪斿洖鍙兘鍖歸厤璇嶇殑闀垮害, 娌℃湁鎵懼埌榪斿洖 0.
     
*/

    
public ArrayList<Integer> maxMatch(TreeNode node,char[] sen, int offset) 
    
{
        ArrayList
<Integer> list=new ArrayList<Integer>();
        
for(int i=offset; i<sen.length; i++
        
{
            node 
= node.subNode(sen[i]);
            
if(node != null
            
{
                
if(node.isAlsoLeaf()) 
                    list.add(i
+1);
            }

            
else 
                
break;
        }

        
if(list.size()==0)
            list.add(offset);
        
return list;
    }

    
    
public ArrayList<Token> getToken(ArrayList<Sentence> list)
    
{
        ArrayList
<Token> tokenlist=new ArrayList<Token>();
        
for(Sentence sen:list)
        
{
            
int i=0;
            
while(i<sen.getText().length)
            
{
                TreeNode n
=dic.get(sen.getText()[i]);
                
if(n!=null)
                
{
                    ArrayList
<Integer> ilist =maxMatch(n, sen.getText(),i);
                    
if(ilist.size()>1)
                    
{
                        
for(int j=0;j<ilist.size();j++)
                        
{
                            Token token 
= new Token(new String(sen.getText(),i,ilist.get(j)-i),sen.getStartOffset()+i,sen.getStartOffset()+ilist.get(j));
                            tokenlist.add(token);
                        }

                    }

                    
else
                    
{
                        
if(ilist.get(0)>i)
                        
{
                            Token token 
= new Token(new String(sen.getText(),i,ilist.get(0)-i),sen.getStartOffset()+i,sen.getStartOffset()+ilist.get(0));
                            tokenlist.add(token);
                        }

                        
else
                        
{
                            
if(tokenlist.size()==0 || tokenlist.get(tokenlist.size()-1).getEnd()<=i+sen.getStartOffset())
                            
{
                                Token token 
= new Token(new String(sen.getText(),i,1),sen.getStartOffset()+i,sen.getStartOffset()+i+1);
                                tokenlist.add(token);
                            }

                        }

                    }

                }

                
else
                
{
                    
if(tokenlist.size()==0 || tokenlist.get(tokenlist.size()-1).getEnd()<=i+sen.getStartOffset())
                    
{
                        Token token 
= new Token(new String(sen.getText(),i,1),sen.getStartOffset()+i,sen.getStartOffset()+i+1);
                        tokenlist.add(token);
                    }

                }

                i
++;
            }

        }

        
return tokenlist;
    }

}





nianzai 2012-07-02 14:17 鍙戣〃璇勮
]]>
閫嗗悜鏈澶у尮閰嶅垎璇嶇▼搴忥紝鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝 (絎簩鐗? http://www.tkk7.com/nianzai/archive/2012/06/29/381846.htmlnianzainianzaiFri, 29 Jun 2012 09:29:00 GMThttp://www.tkk7.com/nianzai/archive/2012/06/29/381846.htmlhttp://www.tkk7.com/nianzai/comments/381846.htmlhttp://www.tkk7.com/nianzai/archive/2012/06/29/381846.html#Feedback0http://www.tkk7.com/nianzai/comments/commentRss/381846.htmlhttp://www.tkk7.com/nianzai/services/trackbacks/381846.html鎺ㄧ炕浜嗙涓鐗堬紝鍙傝冧簡鍏朵粬鍒嗚瘝紼嬪簭錛岄噸鏂板啓鐨勭浜岀増銆?/p>

閫嗗悜鏈澶у尮閰嶄腑鏂囧垎璇嶇▼搴忥紝鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝銆傛瘮濡傝兘鍒嗗嚭榪欐牱鐨勮瘝錛歜b闇溿?瀹ゃ佷箰phone銆乼ouch4銆乵p3銆乀鎭?/p>

public class RMM2 extends M
{
    
public static final HashMap<Character,TreeNode> dic = Dictionary.getRmmdic();
    
    
/**
     * 
@return 榪斿洖鍖歸厤鏈闀胯瘝鐨勯暱搴? 娌℃湁鎵懼埌榪斿洖 0.
     
*/

    
public int maxMatch(TreeNode node,char[] sen, int offset) 
    
{
        
int idx = offset;
        
for(int i=offset; i>=0; i--
        
{
            node 
= node.subNode(sen[i]);
            
if(node != null
            
{
                
if(node.isAlsoLeaf()) 
                    idx 
= i; 
            }

            
else 
                
break;
        }

        
return idx ;
    }

    
    
public ArrayList<Token> getToken(ArrayList<Sentence> list)
    
{
        Collections.reverse(list);
        ArrayList
<Token> tokenlist=new ArrayList<Token>();
        
for(Sentence sen:list)
        
{
            
int i=sen.getText().length-1;
            
while(i>-1)
            
{
                TreeNode n
=dic.get(sen.getText()[i]);
                
if(n!=null)
                
{
                    
int j=maxMatch(n, sen.getText(),i);
                    
if(j<i)
                    
{
                        Token token 
= new Token(new String(sen.getText(),j,i-j+1),sen.getStartOffset()+j,sen.getStartOffset()+i+1);
                        tokenlist.add(token);
                        i
=j-1;
                    }

                    
else
                    
{
                        Token token 
= new Token(new String(sen.getText(),i,1),sen.getStartOffset()+i,sen.getStartOffset()+i+1);
                        tokenlist.add(token);
                        i
--;
                    }

                }

                
else
                
{
                    Token token 
= new Token(new String(sen.getText(),i,1),sen.getStartOffset()+i,sen.getStartOffset()+i+1);
                    tokenlist.add(token);
                    i
--;
                }

            }

        }

        Collections.reverse(tokenlist);
        
return tokenlist;
    }

}



nianzai 2012-06-29 17:29 鍙戣〃璇勮
]]>
姝e悜鏈澶у尮閰嶅垎璇嶇▼搴忥紝鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝 (絎簩鐗?http://www.tkk7.com/nianzai/archive/2012/06/27/381596.htmlnianzainianzaiWed, 27 Jun 2012 05:39:00 GMThttp://www.tkk7.com/nianzai/archive/2012/06/27/381596.htmlhttp://www.tkk7.com/nianzai/comments/381596.htmlhttp://www.tkk7.com/nianzai/archive/2012/06/27/381596.html#Feedback0http://www.tkk7.com/nianzai/comments/commentRss/381596.htmlhttp://www.tkk7.com/nianzai/services/trackbacks/381596.html
姝e悜鏈澶у尮閰嶄腑鏂囧垎璇嶇▼搴忥紝鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝銆傛瘮濡傝兘鍒嗗嚭榪欐牱鐨勮瘝錛歜b闇溿?瀹ゃ佷箰phone銆乼ouch4銆乵p3銆乀鎭?br />
public class FMM2 extends Seg
{
    
public static final HashMap<Character,TreeNode> dic = Dictionary.getFmmdic();
    
    
/**
     * 
@return 榪斿洖鍖歸厤鏈闀胯瘝鐨勯暱搴? 娌℃湁鎵懼埌榪斿洖 0.
     
*/

    
public static int maxMatch(TreeNode node,char[] sen, int offset) 
    
{
        
int idx = offset - 1;
        
for(int i=offset; i<sen.length; i++
        
{
            node 
= node.subNode(sen[i]);
            
if(node != null
            
{
                
if(node.isAlsoLeaf()) 
                    idx 
= i; 
            }

            
else 
                
break;
        }

        
return idx + 1;
    }

    
    
public ArrayList<Token> getToken(ArrayList<Sentence> list)
    
{
        ArrayList
<Token> tokenlist=new ArrayList<Token>();
        
for(Sentence sen:list)
        
{
            
int i=0;
            
while(i<sen.getText().length)
            
{
                TreeNode n
=FMM2.dic.get(sen.getText()[i]);
                
if(n!=null)
                
{
                    
int j=FMM2.maxMatch(n, sen.getText(),i);
                    
if(j>i)
                    
{
                        Token token 
= new Token(new String(sen.getText(),i,j-i),sen.getStartOffset()+i,sen.getStartOffset()+j);
                        tokenlist.add(token);
                        i
=j;
                    }

                    
else
                    
{
                        Token token 
= new Token(new String(sen.getText(),i,1),sen.getStartOffset()+i,sen.getStartOffset()+i+1);
                        tokenlist.add(token);
                        i
++;
                    }

                }

                
else
                
{
                    Token token 
= new Token(new String(sen.getText(),i,1),sen.getStartOffset()+i,sen.getStartOffset()+i+1);
                    tokenlist.add(token);
                    i
++;
                }

            }

        }

        
return tokenlist;
    }

}



nianzai 2012-06-27 13:39 鍙戣〃璇勮
]]>
鍩轟簬璇嶅吀鐨勯嗗悜鏈澶у尮閰嶄腑鏂囧垎璇嶇畻娉曪紝閫嗗悜鍒嗚瘝姣旀鍚戝垎璇嶆晥鏋滃ソ http://www.tkk7.com/nianzai/archive/2011/08/19/356850.htmlnianzainianzaiFri, 19 Aug 2011 05:22:00 GMThttp://www.tkk7.com/nianzai/archive/2011/08/19/356850.htmlhttp://www.tkk7.com/nianzai/comments/356850.htmlhttp://www.tkk7.com/nianzai/archive/2011/08/19/356850.html#Feedback2http://www.tkk7.com/nianzai/comments/commentRss/356850.htmlhttp://www.tkk7.com/nianzai/services/trackbacks/356850.html闃呰鍏ㄦ枃

nianzai 2011-08-19 13:22 鍙戣〃璇勮
]]>
鍩轟簬璇嶅吀鐨勬鍚戞渶澶у尮閰嶄腑鏂囧垎璇嶇畻娉曪紝鑳藉疄鐜頒腑鑻辨枃鏁板瓧娣峰悎鍒嗚瘝http://www.tkk7.com/nianzai/archive/2011/08/04/355786.htmlnianzainianzaiThu, 04 Aug 2011 07:31:00 GMThttp://www.tkk7.com/nianzai/archive/2011/08/04/355786.htmlhttp://www.tkk7.com/nianzai/comments/355786.htmlhttp://www.tkk7.com/nianzai/archive/2011/08/04/355786.html#Feedback0http://www.tkk7.com/nianzai/comments/commentRss/355786.htmlhttp://www.tkk7.com/nianzai/services/trackbacks/355786.html闃呰鍏ㄦ枃

nianzai 2011-08-04 15:31 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲视屏在线观看| 亚洲第一网站免费视频| 亚洲AV无码精品色午夜果冻不卡 | 永久免费毛片在线播放| 亚洲人成网站看在线播放| 一本色道久久88亚洲精品综合| 国产成人亚洲精品91专区高清| 国产V片在线播放免费无码| 日韩免费无码视频一区二区三区| 国产成人yy免费视频| 四虎国产精品免费久久影院| 国产AV无码专区亚洲AV漫画 | 亚洲人成高清在线播放| 亚洲hairy多毛pics大全| 72pao国产成视频永久免费| 免费播放一区二区三区| 免费黄色app网站| 国产亚洲精品国看不卡| 亚洲国产综合人成综合网站00| 国产偷v国产偷v亚洲高清| 亚洲最新黄色网址| 老司机精品视频免费| 久久国产精品萌白酱免费| 在线A级毛片无码免费真人| 亚洲一区精品无码| 亚洲1区1区3区4区产品乱码芒果 | sss在线观看免费高清| 69xx免费观看视频| 亚洲精品国产精品乱码不卡| 99久久亚洲综合精品成人网| 猫咪免费人成在线网站| 96免费精品视频在线观看| 免费jjzz在线播放国产| 久久久久亚洲AV成人片| 成人国产网站v片免费观看| 成年人网站免费视频| 亚洲无人区午夜福利码高清完整版| 亚洲一区二区三区精品视频| 国产免费伦精品一区二区三区| 无码日韩精品一区二区免费| 亚洲乱码国产一区三区|