LitDev.LDSpeech.Vocabulary C# (CSharp) Method

Vocabulary() public static method

Set a vocabulary of words and phrases for the speech regonition to use. If this is unset, then a large language vocabulary is used and the results will generally be less good (unusable). Also distinct phrases can have a better recognition than single words.
public static Vocabulary ( Primitive dictionary ) : void
dictionary Primitive /// An array of words or phrases to be recognised. /// If it is empty, then the default language vocabulary is used. ///
return void
        public static void Vocabulary(Primitive dictionary)
        {
            vocab = new Choices();
            string[] stringSeparators = new string[] { ";" };
            string[] lines = ((string)dictionary).Split(stringSeparators, StringSplitOptions.RemoveEmptyEntries);
            foreach (string line in lines)
            {
                string[] records = line.Split('=');
                vocab.Add(new string[] {records[1]});
            }
            defaultVocab = lines.Length == 0;
            setGrammar();
        }