• 大小: 5.33M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2020-12-26
  • 语言: C#
  • 标签: 分词  SharpICTCLAS  

资源简介

ICTCLAS的C#版,用于中文分词解析,bin里面有例子

资源截图

代码片段和文件信息

using System;
using System.IO;
using SharpICTCLAS;

class Program
{
   static void Main(string[] args)
   {
      string DictPath = Path.Combine(Environment.CurrentDirectory “Data“) + Path.DirectorySeparatorChar;
      Console.WriteLine(“正在读入字典,请稍候...“);

      WordDictionary dict = new WordDictionary();
      dict.Load(DictPath + “coreDict.dct“);
      ShowWordsInfo(dict ‘设‘);

      Console.WriteLine(“\r\n向字典库插入“设计模式”一词...“);
      dict.AddItem(“设计模式“ Utility.GetPOSValue(“n“) 10);

      Console.WriteLine(“\r\n修改完成,将字典写入磁盘文件coreDictNew.dct,请稍候...“);
      dict.Save(DictPath + “coreDictNew.dct“);

      Console.WriteLine(“\r\n打开已写入的字典,请稍候...“);
      dict.Load(DictPath + “coreDictNew.dct“);
      ShowWordsInfo(dict ‘设‘);

      Console.Write(“按下回车键退出......“);
      Console.ReadLine()

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\
     文件         193  2013-12-19 14:11  SharpICTCLAS单线程\.gitignore
     文件        1644  2013-12-19 14:11  SharpICTCLAS单线程\README.md
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\AddWords2Dict\
     文件        2403  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\AddWords2Dict\AddWords2Dict.csproj
     文件        1647  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\AddWords2Dict\Program.cs
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\AddWords2Dict\Properties\
     文件        1148  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\AddWords2Dict\Properties\AssemblyInfo.cs
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\ConsoleTest\
     文件        2399  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\ConsoleTest\ConsoleTest.csproj
     文件         285  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\ConsoleTest\ConsoleTest.csproj.user
     文件       11354  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\ConsoleTest\Program.cs
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\ConsoleTest\Properties\
     文件        1144  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\ConsoleTest\Properties\AssemblyInfo.cs
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\PreProcessUtility\
     文件       17642  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\PreProcessUtility\PreProcessUtility.cs
     文件        2204  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\PreProcessUtility\PreProcessUtility.csproj
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\PreProcessUtility\Properties\
     文件        1302  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\PreProcessUtility\Properties\AssemblyInfo.cs
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\
     文件         973  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\Program.cs
     文件        1012  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\Program.cs.bak
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\Properties\
     文件        1134  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\Properties\AssemblyInfo.cs
     文件        2441  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\SegmentSample.csproj
     文件        3392  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\Samples\SegmentSample\TestWordSegment.cs
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\SharpICTCLAS\
     目录           0  2017-12-15 10:36  SharpICTCLAS单线程\SharpICTCLAS\SharpICTCLAS\EventInterface\
     文件        1905  2013-12-19 14:11  SharpICTCLAS单线程\SharpICTCLAS\SharpICTCLAS\EventInterface\SegmentEventArg.cs
............此处省略120个文件信息

评论

共有 条评论