C# Class JiebaNet.Segmenter.JiebaSegmenter

Afficher le fichier Open project: anderscui/jieba.NET Class Usage Examples

Private Properties

Свойство Type Description
AddBufferToWordList void
Calc Pair>.IDictionary
CutAll IEnumerable
CutDag IEnumerable
CutDagWithoutHmm IEnumerable
CutIt IEnumerable
GetDag List>.IDictionary

Méthodes publiques

Méthode Description
AddWord ( string word, int freq, string tag = null ) : void
Cut ( string text, bool cutAll = false, bool hmm = true ) : IEnumerable

The main function that segments an entire sentence that contains Chinese characters into seperated words.

CutForSearch ( string text, bool hmm = true ) : IEnumerable
DeleteWord ( string word ) : void
JiebaSegmenter ( ) : System
LoadUserDict ( string userDictFile ) : void

Loads user dictionaries.

Tokenize ( string text, TokenizerMode mode = TokenizerMode.Default, bool hmm = true ) : IEnumerable

Private Methods

Méthode Description
AddBufferToWordList ( List words, string buf ) : void
Calc ( string sentence, IDictionary dag ) : Pair>.IDictionary
CutAll ( string sentence ) : IEnumerable
CutDag ( string sentence ) : IEnumerable
CutDagWithoutHmm ( string sentence ) : IEnumerable
CutIt ( string text, Func cutMethod, Regex reHan, Regex reSkip, bool cutAll ) : IEnumerable
GetDag ( string sentence ) : List>.IDictionary

Method Details

AddWord() public méthode

public AddWord ( string word, int freq, string tag = null ) : void
word string
freq int
tag string
Résultat void

Cut() public méthode

The main function that segments an entire sentence that contains Chinese characters into seperated words.
public Cut ( string text, bool cutAll = false, bool hmm = true ) : IEnumerable
text string The string to be segmented.
cutAll bool Specify segmentation pattern. True for full pattern, False for accurate pattern.
hmm bool Whether to use the Hidden Markov Model.
Résultat IEnumerable

CutForSearch() public méthode

public CutForSearch ( string text, bool hmm = true ) : IEnumerable
text string
hmm bool
Résultat IEnumerable

DeleteWord() public méthode

public DeleteWord ( string word ) : void
word string
Résultat void

JiebaSegmenter() public méthode

public JiebaSegmenter ( ) : System
Résultat System

LoadUserDict() public méthode

Loads user dictionaries.
public LoadUserDict ( string userDictFile ) : void
userDictFile string
Résultat void

Tokenize() public méthode

public Tokenize ( string text, TokenizerMode mode = TokenizerMode.Default, bool hmm = true ) : IEnumerable
text string
mode TokenizerMode
hmm bool
Résultat IEnumerable