C# Class PanGu.Dict.WordDictionary

Dictionary for word
Datei anzeigen Open project: xuld/AI-Robot Class Usage Examples

Public Methods

Method Description
DeleteWord ( String word ) : void
GetAllMatchs ( string text, bool chineseNameIdentify ) : Framework.AppendList
GetWordAttr ( string word ) : WordAttribute
InsertWord ( String word, double frequency, POS pos ) : void
Load ( String fileName ) : void
Load ( String fileName, bool textFile, string &version ) : void

Load ( String fileName, string &version ) : void
Save ( string fileName ) : void
Save ( string fileName, string version ) : void
SaveToText ( string fileName ) : void
Search ( String key ) : List

通过遍历方式搜索

SearchByLength ( int len ) : List
SearchByPos ( POS Pos ) : List
UpdateWord ( String word, double frequency, POS pos ) : void

Private Methods

Method Description
LoadFromBinFile ( String fileName, string &verNumStr ) : WordDictionaryFile
LoadFromTextFile ( String fileName ) : WordDictionaryFile
SaveToBinFile ( String fileName, string verStr ) : void
SaveToTextFile ( String fileName ) : void

Method Details

DeleteWord() public method

public DeleteWord ( String word ) : void
word String
return void

GetAllMatchs() public method

public GetAllMatchs ( string text, bool chineseNameIdentify ) : Framework.AppendList
text string
chineseNameIdentify bool
return Framework.AppendList

GetWordAttr() public method

public GetWordAttr ( string word ) : WordAttribute
word string
return WordAttribute

InsertWord() public method

public InsertWord ( String word, double frequency, POS pos ) : void
word String
frequency double
pos POS
return void

Load() public method

public Load ( String fileName ) : void
fileName String
return void

Load() public method

public Load ( String fileName, bool textFile, string &version ) : void
fileName String
textFile bool
version string 输出字典的版本号
return void

Load() public method

public Load ( String fileName, string &version ) : void
fileName String
version string
return void

Save() public method

public Save ( string fileName ) : void
fileName string
return void

Save() public method

public Save ( string fileName, string version ) : void
fileName string
version string
return void

SaveToText() public method

public SaveToText ( string fileName ) : void
fileName string
return void

Search() public method

通过遍历方式搜索
public Search ( String key ) : List
key String
return List

SearchByLength() public method

public SearchByLength ( int len ) : List
len int
return List

SearchByPos() public method

public SearchByPos ( POS Pos ) : List
Pos POS
return List

UpdateWord() public method

public UpdateWord ( String word, double frequency, POS pos ) : void
word String
frequency double
pos POS
return void