FileDocCategorySizeDatePackage
TestThaiAnalyzer.javaAPI DocApache Lucene 2.1.02447Wed Feb 14 10:46:28 GMT 2007org.apache.lucene.analysis.th

TestThaiAnalyzer

public class TestThaiAnalyzer extends TestCase
Test case for ThaiAnalyzer, modified from TestFrenchAnalyzer
author
Samphan Raruenrom
version
0.1

Fields Summary
Constructors Summary
Methods Summary
public voidassertAnalyzesTo(org.apache.lucene.analysis.Analyzer a, java.lang.String input, java.lang.String[] output)


		TokenStream ts = a.tokenStream("dummy", new StringReader(input));

		for (int i = 0; i < output.length; i++) {
			Token t = ts.next();
			assertNotNull(t);
			assertEquals(t.termText(), output[i]);
		}
		assertNull(ts.next());
		ts.close();
	
public voidtestAnalyzer()

		ThaiAnalyzer analyzer = new ThaiAnalyzer();
	
		assertAnalyzesTo(analyzer, "", new String[] {});

		assertAnalyzesTo(
			analyzer,
			"āļ