Search in sources :

Example 1 with LuceneLabelTokenizer

use of org.apache.stanbol.enhancer.engines.entitylinking.labeltokenizer.lucene.LuceneLabelTokenizer in project stanbol by apache.

the class TokenizerAndTokenFIlterTest method init.

@BeforeClass
public static void init() throws ConfigurationException {
    Dictionary<String, Object> config = new Hashtable<String, Object>();
    config.put(LuceneLabelTokenizer.PROPERTY_TOKENIZER_FACTORY, TOKENIZER_FACTORY_CLASS);
    config.put(LuceneLabelTokenizer.PROPERTY_TOKEN_FILTER_FACTORY, TOKEN_FILTER_FACTORY_CLASSES);
    config.put(LabelTokenizer.SUPPORTED_LANUAGES, "zh");
    ComponentContext cc = new MockComponentContext(config);
    luceneLabelTokenizer = new LuceneLabelTokenizer();
    luceneLabelTokenizer.activate(cc);
}
Also used : LuceneLabelTokenizer(org.apache.stanbol.enhancer.engines.entitylinking.labeltokenizer.lucene.LuceneLabelTokenizer) ComponentContext(org.osgi.service.component.ComponentContext) Hashtable(java.util.Hashtable) BeforeClass(org.junit.BeforeClass)

Example 2 with LuceneLabelTokenizer

use of org.apache.stanbol.enhancer.engines.entitylinking.labeltokenizer.lucene.LuceneLabelTokenizer in project stanbol by apache.

the class LuceneLabelTokenizerTest method init.

@BeforeClass
public static void init() throws ConfigurationException {
    Dictionary<String, Object> config = new Hashtable<String, Object>();
    config.put(LuceneLabelTokenizer.PROPERTY_TOKENIZER_FACTORY, TOKENIZER_FACTORY_CLASS);
    config.put(LabelTokenizer.SUPPORTED_LANUAGES, "en");
    ComponentContext cc = new MockComponentContext(config);
    luceneLabelTokenizer = new LuceneLabelTokenizer();
    luceneLabelTokenizer.activate(cc);
}
Also used : LuceneLabelTokenizer(org.apache.stanbol.enhancer.engines.entitylinking.labeltokenizer.lucene.LuceneLabelTokenizer) ComponentContext(org.osgi.service.component.ComponentContext) Hashtable(java.util.Hashtable) BeforeClass(org.junit.BeforeClass)

Aggregations

Hashtable (java.util.Hashtable)2 LuceneLabelTokenizer (org.apache.stanbol.enhancer.engines.entitylinking.labeltokenizer.lucene.LuceneLabelTokenizer)2 BeforeClass (org.junit.BeforeClass)2 ComponentContext (org.osgi.service.component.ComponentContext)2