equal
deleted
inserted
replaced
|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "itk.h" |
|
19 |
|
20 #include "CLucene.h" |
|
21 |
|
22 #include <iostream> |
|
23 |
|
24 #include "testutils.h" |
|
25 |
|
26 #include "evaluationtool.h" |
|
27 #include "analysisunittest.h" |
|
28 #include "koreananalyzer.h" |
|
29 |
|
30 using namespace analysis; |
|
31 using namespace evaluationtool; |
|
32 using namespace lucene::util; |
|
33 |
|
34 using namespace lucene::analysis; |
|
35 |
|
36 void KoreanAnalyzerTest(Itk::TestMgr* /*testMgr*/) { |
|
37 analysis::KoreanAnalyzer analyzer; |
|
38 |
|
39 Corpus corpus(KOREAN_TEXTCORPUS); |
|
40 |
|
41 for (int i = 0; i < corpus.size(); i++) { |
|
42 printTokens(analyzer, corpus[i]); |
|
43 } |
|
44 } |
|
45 |
|
46 Itk::TesterBase * CreateKoreanAnalyzerUnitTest() |
|
47 { |
|
48 using namespace Itk; |
|
49 SuiteTester |
|
50 * testSuite = |
|
51 new SuiteTester( "korean" ); |
|
52 |
|
53 testSuite->add( "korean", KoreanAnalyzerTest, "korean" ); |
|
54 return testSuite; |
|
55 } |