//Usage: GenderModel modelName < tiger/NN bear/NN public static string GenderMain(string modelName, string line) { GenderModel model = new GenderModel(modelName, false); string[] words = line.Split(' '); double[] dist = model.GenderDistribution(Context.ParseContext(words[0])); string output = "m=" + dist[model.MaleIndex] + " f=" + dist[model.FemaleIndex] + " n=" + dist[model.NeuterIndex] + " " + string.Join(",", (model.GetFeatures(Context.ParseContext(words[0])).ToArray())); return(output); }
public MaximumEntropyCompatibilityModel(string coreferencePath) { mGenderModel = GenderModel.TestModel(coreferencePath + "/gen"); mNumberModel = NumberModel.TestModel(coreferencePath + "/num"); }
//Usage: GenderModel modelName < tiger/NN bear/NN public static string GenderMain(string modelName, string line) { GenderModel model = new GenderModel(modelName, false); string[] words = line.Split(' '); double[] dist = model.GenderDistribution(Context.ParseContext(words[0])); string output = "m=" + dist[model.MaleIndex] + " f=" + dist[model.FemaleIndex] + " n=" + dist[model.NeuterIndex] + " " + string.Join(",", (model.GetFeatures(Context.ParseContext(words[0])).ToArray())); return output; }
public static ITrainSimilarityModel TrainModel(string name) { var genderModel = new GenderModel(name, true); return genderModel; }
public static ITestGenderModel TestModel(string name) { var genderModel = new GenderModel(name, false); return genderModel; }
public static ITrainSimilarityModel TrainModel(string name) { var genderModel = new GenderModel(name, true); return(genderModel); }
public static ITestGenderModel TestModel(string name) { var genderModel = new GenderModel(name, false); return(genderModel); }