除去停用词

去除停用词
请问ICTCLAS在粉刺钱怎么去除停用词
------解决思路----------------------
奔跑吧,参考:

/*
1.txt存放文章
table.txt是停词表,每行一个停用词
2.txt是修改后的文章
*/
#include <stdio.h>
#include <wchar.h>
FILE *fi1, *fi2, *fo;
wchar_t buf[256];
wchar_t word[30];
wchar_t table[256][30];
wchar_t *p;
int i, n, N;
int main()
{
if (NULL == (fi1 = fopen("1.txt", "rb")))
{
fprintf(stderr, "Can not open file : 1.txt\n");
return 1;
}
if (NULL == (fi2 = fopen("table.txt", "rb")))
{
fprintf(stderr, "Can not open file : table.txt\n");
fclose(fi1);
return 1;
}
if (NULL == (fo = fopen("2.txt", "wb")))
{
fprintf(stderr, "Can not open file : 2.txt\n");
fclose(fi1);
fclose(fi2);
return 1;
}
//读入停用词表
N = 0;
while (1)
{
if (NULL == fgetws(buf, 256, fi2)) break;
n = wcslen(buf);
if (L'\r' == buf[0]) continue;   //空行
buf[n - 2] = L'\0';
wcsncpy(table[N++], buf, n - 1);
}
//根据停用词表,删除文件中出现的停用词
while (1)
{
if (NULL == fgetws(buf, 256, fi1)) break;
n = wcslen(buf);
if (L'\r' == buf[0]) continue;   //空行
buf[n - 2] = L'\0';
for (i = 0; i < N; i++)
{
p = buf;
n = wcslen(table[i]);
while (p = wcsstr(p, table[i]))
{
wcsncpy(p, p + n, wcslen(p + n) + 1);
}
}
fwprintf(fo, L"%s\r\n", buf);
}
fclose(fi1);
fclose(fi2);
fclose(fo);
return 0;
}