Esempio n. 1
0
 public IEnumerable <Token> Traverse(string text)
 {
     if (string.IsNullOrEmpty(text))
     {
         yield break;
     }
     using (var reader = new RewindStringReader(text, this.OptionOutputOriginalCase))
     {
         var breaker = new MaximumMatchTokenBreaker(_dawg, reader);
         var token   = breaker.Next();
         do
         {
             yield return(token);
         } while ((token = breaker.Next()) != null);
     }
 }
Esempio n. 2
0
 public IEnumerable<Token> Traverse(string text)
 {
     if (string.IsNullOrEmpty(text))
     {
         yield break;
     }
     using (var reader = new RewindStringReader(text, this.OptionOutputOriginalCase))
     {
         var breaker = new MaximumMatchTokenBreaker(_dawg, reader);
         var token = breaker.Next();
         do
         {
             yield return token;
         } while ((token = breaker.Next()) != null);
     }
 }
Esempio n. 3
0
 public MaximumMatchTokenBreaker(Dawg dawg, RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
     _dawg   = dawg;
 }
 public MaximumMatchTokenBreaker(Dawg dawg, RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
     _dawg = dawg;
 }
Esempio n. 5
0
 public BigramTokenBreaker(RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
 }
Esempio n. 6
0
 public BigramTokenBreaker(RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
 }
 public WhiteSpaceTokenBreaker(RewindStringReader stringReader)
 {
     _reader = stringReader;
 }
Esempio n. 8
0
 public WhiteSpaceTokenBreaker(RewindStringReader stringReader)
 {
     _reader = stringReader;
 }