public string Post([FromBody] string arg) { foreach (string varg in Sanitizer.splitSentences(arg)) { string carg = Sanitizer.clean(varg); try { Learner.commit(db, Ngram.split(3, carg)); } catch (NotEnoughTokensException e) { // Not enough tokens to commence learning. } catch (Exception e) { return(e.ToString()); } } return("200"); }
public string Post([FromBody] string arg) { string carg = Sanitizer.clean(arg); return(SentenceBuilder.build(db, carg)); }