MyCaffe  1.12.2.41
Deep learning software for Windows C# programmers.
MyCaffe.layers.beta.TextData.Vocabulary Class Reference

The Vocabulary object manages the overall word dictionary and word to index and index to word mappings. More...

Public Member Functions

 Vocabulary ()
 The constructor. More...
 
int WordToIndex (string strWord)
 The WordToIndex method maps a word to its corresponding index value. More...
 
string IndexToWord (int nIdx)
 The IndexToWord method maps an index value to its corresponding word. More...
 
void Load (List< List< string > > rgrgstrInput, List< List< string > > rgrgstrTarget)
 Loads the word to index mappings. More...
 

Properties

int VocabularCount [get]
 Returns the number of words in the vocabulary. More...
 

Detailed Description

The Vocabulary object manages the overall word dictionary and word to index and index to word mappings.

Definition at line 889 of file TextDataLayer.cs.

Constructor & Destructor Documentation

◆ Vocabulary()

MyCaffe.layers.beta.TextData.Vocabulary.Vocabulary ( )

The constructor.

Definition at line 899 of file TextDataLayer.cs.

Member Function Documentation

◆ IndexToWord()

string MyCaffe.layers.beta.TextData.Vocabulary.IndexToWord ( int  nIdx)

The IndexToWord method maps an index value to its corresponding word.

Parameters
nIdxSpecifies the index value.
Returns
The word corresponding to the index is returned.

Definition at line 921 of file TextDataLayer.cs.

◆ Load()

void MyCaffe.layers.beta.TextData.Vocabulary.Load ( List< List< string > >  rgrgstrInput,
List< List< string > >  rgrgstrTarget 
)

Loads the word to index mappings.

Parameters
rgrgstrInputSpecifies the input sentences where each inner array is one sentence of words.
rgrgstrTargetSpecifies the target sentences where each inner array is one sentence of words.

Definition at line 942 of file TextDataLayer.cs.

◆ WordToIndex()

int MyCaffe.layers.beta.TextData.Vocabulary.WordToIndex ( string  strWord)

The WordToIndex method maps a word to its corresponding index value.

Parameters
strWordSpecifies the word to map.
Returns
The word index is returned.

Definition at line 908 of file TextDataLayer.cs.

Property Documentation

◆ VocabularCount

int MyCaffe.layers.beta.TextData.Vocabulary.VocabularCount
get

Returns the number of words in the vocabulary.

Definition at line 932 of file TextDataLayer.cs.


The documentation for this class was generated from the following file: