public static Dictionary <Project, double> LookingForProject(string Content, out HashSet <string> np) { np = NPExtractor.getNP(Content); string[] prefixes = { "find project about", "find project on", "find projects on", "find projects about" }; if (prefixes.Any(prefix => Content.ToLower().StartsWith(prefix))) { char[] delimiterChars = { ' ', ',', '.', ':', '\t', '?' }; var array = Content.ToLower().Split(delimiterChars); if (array.Length > 3) { for (int i = 3; i < array.Length; i++) { if (array[i] != "and" && array[i] != "or" && array[i].Length > 0) { np.Add(array[i]); } } } } if (np.Count > 0) { Dictionary <Project, double> project_list = QueryInterface.queryProject(np); return(project_list); } return(null); }
internal static HashSet <Tuple <Person, string> > LookingForTeam(string input) { HashSet <string> np = NPExtractor.getNP(input); if (np.Count > 0) { return(QueryInterface.queryTeam(np)); } return(null); }