Package org.xbib.elasticsearch.index.analysis.skos

Examples of org.xbib.elasticsearch.index.analysis.skos.SKOSAnalyzer


        /* setting up the SKOS analyzer */
        String skosFile = "src/test/resources/skos_samples/ukat_examples.n3";
        String indexPath = "target/";

        /* ExpansionType.URI->the field to be analyzed (expanded) contains URIs */
        Analyzer skosAnalyzer = new SKOSAnalyzer(indexPath, skosFile, ExpansionType.URI);

        /* Define different analyzers for different fields */
        Map<String, Analyzer> analyzerPerField = new HashMap<String, Analyzer>();
        analyzerPerField.put("subject", skosAnalyzer);
        PerFieldAnalyzerWrapper indexAnalyzer = new PerFieldAnalyzerWrapper(
View Full Code Here


        /* setting up the SKOS analyzer */
        String skosFile = "src/test/resources/skos_samples/ukat_examples.n3";
        String indexPath = "target/";

        /* ExpansionType.URI->the field to be analyzed (expanded) contains URIs */
        Analyzer skosAnalyzer = new SKOSAnalyzer(indexPath, skosFile,
                ExpansionType.LABEL);

        /* Define different analyzers for different fields */
        Map<String, Analyzer> analyzerPerField = new HashMap<String, Analyzer>();
        analyzerPerField.put("subject", skosAnalyzer);
View Full Code Here

    @BeforeMethod
    @Override
    public void setUp() throws Exception {
        super.setUp();
        skosAnalyzer = new SKOSAnalyzer(skosEngine, ExpansionType.URI);
        writer = new IndexWriter(directory, new IndexWriterConfig(SKOSAnalysisPlugin.getLuceneVersion(),
                skosAnalyzer));
    }
View Full Code Here

    // @Test
    public void displayTokensWithURIExpansion() throws IOException {

        String text = "http://example.com/concept/1";

        skosAnalyzer = new SKOSAnalyzer(skosEngine, ExpansionType.URI);

        AnalyzerUtils.displayTokensWithFullDetails(skosAnalyzer, text);
        // AnalyzerUtils.displayTokensWithPositions(synonymAnalyzer, text);

    }
View Full Code Here

    @BeforeMethod
    @Override
    public void setUp() throws Exception {
        super.setUp();
        skosAnalyzer = new SKOSAnalyzer(skosEngine,
                SKOSAnalyzer.ExpansionType.LABEL);
        writer = new IndexWriter(directory, new IndexWriterConfig(SKOSAnalysisPlugin.getLuceneVersion(),
                skosAnalyzer));
    }
View Full Code Here

TOP

Related Classes of org.xbib.elasticsearch.index.analysis.skos.SKOSAnalyzer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.