Package org.dbpedia.spotlight.spot.cooccurrence.classification

Examples of org.dbpedia.spotlight.spot.cooccurrence.classification.SpotClassifier.classify()


        SurfaceFormOccurrence unigramOccurrence = new SurfaceFormOccurrence(new SurfaceForm("Berlin"),
                        taggedText, 41, Provenance.Undefined(), -1);

        try {
            unigramClassifier.classify(unigramOccurrence);
            ngramClassifier.classify(ngramOccurrence);
        } catch (Exception e) {
            throw new InitializationException("An error occurred while classifying a test spot using the co-occurrence " +
                    "based spot selector. This is most probably caused by an outdated spot selector model. Please " +
                    "check the spot selector models defined 'org.dbpedia.spotlight.spot.cooccurrence.classifier.*'.", e);
        }
View Full Code Here


         * n > 1
         */

        SpotClassification spotClassification;
        try{
          spotClassification = ngramClassifier.classify(surfaceFormOccurrence);
        }catch (Exception e) {
                    LOG.error("Exception when classifying ngram candidate: " + e);
                    continue;
        }

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.