⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 test_frm.cpp

📁 中文分词算法,效率很高,使用词典树装搜索进行单词切割,并提供扩充词库的函数!
💻 CPP
字号:
//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "TEST_Frm.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
    : TForm(Owner)
{
    /*
    D = new Dictiory();
    D->Sfilename = "dictiory.txt";
    */
    D = new Dictiory("dictiory.txt","data.txt");
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Btn_LoadClick(TObject *Sender)
{
    /*
    if(Open->Execute()){
        DftLoadPath = Open->FileName;
    }
    */
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Btn_OutputClick(TObject *Sender)
{
    /*
    if(Save->Execute()){
        DftSavePath = Save->FileName;
    }
    D->Dfilename = DftSavePath.c_str();
    D->SegmentWord(DftLoadPath.c_str());
    */
    D->SegmentWord("sou.txt");	
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SetDictionaryClick(TObject *Sender)
{
    /*
    if(Open->Execute()){
        D->Sfilename = Open->FileName.c_str();
    }
    */
}
//---------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -