public void AutoSemantic(ParseTreeDrawable parseTree) { if (AutoLabelSingleSemantics(parseTree)) { parseTree.Save(); } }
public void autoArgument(ParseTreeDrawable parseTree, Frameset frameset) { NodeDrawableCollector nodeDrawableCollector = new NodeDrawableCollector((ParseNodeDrawable)parseTree.GetRoot(), new IsTransferable(secondLanguage)); List <ParseNodeDrawable> leafList = nodeDrawableCollector.Collect(); foreach (var parseNode in leafList) { if (parseNode.GetLayerData(ViewLayerType.PROPBANK) == null) { foreach (ArgumentType argumentType in Enum.GetValues(typeof(ArgumentType))) { if (frameset.ContainsArgument(argumentType) && AutoDetectArgument(parseNode, argumentType)) { parseNode.GetLayerInfo().SetLayerData(ViewLayerType.PROPBANK, ArgumentTypeStatic.GetPropbankType(argumentType)); } } if (Word.IsPunctuation(parseNode.GetLayerData(secondLanguage))) { parseNode.GetLayerInfo().SetLayerData(ViewLayerType.PROPBANK, "NONE"); } } } parseTree.Save(); }
public void AutoDisambiguate(ParseTreeDrawable parseTree) { bool modified; modified = AutoFillSingleAnalysis(parseTree); modified = modified || AutoDisambiguateWithRules(parseTree); modified = modified || AutoDisambiguateSingleRootWords(parseTree); modified = modified || AutoDisambiguateMultipleRootWords(parseTree); if (modified) { parseTree.Save(); } }
public void AutoNer(ParseTreeDrawable parseTree) { AutoDetectPerson(parseTree); AutoDetectLocation(parseTree); AutoDetectOrganization(parseTree); AutoDetectMoney(parseTree); AutoDetectTime(parseTree); var nodeDrawableCollector = new NodeDrawableCollector((ParseNodeDrawable)parseTree.GetRoot(), new IsTransferable(secondLanguage)); var leafList = nodeDrawableCollector.Collect(); foreach (var parseNode in leafList) { if (!parseNode.LayerExists(ViewLayerType.NER)) { parseNode.GetLayerInfo().SetLayerData(ViewLayerType.NER, "NONE"); } } parseTree.Save(); }