} //= imbLanguageFrameworkManager.english.basic; public textEvaluator(semanticLexiconManager __manager) { manager = __manager; }
public static termSpark getExpandedSpark(this string token, int expansion = 1, ILogBuilder loger = null, bool debug = true, semanticLexiconManager manager = null) { if (manager == null) { manager = semanticLexiconManager.manager; } termSpark spark = null; if (expansion == 0) { spark = new termSpark(token); spark.weight = 1; return(spark); } termGraph tg = new termGraph(token); string prefix = "lex"; tg.expand(expansion); //if (debug) //{ // String tree = tg.ToStringTreeview(); // tree.saveStringToFile(manager.constructor.projectFolderStructure["logs"].pathFor("exp_" + expansion + "_" + token + ".txt")); //} spark = tg.getSpark(); if (debug) { DataTable dt = spark.GetDataTable("exp_" + expansion + "_" + token, null, true); dt.serializeDataTable(dataTableExportEnum.csv, "", manager.constructor.projectFolderStructure["logs"]); } //if (tokens.Remove(spark.lemma); spark.weight = 1; return(spark); }