分词研究

来源:互联网 发布:php相册管理系统 编辑:程序博客网 时间:2024/04/30 06:33
 入门应用: 网上有比较好的分词库
  1. --Create   Table   artice(title   varchar(10))   
  2.   --Insert   into   artice   Select   '人生'   
  3.   --Union   Select   '数码'   
  4.     
  5.   --Insert   into   artice   Select   '相机'   
  6.   --Union   Select   '电脑'   
  7.     
  8.   select * from artice
  9.   Select   *   From   artice  Where   title   like   '%人生%'   
  10.   Select   *   From   artice  Where   charindex('人生',title)>0 --charindex返回出现的位置  
  11.   Select   *   From   artice  Where   charindex('/'+title+'/','/人生/相机/')>0 
  12.   select * from artice where charindex('/'+title+'/','/人生/小猴/')>0 --反包含
end