public string StringAt(AmbiguousPhrasePointer pointer)
        {
            int index = pointer.StringTokenIndex;

            if (index >= stringTokens.Count)
                return null;

            return stringTokens[index];
        }
Ejemplo n.º 2
0
        public PatternMatch CloneWithEnd(AmbiguousPhrasePointer end)
        {
            PatternMatch match = new PatternMatch();
            match.dictionary = new Dictionary<string, string>(dictionary);
            match.start = start;
            match.end = end;

            return match;
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 6
0
 public PatternMatch(AmbiguousPhrasePointer startend)
 {
     dictionary = new Dictionary<string, string>();
     start = end = startend;
 }
Ejemplo n.º 7
0
 public PatternMatch()
 {
     dictionary = new Dictionary<string, string>();
     start = new AmbiguousPhrasePointer(0);
     end = new AmbiguousPhrasePointer(0);
 }
Ejemplo n.º 8
0
 public PatternMatch(AmbiguousPhrasePointer startend)
 {
     dictionary = new Dictionary <string, string>();
     start      = end = startend;
 }
Ejemplo n.º 9
0
 public PatternMatch()
 {
     dictionary = new Dictionary <string, string>();
     start      = new AmbiguousPhrasePointer(0);
     end        = new AmbiguousPhrasePointer(0);
 }