internal List <ClueFragment> GetBranches(Clue clue) { string[] fragments = clue.Fragments; if (ClueTree.ContainsKey(fragments[0]) == false) { throw new IndexOutOfRangeException("The partial clue doesn't exit."); } // Retrieve ClueTreeNode note = GetTreeNode(clue); return(note.GetClueFraments()); }
internal void GetBranches(Clue clue, out List <ClueFragment> nextFragments, out List <Document> foundDocuments) { string[] fragments = clue.Fragments; if (ClueTree.ContainsKey(fragments[0]) == false) { throw new IndexOutOfRangeException("The partial clue doesn't exit."); } // Retrieve foundDocuments = ClueTree[fragments[0]].GetDocuments(fragments, 0); ClueTreeNode note = GetTreeNode(clue); nextFragments = note.GetClueFraments(); }
/// <summary> /// Given a bunch of keyphrases, suggest found documents and next steps /// </summary> /// <param name="keyPhrases"></param> /// <param name="nextFragments"></param> /// <param name="foundDocuments"></param> public void SearchForClueFragments(Clue clue, out List <ClueFragment> nextFragments, out List <Document> foundDocuments) { // If we have an exact match, then foundDocuments are results of that match, and nextFragments are sibglings of that match ClueTreeNode node = GetTreeNode(clue); if (node != null) { foundDocuments = node.Documents; nextFragments = node.GetClueFraments(); } // If we don't have an exact match, then foundDocuments are none, and nextFragmetns are possible fragments to use else { foundDocuments = null; // Or empty nextFragments = GetPossibleClueFragments(clue); } }