public static ILabel MakeTreeChain( this IEnumerable <Node> nodes, ILabelFactory labelFactory, ControlFlowInstruction controlFlow) { var nodesList = nodes.Reverse().ToList(); return(MakeTreeChain(nodesList.Skip(1).Reverse(), labelFactory, labelFactory.GetLabel(new Tree(nodesList.First(), controlFlow)))); }
public ViewCategoryMenu (ILabelFactory labelFactory, IPostService postService, ICommandFactory commandFactory) { this.labelFactory = labelFactory; this.postService = postService; this.commandFactory = commandFactory; }
public MainMenu(ISession session, ILabelFactory labelFactory, ICommandFactory commandFactory) { this.session = session; this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.Open(); }
public MenuController(ILabelFactory labelFactory, IForumViewEngine viewEngine) { this.viewEngine = viewEngine; this.CurrentMenu = new MainMenu(null, labelFactory, null); this.RenderCurrentView(); }
public AddReplyMenu(ILabelFactory labelFactory, ITextAreaFactory textAreaFactory, IForumReader reader, ICommandFactory commandFactory, IPostService postService) { this.labelFactory = labelFactory; this.textAreaFactory = textAreaFactory; this.reader = reader; this.commandFactory = commandFactory; this.postService = postService; }
public LogInMenu(ILabelFactory labelFactory, IForumReader forumReader, ICommandFactory commandFactroy) { this.labelFactory = labelFactory; this.forumReader = forumReader; this.commandFactory = commandFactroy; this.Open(); }
public LogInMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, IForumReader reader) { this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.reader = reader; Open(); }
public ViewPostMenu(IPostService postService, ILabelFactory labelFactory, ISession session, ICommandFactory commandFactory, IForumViewEngine viewEngine) { this.postService = postService; this.labelFactory = labelFactory; this.session = session; this.commandFactory = commandFactory; this.viewEngine = viewEngine; }
public SignUpMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, IForumReader forumReader) { this.labelFactory = labelFactory; this.forumReader = forumReader; this.commandFactory = commandFactory; Open(); }
public CategoriesMenu(ILabelFactory labelFactory, IPostService postService, ICommandFactory commandFactory) { this.labelFactory = labelFactory; this.postService = postService; this.commandFactory = commandFactory; this.Open(); }
public SignUpMenu(ILabelFactory labelFactory, IForumReader reader, ICommandFactory commandFactory) { this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.reader = reader; Open(); }
public ViewCategoryMenu(ICommandFactory commandFactory, ILabelFactory labelFactory, IPostService postService) { this.commandFactory = commandFactory; this.labelFactory = labelFactory; this.postService = postService; this.SetId(1); this.Open(); }
public ViewCategoryMenu(ILabelFactory labelFactory, IPostService postService, ICommandFactory commandFactory) { this.labelFactory = labelFactory; this.postService = postService; this.commandFactory = commandFactory; // TODO: Uncomment this // this.Open(); }
public CallGenerator( ILabelFactory labelFactory, CallingSiblingFinder callingSiblingFinder, ReadWriteGenerator readWriteGenerator) { this.labelFactory = labelFactory; this.callingSiblingFinder = callingSiblingFinder; this.readWriteGenerator = readWriteGenerator; }
//TODO: Inject Dependencies public LogInMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, ISession session, IUserService userService, IForumReader forumReader) { this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.session = session; this.userService = userService; this.forumReader = forumReader; this.Open(); }
public AddReplyMenu(ILabelFactory labelFactory, ITextAreaFactory textAreaFactory, IForumReader reader, ICommandFactory commandFactory, IPostService postServive, ISession session) { this.labelFactory = labelFactory; this.textAreaFactory = textAreaFactory; this.reader = reader; this.commandFactory = commandFactory; this.postServive = postServive; this.session = session; }
public AddPostMenu(ILabelFactory labelFactory, ITextAreaFactory textAreaFactory, IForumReader reader, ICommandFactory commandFactory) { this.labelFactory = labelFactory; this.textAreaFactory = textAreaFactory; this.reader = reader; this.commandFactory = commandFactory; this.InitializeTextArea(); this.Open(); }
public FunctionBodyGenerator( ILabelFactory labelFactory, ReadWriteGenerator readWriteGenerator, PrologueEpilogueGenerator prologueEpilogueGenerator, CallGenerator callGenerator) { this.labelFactory = labelFactory; this.readWriteGenerator = readWriteGenerator; this.prologueEpilogueGenerator = prologueEpilogueGenerator; this.callGenerator = callGenerator; }
public ViewPostMenu(IPostService postService, ILabelFactory labelFactory, ISession session, ICommandFactory commandFactory, IForumViewEngine forumViewEngine) { this.postService = postService; this.labelFactory = labelFactory; this.session = session; this.commandFactory = commandFactory; this.viewEngine = forumViewEngine; // TODO: uncomment if its still not working // this.Open(); }
public static ILabel MakeTreeChain(this IEnumerable <Node> nodes, ILabelFactory labelFactory, ILabel after) { return(nodes .Reverse() .Aggregate(after, (next, node) => { var controlFlow = new UnconditionalJump(next); var tree = new Tree(node, controlFlow); return labelFactory.GetLabel(tree); })); }
internal static ILabel ConcatTrees(this IEnumerable <Node> trees, ILabelFactory labelFactory, ControlFlowInstruction next) { var treesReversed = trees.Reverse().ToList(); var resultTree = treesReversed .Skip(1) .Aggregate( new Tree(treesReversed.First(), next), (tree, node) => new Tree(node, new UnconditionalJump(labelFactory.GetLabel(tree)))); return(labelFactory.GetLabel(resultTree)); }
public ViewPostMenu(ILabelFactory labelFactory, ISession session, IForumViewEngine forumViewEngine, IPostViewModel postViewModel, ICommandFactory commandFactory, IPostService postService) { this.labelFactory = labelFactory; this.session = session; this.viewEngine = forumViewEngine; this.post = postViewModel; this.commandFactory = commandFactory; this.postService = postService; }
// private IUserService userService; public SignUpMenu(ILabelFactory labelFactory, ICommandFactory commandFactory, ISession session, IForumReader forumReader)// IUserService userService) { this.labelFactory = labelFactory; this.commandFactory = commandFactory; this.session = session; this.forumReader = forumReader; // this.userService = userService; Open(); }
public PrologueEpilogueGenerator( ILabelFactory labelFactory, CallGenerator callGenerator, ReadWriteGenerator readWriteGenerator) { this.labelFactory = labelFactory; this.readWriteGenerator = readWriteGenerator; this.callGenerator = callGenerator; // RBP is handled separately, since it has a set place on the stack frame this.calleeSavedMapping = HardwareRegisterUtils.CalleeSavedRegisters .Where(reg => reg != HardwareRegister.RBP) .ToDictionary(register => register, register => new VirtualRegister()); }
public GenerateProcess( ILabelFactory labelFactory, ReadWriteGenerator readWriteGenerator, PrologueEpilogueGenerator prologueEpilogueGenerator, CallGenerator callGenerator, Function.Function function) { this.labelFactory = labelFactory; this.readWriteGenerator = readWriteGenerator; this.prologueEpilogueGenerator = prologueEpilogueGenerator; this.callGenerator = callGenerator; this.function = function; }
public FunctionToAsmGenerator( ILivenessAnalyzer livenessAnalyzer, IRegisterAllocator registerAllocator, IInstructionSelector instructionSelector, ICfgLinearizer cfgLinearizer, ILabelFactory labelFactory, ReadWriteGenerator readWriteGenerator) { this.livenessAnalyzer = livenessAnalyzer; this.registerAllocator = registerAllocator; this.instructionSelector = instructionSelector; this.cfgLinearizer = cfgLinearizer; this.labelFactory = labelFactory; this.readWriteGenerator = readWriteGenerator; }
public MenuController( ILabelFactory labelFactory, IServiceProvider serviceProvider, IForumViewEngine viewEngine, ISession session, ICommandFactory commandFactory) { this.serviceProvider = serviceProvider; this.viewEngine = viewEngine; this.session = session; this.commandFactory = commandFactory; this.labelFactory = labelFactory; //this.CurrentMenu = new MainMenu(session, labelFactory, commandFactory); this.InitializeSession(); //this.RenderCurrentView(); }
/// <summary>Turns a sentence into a flat phrasal tree.</summary> /// <remarks> /// Turns a sentence into a flat phrasal tree. /// The structure is S -> tag*. And then each tag goes to a word. /// The tag is either found from the label or made "WD". /// The tag and phrasal node have a StringLabel. /// </remarks> /// <param name="s">The Sentence to make the Tree from</param> /// <param name="lf">The LabelFactory with which to create the new Tree labels</param> /// <returns>The one phrasal level Tree</returns> public static Tree ToFlatTree <_T0>(IList <_T0> s, ILabelFactory lf) where _T0 : IHasWord { IList <Tree> daughters = new List <Tree>(s.Count); foreach (IHasWord word in s) { Tree wordNode = new LabeledScoredTreeNode(lf.NewLabel(word.Word())); if (word is TaggedWord) { TaggedWord taggedWord = (TaggedWord)word; wordNode = new LabeledScoredTreeNode(new StringLabel(taggedWord.Tag()), Java.Util.Collections.SingletonList(wordNode)); } else { wordNode = new LabeledScoredTreeNode(lf.NewLabel("WD"), Java.Util.Collections.SingletonList(wordNode)); } daughters.Add(wordNode); } return(new LabeledScoredTreeNode(new StringLabel("S"), daughters)); }
/// <summary> /// Return a <code>TreeFactory</code> that produces trees of type /// <code>TreeGraphNode</code>, with the <code>Label</code> made /// by the supplied <code>LabelFactory</code>. The factory /// returned is a different one each time. /// </summary> /// <param name="lf">The <code>LabelFactory</code> to use</param> /// <returns>a factory to produce treegraphs</returns> public static ITreeFactory Factory(ILabelFactory lf) { return new TreeGraphNodeFactory(lf); }
/// <summary> /// Create a new TreeReaderFactory with CoreLabel labels. /// </summary> public LabeledScoredTreeReaderFactory() { lf = CoreLabel.Factory(); tm = new BobChrisTreeNormalizer(); }
/// <summary>Add -TMP when not present within an NP</summary> /// <param name="tree">The tree to add temporal info to.</param> private void AddTMP9(Tree tree) { // do the head chain under it Tree ht = headFinder.DetermineHead(tree); // special fix for possessives! -- make noun before head if (ht.Value().Equals("POS")) { int j = tree.ObjectIndexOf(ht); if (j > 0) { ht = tree.GetChild(j - 1); } } // Note: this next bit changes the tree label, rather // than creating a new tree node. Beware! if (ht.IsPreTerminal() || ht.Value().StartsWith("NP") || ht.Value().StartsWith("PP") || ht.Value().StartsWith("ADVP")) { if (!TmpPattern.Matcher(ht.Value()).Matches()) { ILabelFactory lf = ht.LabelFactory(); // log.info("TMP: Changing " + ht.value() + " to " + // ht.value() + "-TMP"); ht.SetLabel(lf.NewLabel(ht.Value() + "-TMP")); } if (ht.Value().StartsWith("NP") || ht.Value().StartsWith("PP") || ht.Value().StartsWith("ADVP")) { AddTMP9(ht); } } // do the NPs under it (which may or may not be the head chain Tree[] kidlets = tree.Children(); foreach (Tree kidlet in kidlets) { ht = kidlet; ILabelFactory lf; if (tree.IsPrePreTerminal() && !TmpPattern.Matcher(ht.Value()).Matches()) { // log.info("TMP: Changing " + ht.value() + " to " + // ht.value() + "-TMP"); lf = ht.LabelFactory(); // Note: this next bit changes the tree label, rather // than creating a new tree node. Beware! ht.SetLabel(lf.NewLabel(ht.Value() + "-TMP")); } else { if (ht.Value().StartsWith("NP")) { // don't add -TMP twice! if (!TmpPattern.Matcher(ht.Value()).Matches()) { lf = ht.LabelFactory(); // log.info("TMP: Changing " + ht.value() + " to " + // ht.value() + "-TMP"); // Note: this next bit changes the tree label, rather // than creating a new tree node. Beware! ht.SetLabel(lf.NewLabel(ht.Value() + "-TMP")); } AddTMP9(ht); } } } }
public Debinarizer(bool forceCNF, ILabelFactory lf) { this.forceCNF = forceCNF; tf = new LabeledScoredTreeFactory(lf); boundaryRemover = new BoundaryRemover(); }
public LabeledScoredTreeReaderFactory(ILabelFactory lf) { this.lf = lf; tm = new BobChrisTreeNormalizer(); }
public LabeledScoredTreeReaderFactory(ILabelFactory lf, TreeNormalizer tm) { this.lf = lf; this.tm = tm; }
public TreeGraphNodeFactory(ILabelFactory mlf) { this.mlf = mlf; }
/// <summary> /// Return a <code>TreeFactory</code> that produces trees of the /// <code>LabeledScoredTree{Node|Leaf}</code> type, with /// the <code>Label</code> made with the supplied <code>LabelFactory</code>. /// The factory returned is a different one each time /// </summary> /// <param name="lf">The LabelFactory to use</param> /// <returns>a factory to produce labeled, scored trees</returns> public static ITreeFactory Factory(ILabelFactory lf) { return new LabeledScoredTreeFactory(lf); }
public LabeledScoredTreeReaderFactory(TreeNormalizer tm) { lf = CoreLabel.Factory(); this.tm = tm; }
public ParseTreeFactory(ILabelFactory lf) : base(lf) { }