Package com.bericotech.clavin.resolver

Examples of com.bericotech.clavin.resolver.ClavinLocationResolver


     * @param maxContextWindow    the maximum context window
     * @param fuzzy               switch to turn on/off fuzzy matching
     */
    public GeoParser(LocationExtractor extractor, Gazetteer gazetteer, int maxHitDepth, int maxContextWindow, boolean fuzzy) {
        this.extractor = extractor;
        this.resolver = new ClavinLocationResolver(gazetteer);
        this.maxHitDepth = maxHitDepth;
        this.maxContextWindow = maxContextWindow;
        this.fuzzy = fuzzy;
    }
View Full Code Here


        // convert Stanford NER output to ClavinLocationResolver input
        List<LocationOccurrence> locationsForCLAVIN = convertNERtoCLAVIN(entitiesFromNER, inputString);

        // instantiate the CLAVIN location resolver
        ClavinLocationResolver clavinLocationResolver = new ClavinLocationResolver(new LuceneGazetteer(new File("./IndexDirectory")));

        // resolve location entities extracted from input text
        List<ResolvedLocation> resolvedLocations = clavinLocationResolver.resolveLocations(locationsForCLAVIN, 1, 1, false);

        // Display the ResolvedLocations found for the location names
        for (ResolvedLocation resolvedLocation : resolvedLocations)
            System.out.println(resolvedLocation);
    }
View Full Code Here

TOP

Related Classes of com.bericotech.clavin.resolver.ClavinLocationResolver

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.