public WordMatrix(WordMatrix orig) : this(modshogunPINVOKE.new_WordMatrix__SWIG_5(WordMatrix.getCPtr(orig)), true) { if (modshogunPINVOKE.SWIGPendingException.Pending) { throw modshogunPINVOKE.SWIGPendingException.Retrieve(); } }
public void Initialize() { var rules = _rulesRepository.LoadData(); var values = _valuesRepository.LoadData(); var words = _wordsRepository.LoadData(); var cypher = _cypherRepository.LoadData(); matrix = new WordMatrix() { Rules = rules, Values = values, Words = words, Cypher = cypher }; }
public WordMatrix(WordMatrix orig) : this(modshogunPINVOKE.new_WordMatrix__SWIG_5(WordMatrix.getCPtr(orig)), true) { if (modshogunPINVOKE.SWIGPendingException.Pending) throw modshogunPINVOKE.SWIGPendingException.Retrieve(); }
internal static HandleRef getCPtr(WordMatrix obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal static HandleRef getCPtr(WordMatrix obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
static void AddSample(WordMatrix mat, string word1, string word2, SpeechEntity result, double expected) { ex.Add(SpeechEntity.Group(mat[word1], mat[word2])); res.Add(result.ToArray().Concat(new double[] { expected }).ToArray()); }
static void RawPopulate(WordMatrix matrix) { SpeechEntity v = matrix["_VOID_"]; string[] names = Enum.GetNames(typeof(SpeechClass)); SpeechClass[] values = (SpeechClass[])Enum.GetValues(typeof(SpeechClass)); for (int i = 0; i < names.Length; i++) { Populate(matrix, names[i], values[i]); } }
static void QueryWords(WordMatrix mat, string[] w) { foreach (var word in w) { if (mat[word] == null) { QueryWord(mat, word); } } }
static void QueryWord(WordMatrix mat, string w) { Console.WriteLine("The word \"" + w + "\" is unknow"); Console.Write("Type the word's grammar type : "); while(true) { string className = Console.ReadLine(); if(Enum.IsDefined(typeof(SpeechClass), className)) { Populate(mat, w, (SpeechClass)Enum.Parse(typeof(SpeechClass), className, true)); break; } else { Console.WriteLine("This class does not exist."); } } }
static void Populate(WordMatrix matrix, string word, SpeechClass c) { matrix.Add(word, new SpeechClass[] { c }); }
public RecursiveNetwork(WordMatrix matrix) : this() { this._matrix = matrix; }
//protected List<ushort> m_aCollisionTypes = new List<ushort>(); public CollisionMap(D2Game game) { this.game = game; m_map = new WordMatrix(); }
public bool CopyMapData(WordMatrix rBuffer) { m_map.ExportData(rBuffer); return(rBuffer.IsCreated()); }