Java 类org.apache.lucene.analysis.util.FilesystemResourceLoader 实例源码

项目:lucene-tokenizers-for-multilang    文件:MultistageMappingCharFilterTest.java   
@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>());
}
项目:lucene-tokenizers-for-multilang    文件:CJKBigramFilterTest.java   
@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);
}