lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject git commit: Actually running the analyzer in the test
Date Mon, 16 Jun 2014 22:34:15 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master c7aa99cd4 -> fb5123036


Actually running the analyzer in the test


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/fb512303
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/fb512303
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/fb512303

Branch: refs/heads/master
Commit: fb5123036fe621847e15e5de14162409cd61134a
Parents: c7aa99c
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Tue Jun 17 01:34:23 2014 +0300
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Tue Jun 17 01:34:23 2014 +0300

----------------------------------------------------------------------
 test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/fb512303/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs
----------------------------------------------------------------------
diff --git a/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs b/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs
index b374f0e..b4ee467 100644
--- a/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs
+++ b/test/contrib/Snowball/Analysis/Snowball/TestSnowball.cs
@@ -47,10 +47,14 @@ namespace Lucene.Net.Analysis.Snowball
         {
             foreach (var file in Directory.GetFiles(Path.Combine(Paths.ProjectRootDirectory,
@"test-files\analysis")))
             {
-                Console.WriteLine(file);
                 using (Analyzer a = new SnowballAnalyzer(Version.LUCENE_CURRENT, "Turkish"))
                 {
-                    a.TokenStream("dummy", new System.IO.StringReader(File.ReadAllText(file)));
+                    var ts = a.TokenStream("dummy", new System.IO.StringReader(File.ReadAllText(file)));
+                    while (ts.IncrementToken())
+                    {
+                        var att = ts.GetAttribute<ITermAttribute>();
+                        Console.WriteLine(att.Term);
+                    }
                 }
             }
         }


Mime
View raw message