コード例 #1
0
        public ActionResult GetSnippetResponses(string snippet)
        {
            var Collection = new Dictionary <string, List <string> >();

            //From SQLite DB
            List <string> DictionaryMatch = SQLiteDb.GetDictionaryMatches(snippet);

            Collection.Add("CustomDict", DictionaryMatch);

            //From word prediction website
            List <string> WordPredictMatches = WordPrediction.GetWordPredictMatches(snippet);

            Collection.Add("PreDict", WordPredictMatches);

            var jsonSerialiser = new JsonSerializer();
            var json           = JsonConvert.SerializeObject(Collection, Formatting.Indented);

            return(Ok(json));
        }