Package org.apache.stanbol.enhancer.ldpath.function

Examples of org.apache.stanbol.enhancer.ldpath.function.SuggestionFunction


            } catch (ParseException e) {
                throw new IllegalStateException("Unable to parse the ld-path selector '" +
                        path + "'used to select the confidence of suggestions!", e);
            }
            //The resultSelector is NULL because this directly returns the EntityAnnotations
            addFunction(CONFIG,new SuggestionFunction("suggestion",linkedEntityAnnotations,confidenceSelector,null));
           
            //Suggested Entities for Text/TopicAnnotations
           
            //The suggestion and confidence selectors can be the same as above,
            //but we need an additional result selector
            NodeSelector<Resource> entityReferenceSelector;
            path = ENHANCER_ENTITY_REFERENCE.toString();
            try {
                entityReferenceSelector = Utils.parseSelector(path);
            } catch (ParseException e) {
                throw new IllegalStateException("Unable to parse the ld-path selector '" +
                        path + "'used to select the entity referenced by a EntityAnnotation!", e);
            }
            addFunction(CONFIG, new SuggestionFunction("suggestedEntity",
                linkedEntityAnnotations,confidenceSelector,entityReferenceSelector));
           
        }
        return CONFIG;
    }
View Full Code Here

TOP

Related Classes of org.apache.stanbol.enhancer.ldpath.function.SuggestionFunction

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.