📄 qim.h
字号:
#pragma once
#include "TrieTree.h"
#include "..\BiHashTable\BiHashTable.h"
#include "..\DynamicPhraseTable\DynamicPhraseTable.h"
class Qim
{
public:
bool InsertStaticPhrase(const string& py, const string& strPhrase, double frequency);
bool InsertDynamicPhrase(const string& py, const string& strPrase, double frequency) ;
bool InsertDynamicPhrase1(string py, string strSlimcutpy, string strPhrase,double frequency);
//Get the static word by py, using longest-matching strategy, return the longest matching count
int GetStaticWordByLongestMatchedPy(const string& py, vector<string>& vecPhraseTable);
int GetDynamicPraseByLongestMatchedPy(const string& py, vector<string>& vecPhraseTable) ;
bool IncreaseStaticFrequency(const string& py, const string& strPhrase) ;
bool IncreaseDynamicFrequency(const string& py, const string& strPhrase);
bool Save(const string& strStaticTableFilename, const string& strDynamicTableFilename, const string& strHashtableFilename);
bool Load(const string& strStaticTableFilename, const string& strDynamicTableFilename, const string& strHashtableFilename);
bool LoadFromRawFile (const string& strFileName);
bool LoadDynamicFromRawFile (const string& strFileName) ;
private:
TrieTree m_StaticPhraseTable ;
BiHashTable m_BiHashTable ;
DynamicPhraseTable m_DynamicPraseTable ;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -