Examples of SnippetExtractor


Examples of com.astamuse.asta4d.snippet.extract.SnippetExtractor

    @Override
    public Renderer invoke(String renderDeclaration) throws SnippetNotResovlableException, SnippetInvokeException {
        Configuration conf = Context.getCurrentThreadContext().getConfiguration();

        SnippetExtractor extractor = conf.getSnippetExtractor();
        SnippetDeclarationInfo declaration = extractor.extract(renderDeclaration);

        SnippetResolver resolver = conf.getSnippetResolver();
        SnippetExcecutionInfo exeInfo = resolver.resloveSnippet(declaration);

        SnippetExecutionHolder execution = new SnippetExecutionHolder(declaration, exeInfo.getInstance(), exeInfo.getMethod(), null, null);
View Full Code Here

Examples of com.astamuse.asta4d.snippet.extract.SnippetExtractor

    @Override
    public Renderer invoke(String renderDeclaration) throws SnippetNotResovlableException, SnippetInvokeException {
        Configuration conf = Configuration.getConfiguration();

        SnippetExtractor extractor = conf.getSnippetExtractor();
        SnippetDeclarationInfo declaration = extractor.extract(renderDeclaration);

        SnippetResolver resolver = conf.getSnippetResolver();
        SnippetExcecutionInfo exeInfo = resolver.resloveSnippet(declaration);

        SnippetExecutionHolder execution = new SnippetExecutionHolder(declaration, exeInfo.getInstance(), exeInfo.getMethod(), null, null);
View Full Code Here

Examples of net.yacy.document.SnippetExtractor

        final Collection<StringBuilder> sentences = document.getSentences(pre);
        if (sentences == null) {
            init(url.hash(), null, ResultClass.ERROR_PARSER_NO_LINES, "parser returned no sentences");
            return;
        }
        final SnippetExtractor tsr;
        String textline = null;
        HandleSet remainingHashes = queryhashes;
        try {
            tsr = new SnippetExtractor(sentences, queryhashes, snippetMaxLength);
            textline = tsr.getSnippet();
            remainingHashes =  tsr.getRemainingWords();
        } catch (final UnsupportedOperationException e) {
            init(url.hash(), null, ResultClass.ERROR_NO_MATCH, "no matching snippet found");
            return;
        }
View Full Code Here

Examples of net.yacy.document.SnippetExtractor

                init(url.hash(), s.length() > 0 ? s.toString() : this.line, ResultClass.SOURCE_METADATA, null);
                return;
            }

            try {
                final SnippetExtractor tsr = new SnippetExtractor(sentences, queryhashes, snippetMaxLength);
                textline = tsr.getSnippet();
                remainingHashes =  tsr.getRemainingWords();
            } catch (final UnsupportedOperationException e) {
                init(url.hash(), null, ResultClass.ERROR_NO_MATCH, "no matching snippet found");
                return;
            }
        } //encapsulate potential expensive sentences END
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.