Package Preparation
nlpir/ictclas2014 Word breaker Download package
Dev-c++
Operating system windows
After unpacking the word breaker download package see
What is needed here in Windows is data, NLPIR.h in include, Win32 NLPIR.libNLPIR.dll in LIB, and how to use the file for later.
Create a new project in Dev C + +
Copy the above data, NLPIR.h, NLPIR.lib, NLPIR.dll to the project Nlpir working directory,
Right-click Nlpir-> Project Properties
In the "Parameters" screen, click "Add Library or Object", add NLPIR.lib, confirm
Test examples
1#include"NLPIR.h"2#include <stdio.h>3#include <string.h>4 intMainintargcChar*argv[])5 {6 //Sample1:sentence or paragraph lexical analysis with only one result7 Charssentence[ -];8 Const Char*Sresult;9 if(!nlpir_init ())Ten { Oneprintf"Init fails\n"); A return-1; - } -printf"Input sentence now (' Q ' to quit)!\n"); thescanf"%s", ssentence); - while(_STRICMP (Ssentence,"Q")!=0) - { -Sresult = Nlpir_paragraphprocess (Ssentence,0); +printf"%s\ninput string Now (' Q ' to quit)!\n", sresult); -scanf"%s", ssentence); + } A nlpir_exit (); at return 0; -}
Test effect
This document is licensed based on the Creative Commons Attribution-NonCommercial Use 3.0 license agreement. Welcome reprint, Deduction, but must keep the signature of this article Lin Yu flying, if you need advice, please send me a letter
Participle nlpir/ictclas2014 Word Breaker's C + + API for initial use under Windows