.net 偽原創代碼 同義字替換

來源:互聯網
上載者:User

 

做了2天 ,查了N多資料,終於做出來的,放在後台,再發文章 直接複製粘貼過來,就會把文章中的詞用我無敵的17000同義字進行一次替換,這裡採用了access資料庫,百度,google基本就認不出來了,做到真正的偽原創 !

 明天做採集,採集後自動替換的!

public string Dealword(string cnt)//偽原創函數,tao2581 zhentou.net<br /> {<br /> string temp=cnt;<br /> // temp="test";<br /> //建立資料庫連接<br /> OleDbConnection aConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+System.Web.HttpContext.Current.Server.MapPath("Tyc.mdb")); </p><p> //建立command對象並儲存sql查詢語句<br /> OleDbCommand aCommand = new OleDbCommand("select * from tb ", aConnection);<br /> aConnection.Open(); </p><p> //建立datareader<br /> OleDbDataReader aReader = aCommand.ExecuteReader(); </p><p> //迴圈遍曆資料庫<br /> while(aReader.Read())<br /> {<br /> temp= Regex.Replace(temp,aReader["tid1"].ToString(),aReader["tid2"].ToString());<br /> }<br /> aReader.Close(); </p><p> //關閉串連,這很重要<br /> aConnection.Close(); </p><p> return temp;<br /> }</p><p>

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.