lucene-pylucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject svn commit: r1426882 - /lucene/pylucene/trunk/test/test_ThaiAnalyzer.py
Date Sun, 30 Dec 2012 01:47:49 GMT
Author: vajda
Date: Sun Dec 30 01:47:49 2012
New Revision: 1426882

URL: http://svn.apache.org/viewvc?rev=1426882&view=rev
Log:
migrated test_ThaiAnalyzer.py

Modified:
    lucene/pylucene/trunk/test/test_ThaiAnalyzer.py

Modified: lucene/pylucene/trunk/test/test_ThaiAnalyzer.py
URL: http://svn.apache.org/viewvc/lucene/pylucene/trunk/test/test_ThaiAnalyzer.py?rev=1426882&r1=1426881&r2=1426882&view=diff
==============================================================================
--- lucene/pylucene/trunk/test/test_ThaiAnalyzer.py (original)
+++ lucene/pylucene/trunk/test/test_ThaiAnalyzer.py Sun Dec 30 01:47:49 2012
@@ -14,16 +14,20 @@
 # ====================================================================
 
 from unittest import TestCase, main
-from lucene import ThaiAnalyzer, ThaiWordFilter, StringReader, Version
 from BaseTokenStreamTestCase import BaseTokenStreamTestCase
 
+from java.io import StringReader
+from org.apache.lucene.analysis.th import ThaiAnalyzer, ThaiWordFilter
+from org.apache.lucene.analysis.util import CharArraySet
+from org.apache.lucene.util import Version
+
 
 class ThaiAnalyzerTestCase(BaseTokenStreamTestCase):
 
     def testOffsets(self):
         self.assert_(ThaiWordFilter.DBBI_AVAILABLE,
                      "JRE does not support Thai dictionary-based BreakIterator")
-        self._assertAnalyzesTo(ThaiAnalyzer(Version.LUCENE_CURRENT),
+        self._assertAnalyzesTo(ThaiAnalyzer(Version.LUCENE_CURRENT, CharArraySet.EMPTY_SET),
                                u"การที่ได้ต้องแสดงว่างานดี",

                                [ u"การ", u"ที่", u"ได้",
u"ต้อง", u"แสดง",
                                  u"ว่า", u"งาน", u"ดี"
],
@@ -34,27 +38,6 @@ class ThaiAnalyzerTestCase(BaseTokenStre
         self.assert_(ThaiWordFilter.DBBI_AVAILABLE,
                      "JRE does not support Thai dictionary-based BreakIterator")
 
-        self._assertAnalyzesTo(ThaiAnalyzer(Version.LUCENE_CURRENT),
-                               u"การที่ได้ต้องแสดงว่างานดี
๑๒๓", 
-                               [ u"การ", u"ที่", u"ได้",
u"ต้อง", u"แสดง",
-                                 u"ว่า", u"งาน", u"ดี",
u"๑๒๓" ],
-                               None, None,
-                               [ "<SOUTHEAST_ASIAN>", "<SOUTHEAST_ASIAN>", 
-                                 "<SOUTHEAST_ASIAN>", "<SOUTHEAST_ASIAN>", 
-                                 "<SOUTHEAST_ASIAN>", "<SOUTHEAST_ASIAN>",
-                                 "<SOUTHEAST_ASIAN>", "<SOUTHEAST_ASIAN>",
-                                 "<NUM>" ])
-
-    def testPositionIncrements(self):
-        self.assert_(ThaiWordFilter.DBBI_AVAILABLE,
-                     "JRE does not support Thai dictionary-based BreakIterator")
-
-        analyzer = ThaiAnalyzer(Version.LUCENE_CURRENT)
-=======
-    def testTokenType(self):
-        self.assert_(ThaiWordFilter.DBBI_AVAILABLE,
-                     "JRE does not support Thai dictionary-based BreakIterator")
-
         self._assertAnalyzesTo(ThaiAnalyzer(Version.LUCENE_35),
                                u"การที่ได้ต้องแสดงว่างานดี
๑๒๓", 
                                [ u"การ", u"ที่", u"ได้",
u"ต้อง", u"แสดง",
@@ -92,7 +75,6 @@ class ThaiAnalyzerTestCase(BaseTokenStre
     def testAnalyzer30(self):
 
         analyzer = ThaiAnalyzer(Version.LUCENE_30)
->>>>>>> .merge-right.r1358562
 
         self._assertAnalyzesTo(analyzer, u"การที่ได้ต้อง
the แสดงว่างานดี", 
                                [ u"การ", u"ที่", u"ได้",
u"ต้อง", u"แสดง",



Mime
View raw message