/// <summary> /// Gets the initial grammar node from the linguist and creates a GrammarNodeToken. /// </summary> protected void LocalStart() { CurrentFrameNumber = 0; _curTokensScored.Value = 0; ActiveList newActiveList = ActiveListFactory.NewInstance(); ISearchState state = Linguist.SearchGraph.InitialState; newActiveList.Add(new Token(state, CurrentFrameNumber)); ActiveList = newActiveList; GrowBranches(); }
/** * /// Creates the emitting and non-emitting active lists. When creating the non-emitting active lists, we will look at * /// their respective beam widths (eg, word beam, unit beam, state beam). */ private void CreateActiveLists() { int nlists = _activeListFactories.Count; for (int i = 0; i < CurrentActiveLists.Length; i++) { int which = i; if (which >= nlists) { which = nlists - 1; } ActiveListFactory alf = _activeListFactories[which]; CurrentActiveLists[i] = alf.NewInstance(); //this.LogDebug("Added new item {0} at index {1} for currentActiveList",currentActiveLists[i],i); } }