public RawWord[] parseSourceIntoRawWords(string source) { StringBuilder strippedSource = stripAndCleanSource(source); string[] wordStrings = parseCleanedSourceIntoWordStrings(strippedSource); // Convert to RawWord objects. RawWord[] outRawWords = new RawWord[wordStrings.Length]; int i = 0; foreach (string wordString in wordStrings) { outRawWords[i] = RawWord.new_FromString(wordString); i++; } return(outRawWords); }
public bool addWordFromStrings(string[] rawStrings) { // Convert to RawWord objects. List <RawWord[]> rawWordList = new List <RawWord[]>(); RawWord[] rawWords = new RawWord[rawStrings.Length]; int i = 0; foreach (string s in rawStrings) { rawWords[i] = RawWord.new_FromString(s); i++; } rawWordList.Add(rawWords); // Add the return(wordTrie.putObjectString(rawWords, new_WordFromWords(rawWords))); }