Exemple #1
0
 public static Trial ReadTrialItems(TextAsset asset, bool logComments = true)
 {
     using (StreamReader reader = new StreamReader(asset.IntoMemoryStream()))
     {
         return(ReadTrialItems(reader, logComments));
     }
 }
Exemple #2
0
 // Takes a frequency dictionary and the word/frequency separator and initializes it
 public void InitDictionary(TextAsset frequencyDict, char separator)
 {
     trie = new PruningRadixTrie();
     using (Stream corpusStream = frequencyDict.IntoMemoryStream())
     {
         trie.ReadTermsFromStream(corpusStream, separator);
     }
     Debug.LogWarning($"Trie Loaded! ({trie.termCountLoaded} nodes)");
 }