public string StringAt(AmbiguousPhrasePointer pointer) { int index = pointer.StringTokenIndex; if (index >= stringTokens.Count) return null; return stringTokens[index]; }
public PatternMatch CloneWithEnd(AmbiguousPhrasePointer end) { PatternMatch match = new PatternMatch(); match.dictionary = new Dictionary<string, string>(dictionary); match.start = start; match.end = end; return match; }
public PatternMatch CloneWithEnd(AmbiguousPhrasePointer end) { PatternMatch match = new PatternMatch(); match.dictionary = new Dictionary <string, string>(dictionary); match.start = start; match.end = end; return(match); }
public string StringAt(AmbiguousPhrasePointer pointer) { int index = pointer.StringTokenIndex; if (index >= stringTokens.Count) { return(null); } return(stringTokens[index]); }
public override List <PatternMatch> AllMatches(AmbiguousPhrase subject, PatternMatch before) { List <PatternMatch> matches = new List <PatternMatch>(); PatternMatch attempt = before; while (!attempt.End.Equals(subject.End)) { matches.Add(attempt); AmbiguousPhrasePointer next = attempt.Start.PointerFurtheredBy(1); attempt = new PatternMatch(next); } return(matches); }
public PatternMatch(AmbiguousPhrasePointer startend) { dictionary = new Dictionary<string, string>(); start = end = startend; }
public PatternMatch() { dictionary = new Dictionary<string, string>(); start = new AmbiguousPhrasePointer(0); end = new AmbiguousPhrasePointer(0); }
public PatternMatch(AmbiguousPhrasePointer startend) { dictionary = new Dictionary <string, string>(); start = end = startend; }
public PatternMatch() { dictionary = new Dictionary <string, string>(); start = new AmbiguousPhrasePointer(0); end = new AmbiguousPhrasePointer(0); }