菜单
  

    4.3 分词测试图
    4.3.2 分词统计与分析系统模块流程
     
    图4.4 分词系统流程图
    4.3.3 分词统计与分析系统变量定义
    表4.2 分词系统部分变量定义
    序号    名称    类型    说明
    1    word    string    关系动词
    2    att    string    词性
    3    count    string    关系动词数量
    4    length    Int    关系动词出现频率
    5    i    int    频率次数变量
    6    j    int    频率次数变量
    7    temp    Worditem型    关系词及出现频率
    4.3.4 分词统计与分析系统核心代码
    public class MySegment
    {
        public List<worditem> Wordlist= new List<worditem>();
        public  void Segment(string sentence)
        {
            string DictPath = System.AppDomain.CurrentDomain.SetupInformation.ApplicationBase + @"\data\";
             WordSegment ws = new WordSegment();
             ws.InitWordSegment(DictPath);
             try
             {
                 ws.sentence = sentence;
                 ws.StartSegment();
                 List<WordResult[]> wordList = ws.WordList;
                 for (int j = 1; j < wordList[0].Length - 1; j++)
                 {
                    string postString = Utility.GetPOSString(wordList[0][j].nPOS);
                    postString = postString.Substring(0, postString.Length - 1);
                    worditem wd = new worditem();
                    wd.word = wordList[0][j].sWord.ToString();
                    wd.att = postString;
                    Wordlist.Add(wd);
                  }
             }
        }
    }
    int length = wordlist.Count;
    for (int i = 0; i <= length - 2; i++)
    {
        for (int j = i+1; j <= length - 1; j++)
        {
           if (wordlist[i].count < wordlist[j].count)
           {   worditem temp = wordlist[j];
               wordlist[j] = wordlist[i];
               wordlist[i] = temp;
            }
         }
    }  
    4.4 保存指定日期的文本模块
    4.4.1 概述
       将抓取模块中的时间变量 NewsTime  列在选择框中,选择一指定的日期。利用office的接口,将选中的新闻摘要保存到本地word文档中。
  1. 上一篇:ASP.net+sqlserver旅游信息网站设计+ER图
  2. 下一篇:ASP.net小型网上书店的设计与实现
  1. python+mysql网络习题爬取系统的设计与实现

  2. 神经网络算法在核素识别中的应用研究

  3. 苏州一建集团网络的规划与设计

  4. asp.net网络商城在线购物系统的设计与实现

  5. java局域网络的即时聊天系统设计+源代码

  6. 网络环境下电子报纸开发利用现状及模式研究

  7. 基于Agent的突发事件中网络...

  8. 十二层带中心支撑钢结构...

  9. 当代大学生慈善意识研究+文献综述

  10. 乳业同业并购式全产业链...

  11. 电站锅炉暖风器设计任务书

  12. 杂拟谷盗体内共生菌沃尔...

  13. 河岸冲刷和泥沙淤积的监测国内外研究现状

  14. 中考体育项目与体育教学合理结合的研究

  15. 酸性水汽提装置总汽提塔设计+CAD图纸

  16. java+mysql车辆管理系统的设计+源代码

  17. 大众媒体对公共政策制定的影响

  

About

751论文网手机版...

主页:http://www.751com.cn

关闭返回