?? ictclas.h
字號:
/****************************************************************************
*
* Copyright (c) 2002~2005
* Software Research Lab.
* Institute of Computing Tech.
* Chinese Academy of Sciences
* All rights reserved.
*
* This file is the confidential and proprietary property of
* Institute of Computing Tech. and the posession or use of this file requires
* a written license from the author.
* Filename: ICTCLAS.h
* Abstract:
* interface for ICTCLAS(Institute of Computing Tech.,Chinese Lexical Analysis).
* Author: Kevin Zhang
* Email: zhanghp@software.ict.ac.cn
* Homepage: pipy_world.y365.com
*
* Date: 2003-12-22
*
* Notes: You are recommonded that read the API manual related
* 1. All function will return true if success or false if failure
* 2. Opearion failure maybe:
* 1) The data dir or data file missing
* 2) Not invoke init() before any current operation
* 3) Other: you could contact the author.
****************************************************************************/
#if !defined(__ICTCLAS_DLL_INCLUDED__)
#define __ICTCLAS_DLL_INCLUDED__
#define ICTCLAS26_API extern "C" __declspec(dllexport)
/*********************************************************************
*
* Func Name : Init
*
* Description: Init ICTCLAS
* The function must be invoked before any operation listed as following
*
* Parameters : None
*
* Returns : success or fail
* Author : Kevin Zhang
* History :
* 1.create 2002-8-6
*********************************************************************/
ICTCLAS26_API bool ICTCLAS_Init();
/*********************************************************************
*
* Func Name : ICTCLAS_Exit
*
* Description: Exist ICTCLAS and free related buffer
* Exit the program and free memory
*The function must be invoked while you needn't any lexical anlysis
*
* Parameters : None
*
* Returns : success or fail
* Author : Kevin Zhang
* History :
* 1.create 2002-8-6
*********************************************************************/
ICTCLAS26_API bool ICTCLAS_Exit();
/*********************************************************************
*
* Func Name : ICTCLAS_SentenceProcess
*
* Description: Process a sentence
*
*
* Parameters : sSentence: the source sentence
* nResultCount: the count of result, the value cannot more than 10
* **sResult: the results buffer
* i.e. 張華平于1978年3月9日出生于江西省波陽縣。(nResultCount=5)
* Result 1(Score=-63.360033):張/nr 華平/nr 于/p 1978年/t 3月/t 9日/t 出生于/v 江西省/ns 波陽縣/ns 。/w
* Result 2(Score=-65.161371):張/nr 華平/nr 于/p 1978年/t 3月/t 9日/t 出生/v 于/p 江西省/ns 波陽縣/ns 。/w
* Result 3(Score=-73.205565):張/nr 華平/nr 于/p 1978年/t 3月/t 9日/t 出生/v 于/p 江西/ns 省/n 波陽縣/ns 。/w
* Result 4(Score=-80.693838):張/nr 華平/nr 于/p 1978年/t 3月/t 9/m 日出/v 生/v 于/p 江西省/ns 波陽縣/ns 。/w
* Result 5(Score=-82.372596):張/nr 華平/nr 于/p 1978年/t 3月/t 9日/t 出生/v 于/p 江西省/ns 波/n 陽/ag 縣/n 。/w
* Returns : success:
* fail:
* Author : Kevin Zhang
* History :
* 1.create 2002-7-4
*********************************************************************/
ICTCLAS26_API bool ICTCLAS_SentenceProcess(const char *sSentence,unsigned int nResultCount,char **sResult);
/*********************************************************************
*
* Func Name : ParagraphProcessingA
*
* Description: Process a paragraph
*
*
* Parameters : sParagraph: The source paragraph
* sResult: The result
* i.e. 張華平于1978年3月9日出生于江西省波陽縣。
* Result: 張/nr 華平/nr 于/p 1978年/t 3月/t 9日/t 出生于/v 江西省/ns 波陽縣/ns 。/w
* Returns : the result buffer pointer
* Author : Kevin Zhang
* History :
* 1.create 2003-12-22
*********************************************************************/
ICTCLAS26_API const char * ICTCLAS_ParagraphProcessA(const char *sParagraph);
/*********************************************************************
*
* Func Name : ParagraphProcessing
*
* Description: Process a paragraph
* You are recommonded that use const char * ICTCLAS_ParagraphProcessA
* ,because you do not need to prepare buffer for the result
* Parameters : sParagraph: The source paragraph
* sResult: The result buffer
* i.e. 張華平于1978年3月9日出生于江西省波陽縣。
* Result: 張/nr 華平/nr 于/p 1978年/t 3月/t 9日/t 出生于/v 江西省/ns 波陽縣/ns 。/w
* Returns : success:
* fail:
* Author : Kevin Zhang
* History :
* 1.create 2002-7-4
* 2.
*********************************************************************/
ICTCLAS26_API bool ICTCLAS_ParagraphProcess(const char *sParagraph,char *sResult);
/*********************************************************************
*
* Func Name : ICTCLAS_FileProcess
*
* Description: Process a text file
*
*
* Parameters : sSourceFilename: The source file name
* sResultFilename: The result file name
* i.e. FileProcess("E:\\Sample\\Corpus_NewPOS\\199802_Org.txt","E:\\Sample\\Corpus_NewPOS\\199802_Org_cla.txt");
* Returns : success:
* fail:
* Author : Kevin Zhang
* History :
* 1.create 2002-7-4
*********************************************************************/
ICTCLAS26_API bool ICTCLAS_FileProcess(const char *sSourceFilename,const char *sResultFilename);
/*********************************************************************
*
* Func Name : IsWord
*
* Description: Judge whether the word is in the core lexicon
* 查詢詞典,判斷該詞是否是一個詞典中收錄的詞條
* Parameters : const char *sWord: word
*
*
* Returns : exist or not
* Author : Kevin Zhang
* History :
* 1.create 2003-12-22
*********************************************************************/
ICTCLAS26_API bool ICTCLAS_IsWord(const char *sWord);
/*********************************************************************
*
* Func Name : ImportUserDict
*
* Description: Import User-defined dictionary
* Parameters : Text filename for user dictionary
* Returns : The number of lexical entry imported successfully
* Author : Kevin Zhang
* History :
* 1.create 2003-11-28
*********************************************************************/
ICTCLAS26_API unsigned int ICTCLAS_ImportUserDict(const char *sFilename);
#endif//#define __ICTCLAS_DLL_INCLUDED__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -