中科院ICTCLAS系统,ICTCLAS.dll的函数调用示例(C语言)
2005-03-19 12:35
483 查看
// ICTCLAS_DOS.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "ICTCLAS.h"
#include <string.h>
int main(int argc, char* argv[])
{
//Sample1: Sentence or paragraph lexical analysis with only one result
char sSentence[2000],sSentenceResult[5000];
ICTCLAS_Init();
printf("Input sentence now!/n");
scanf("%s",sSentence);
while(_stricmp(sSentence,"q")!=0)
{
ICTCLAS_ParagraphProcess(sSentence,sSentenceResult);
printf("%s/nInput string now!/n",sSentenceResult);
scanf("%s",sSentence);
}
ICTCLAS_Exit();
//Sample2: File segmentation and POS tagging
/*
ICTCLAS_Init();
ICTCLAS_FileProcess("E://Sample//Corpus_NewPOS//199802_Org.txt","E://Sample//Corpus_NewPOS//199802_Org_cla.txt");
ICTCLAS_Exit();
*/
//Sample3: Sentence segmentation and POS tagging with multiple result
/*
char sSentence[2000],**sSentenceResult;
int i;
sSentenceResult=new char*[5];
for(i=0;i<5;i++)
sSentenceResult[i]=new char[5000];
ICTCLAS_Init();
printf("Input sentence now!/n");
scanf("%s",sSentence);
while(_stricmp(sSentence,"q")!=0)
{
ICTCLAS_SentenceProcess(sSentence,5,sSentenceResult);
for(i=0;i<5;i++)
printf("Result%d:%s/n",i+1,sSentenceResult[i]);
printf("Input string now!/n");
scanf("%s",sSentence);
}
ICTCLAS_Exit();
for(i=0;i<5;i++)
delete[] sSentenceResult[i];
delete [] sSentenceResult;
*/
return 0;
}
//
#include "stdafx.h"
#include "ICTCLAS.h"
#include <string.h>
int main(int argc, char* argv[])
{
//Sample1: Sentence or paragraph lexical analysis with only one result
char sSentence[2000],sSentenceResult[5000];
ICTCLAS_Init();
printf("Input sentence now!/n");
scanf("%s",sSentence);
while(_stricmp(sSentence,"q")!=0)
{
ICTCLAS_ParagraphProcess(sSentence,sSentenceResult);
printf("%s/nInput string now!/n",sSentenceResult);
scanf("%s",sSentence);
}
ICTCLAS_Exit();
//Sample2: File segmentation and POS tagging
/*
ICTCLAS_Init();
ICTCLAS_FileProcess("E://Sample//Corpus_NewPOS//199802_Org.txt","E://Sample//Corpus_NewPOS//199802_Org_cla.txt");
ICTCLAS_Exit();
*/
//Sample3: Sentence segmentation and POS tagging with multiple result
/*
char sSentence[2000],**sSentenceResult;
int i;
sSentenceResult=new char*[5];
for(i=0;i<5;i++)
sSentenceResult[i]=new char[5000];
ICTCLAS_Init();
printf("Input sentence now!/n");
scanf("%s",sSentence);
while(_stricmp(sSentence,"q")!=0)
{
ICTCLAS_SentenceProcess(sSentence,5,sSentenceResult);
for(i=0;i<5;i++)
printf("Result%d:%s/n",i+1,sSentenceResult[i]);
printf("Input string now!/n");
scanf("%s",sSentence);
}
ICTCLAS_Exit();
for(i=0;i<5;i++)
delete[] sSentenceResult[i];
delete [] sSentenceResult;
*/
return 0;
}
相关文章推荐
- c# 调用ictclas.dll出现的异常
- C#调用C语言生成的DLL示例
- C#调用C(C++)dll示例教程,包含dll找不到函数入口的解决办法,包含C#dll调用方式不对出错的解决办法
- 【C语言】【unix c】文件的打开与文件的关闭(系统调用函数)
- PowerShell 调用系统 DLL 中的函数,如何使用返回参数中的值
- java 解决调用c语言实现简单HelloWorld函数生成.dll动态链接库的32位dll文件无法在64位机上运行
- 【C语言】【unix c】文件写数据与文件读数据(系统调用函数)
- 使用JAVA调用中科院ICTCLAS2015分词系统
- 中科院中文分词C语言接口调用示例
- 如何在C语言中调用C++编写的DLL中的函数
- Eclipse+Java调用中科院分词系统ICTCLAS2016
- 中科院ICTCLAS的调用示例
- C#调用C语言编写的dll示例
- C#调用C语言生成的DLL示例
- c语言里面的调用显示系统时间的函数及实现过程是什么
- matlabR2008a函数编译成dll供vc6.0调用的方法
- string类型函数 bcb做dll,c#调用
- C#中调用C++的dll的参数为指针类型的导出函数(包括二级指针的情况)
- 透过汇编另眼看世界之DLL导出函数调用
- vs2013 打包并调用dll(opencv,多函数复杂情况下)