상속: IDisposable
예제 #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);
     }
 }
예제 #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);
     }
 }
예제 #3
0
 public MaximumMatchTokenBreaker(Dawg dawg, RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
     _dawg   = dawg;
 }
예제 #4
0
 public MaximumMatchTokenBreaker(Dawg dawg, RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
     _dawg = dawg;
 }
예제 #5
0
 public BigramTokenBreaker(RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
 }
예제 #6
0
 public BigramTokenBreaker(RewindStringReader reader)
     : base(reader)
 {
     _reader = reader;
 }
예제 #7
0
 public WhiteSpaceTokenBreaker(RewindStringReader stringReader)
 {
     _reader = stringReader;
 }
예제 #8
0
 public WhiteSpaceTokenBreaker(RewindStringReader stringReader)
 {
     _reader = stringReader;
 }