@Before public void setup() throws Exception { Map<String, String> args = new HashMap<String, String>(); args.put( "mapping", "src/test/resources/multistage-test/first.txt;src/test/resources/multistage-test/second.txt"); charFilterFactory = new MultistageMappingCharFilterFactory(args); charFilterFactory.inform(new FilesystemResourceLoader()); tokenizerFactory = new CJKTokenizerFactory(new HashMap<String, String>()); }
@BeforeClass public static void setUp() throws Exception { Map<String, String> map = new HashMap<String, String>(); map.put("mapping", "mapping.txt"); charFilterFactory = new MappingCharFilterFactory(map); charFilterFactory.inform(new FilesystemResourceLoader(new File( "src/test/resources/cjkbigramfilter"))); tokenizerFactory = new CJKTokenizerFactory(new HashMap<String, String>()); map = new HashMap<String, String>(); map.put("outputUnigrams", "true"); tokenFilterFactory = new CJKBigramFilterFactory(map); }