17
17
18
18
public class WordToSentenceProcessorTest extends TestCase {
19
19
20
- private static final Annotator ud = new TokenizerAnnotator (false , "en" );
21
- private static final Annotator udNL = new TokenizerAnnotator (false , "en" , "invertible,tokenizeNLs=true" );
22
- private static final Annotator wsNL =
20
+ private static final TokenizerAnnotator ud =
21
+ new TokenizerAnnotator (false , "en" );
22
+ private static final TokenizerAnnotator udNL =
23
+ new TokenizerAnnotator (false , "en" , "invertible,tokenizeNLs=true" );
24
+ private static final TokenizerAnnotator wsNL =
23
25
new TokenizerAnnotator (false , PropertiesUtils .asProperties ("tokenize.whitespace" , "true" , "invertible" , "true" , "tokenizeNLs" , "true" ));
24
26
25
27
private static final WordToSentenceProcessor <CoreLabel > wts = new WordToSentenceProcessor <>();
@@ -35,7 +37,7 @@ private static void checkResult(WordToSentenceProcessor<CoreLabel> wts,
35
37
}
36
38
37
39
private static void checkResult (WordToSentenceProcessor <CoreLabel > wts ,
38
- Annotator tokenizer ,
40
+ TokenizerAnnotator tokenizer ,
39
41
String testSentence , String ... gold ) {
40
42
Annotation annotation = new Annotation (testSentence );
41
43
udNL .annotate (annotation );
@@ -211,7 +213,9 @@ public void testExclamationPoint() {
211
213
}
212
214
213
215
public void testChinese () {
214
- checkResult (cwts , wsNL ,"巴拉特 说 : 「 我们 未 再 获得 任何 结果 。 」 < 金融时报 ? > 《 金融时报 》 周三" ,
216
+ checkResult (cwts ,
217
+ wsNL ,
218
+ "巴拉特 说 : 「 我们 未 再 获得 任何 结果 。 」 < 金融时报 ? > 《 金融时报 》 周三" ,
215
219
"巴拉特 说 : 「 我们 未 再 获得 任何 结果 。 」" ,
216
220
"< 金融时报 ? >" ,
217
221
"《 金融时报 》 周三" );
0 commit comments