惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threat Research - Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
P
Proofpoint News Feed
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
A
About on SuperTechFans
T
Tenable Blog
M
MIT News - Artificial intelligence
IT之家
IT之家
I
Intezer
D
DataBreaches.Net
爱范儿
爱范儿
T
Threatpost
C
CERT Recently Published Vulnerability Notes
云风的 BLOG
云风的 BLOG
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
K
Kaspersky official blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Y
Y Combinator Blog
Cyberwarzone
Cyberwarzone
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
AWS News Blog
AWS News Blog
博客园 - 聂微东
C
Check Point Blog
S
Securelist
有赞技术团队
有赞技术团队
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
D
Docker
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tailwind CSS Blog
L
Lohrmann on Cybersecurity
G
Google Developers Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog

博客园 - amber lee zhao

(武义检察院)sqlplus执行sql脚本 windows下squid安装与配置 缓存服务器 System.Data.OracleClient requires Oracle client software version 8.1.7 or greater. Oracle Listener crash in Windows 【转】Session丢失原因分析 【转】Session丢失问题二 【转】Session丢失问题解决方法一 OracleMembershipProvider、OracleRoleProvider源代码 使用EnterpriseLibrary插入Oracle CLOB数据 使用System.Net.Mail发送邮件 - amber lee zhao 【转】oracle SQL性能优化 DataGridView导出为Excel文件 - amber lee zhao 使用HtmlAgilityPack批量抓取网页数据 OracleMembershipProvider与登录控件使用的技巧 - amber lee zhao 在ASP.NET中使用Quartz.net进行工作调度 结合OracleMembershipProvider开发简单的asp.net应用程序----配置web.config文件 C#版本的OracleMembershipProvider Double-Array Trie分词词典简述 [转] .net下ICTCLAS原子分词和lucene的Token比较
sharpICTCLAS 中在找出所有词组组合时的优化
amber lee zhao · 2007-08-16 · via 博客园 - amber lee zhao

在Segment.GenerateWordNet()中,循环每一个原子分词,找出所有可能的词组组合。
像下面的一句话的进行分词:

         string sSentence = @"三星SHX-132型号的(手机)1元钱256.89元12.14%百分比12%";

原子分词:


      始##始     
1
         三     
7
         星     
7
   SHX
-132     5
         型     
7
         号     
7
         的     
7
         (     
6
         手     
7
         机     
7
         )     
6
         
1     5
         元     
7
         钱     
7
    
256.89     9
         元     
7
    
12.14%     5
         百     
7
         分     
7
         比     
7
        
12     5
         %     
6
      末##末     
4

在进入词组判断时,调用GenerateWordNet()

// 将所有可能的组词存入m_segGraph
         for (int i = 0; i < atomSegment.Count; i++)//All the word
         {
            sWord 
= atomSegment[i].sWord;//Get the current atom
            int j = i + 1;

            
             
//是否过滤一下?只考虑中文字??
            
//WordInfo wordInfo = coreDict.GetMatchedWordInfo(sWord);
            while (j < atomSegment.Count && coreDict.GetMaxMatch(sWord, out sMaxMatchWord, out nPOSRet))
            
{
               
if (sMaxMatchWord == sWord)  // 就是我们要找的词
               {
                  WordInfo info 
= coreDict.GetWordInfo(sWord); // 该词可能就有多种词性

.
               }


               sWord 
+= atomSegment[j++].sWord;
            }

         }

在while循环中,需要判断下面这些词组:
“三星SHX-132”,“星SHX-132”,“SHX-132”,“SHX-132型”,“的(”,“(”,“手机)”,“机)”,“)”,“1”,“钱256.89”,“256.89”,“元12.14%”等等。
词组判断共进行了44次,无效词组判断有17次,无效效率达到38.6%
个人认为,数字、符号、分隔符、字母无需进行词组判断,可以节省一些时间效率。