资源简介
中科院汉语词法分析系统ICTCLAS安装包的安装包, 破解见我的其他资源
代码片段和文件信息
// win_cDemo.cpp : 定义控制台应用程序的入口点。
//
#include “stdafx.h“
#include “win_cDemo.h“
#include
#include
using namespace std;
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
#include “ICTCLAS30.h“
// 唯一的应用程序对象
CWinApp theApp;
using namespace std;
int _tmain(int argc TCHAR* argv[] TCHAR* envp[])
{
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );//| _CRTDBG_CHECK_ALWAYS_DF | _CRTDBG_CHECK_CRT_DF );
_CrtDumpMemoryLeaks();
_CrtSetBreakAlloc(129);
_crtBreakAlloc = 77;
int nRetCode = 0;
// 初始化 MFC 并在失败时显示错误
if (!AfxWinInit(::GetModuleHandle(NULL) NULL ::GetCommandLine() 0))
{
// TODO: 更改错误代码以符合您的需要
_tprintf(_T(“致命错误: MFC 初始化失败\n“));
nRetCode = 1;
}
else
{
// TODO: 在此处为应用程序的行为编写代码。
printf(“hello world!\n“);
//init ICTCLAS
if(!ICTCLAS_Init())
{
printf(“ICTCLAS INIT FAILED!\n“);
system(“pause“);
return -1;
}
printf(“ICTCLAS init success!\n“);
////未加词典
char sString[1000] = “少儿少儿节目节目节目节目节目节目节目节目节目节目节目节目节目“;
int nCount = ICTCLAS_GetParagraphProcessAWordCount(sString);
result_t *result =(result_t*)malloc(sizeof(result_t)*nCount);
ICTCLAS_ParagraphProcessAW(nCountresult);//获取结果存到客户的内存中
for (int i=0; i {
char buf[100];
memset(buf 0 100);
int index = result[i].start;
memcpy(buf(void *)(sString+index) result[i].length);
printf(“%s\t“ buf);
printf(“%s\t“ result[i].sPOS);
switch(result[i].word_type)
{
case 0:
printf(“核心词典\n“);
break;
case 1:
printf(“用户词典\n“);
break;
case 2:
printf(“领域词典\n“);
break;
default:break;
}
}
printf(“\n--------------------------------------\n“);
result_t *resultKey = (result_t*)malloc(sizeof(result_t)*nCount);
int nCountKey;
ICTCLAS_KeyWord(resultKey nCountKey);
for (int i=0; i {
char buf[100];
memset(buf 0 100);
int index = resultKey[i].start;
memcpy(buf(void *)(sString+index) resultKey[i].length);
printf(“%s\t%d\n“ buf resultKey[i].freq);
}
free(resultKey);
free(result);
unsigned long lFinger = ICTCLAS_FingerPrint();
const char * sResult;
//printf(“Before User-defined dictionary used:\n“);
//sResult = ICTCLAS_ParagraphProcess(sString1);
//printf(“%s\n“sResult);
//ICTCLAS_ImportUserDict(“userdict.txt“);
//printf(“import user words!\n“);
//while (true)
//for (int k=0; k<3;k++)
{
string s;
cout<<“insert the user word:“;
getline(cin s);
cout<< endl;
ICTCLAS_AddUserWord(s.c_str());
sResult = ICTCLAS_ParagraphProcess(sString0);
sResult = ICTCLAS_ParagraphProcess(sString1);
printf(“%s\n“sResult);
ICTCLAS_SaveTheUsrDic();
}
////imp userdict
////ICTCLAS_ImportUserDict(“userdict.txt“);
////printf(“import %d user words!\n“iWordCount);
////加词典后
//printf(“After User-defined dictionary
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 262144 2009-02-15 16:12 windows_C_32\api\ICTCLAS30.dll
文件 11718 2009-02-15 14:52 windows_C_32\api\ICTCLAS30.h
文件 6470 2009-02-15 16:12 windows_C_32\api\ICTCLAS30.lib
目录 0 2009-02-19 13:24 windows_C_32\api
文件 4297124 2009-02-19 12:11 windows_C_32\bin\Setup.exe
目录 0 2009-02-19 14:04 windows_C_32\bin
文件 302232 2009-02-19 09:55 windows_C_32\doc\ICTCLAS2009接口文档.doc
文件 61952 2008-08-23 18:22 windows_C_32\doc\ICTPOS3.0汉语词性标记集.doc
目录 0 2009-02-19 14:04 windows_C_32\doc
文件 4876 2009-02-18 15:26 windows_C_32\readme.txt
文件 4876 2009-02-18 15:26 windows_C_32\sample\windows_cDemo_32_sample\readme.txt
文件 4883 2009-02-18 15:18 windows_C_32\sample\windows_cDemo_32_sample\readme.txt.bak
文件 3183 2008-06-11 15:53 windows_C_32\sample\windows_cDemo_32_sample\UpgradeLog.xm
文件 716 2009-02-03 16:34 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Configure.xm
文件 3520144 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\BiWord.big
文件 65540 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\charset.type
文件 1696620 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\CoreDict.pdat
文件 1786424 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\CoreDict.pos
文件 478168 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\CoreDict.unig
文件 262236 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\FieldDict.pdat
文件 72 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\FieldDict.pos
文件 1978128 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\GranDict.pdat
文件 1778776 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\GranDict.pos
文件 37253 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\ICTCLAS30.ctx
文件 288 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\ICTCLAS_First.map
文件 406 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\ICTPOS.map
文件 2213 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\nr.ctx
文件 3008 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\nr.fsa
文件 1757200 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\nr.role
文件 307 2009-01-16 13:48 windows_C_32\sample\windows_cDemo_32_sample\win_cDemo\Data\PKU.map
............此处省略37个文件信息
- 上一篇:模糊数学教材
- 下一篇:arcgis三调工具箱.zip
评论
共有 条评论