Package edu.washington.cs.knowitall.extractor.conf

Examples of edu.washington.cs.knowitall.extractor.conf.ReVerbOpenNlpConfFunction


            System.out.println(token + " " + posTag + " " + chunkTag);
        }

        // Prints out extractions from the sentence.
        ReVerbExtractor reverb = new ReVerbExtractor();
        ConfidenceFunction confFunc = new ReVerbOpenNlpConfFunction();
        for (ChunkedBinaryExtraction extr : reverb.extract(sent)) {
            double conf = confFunc.getConf(extr);
            System.out.println("Arg1=" + extr.getArgument1());
            System.out.println("Rel=" + extr.getRelation());
            System.out.println("Arg2=" + extr.getArgument2());
            System.out.println("Conf=" + conf);
        }
View Full Code Here


                messageInc("Initializing ReVerb extractor...");
                extractor = new ReVerbExtractor(minFreq, useSynLexConstraints,
                        mergeOverlapRels, allowUnary);
                message("Done.");
                messageInc("Initializing confidence function...");
                confFunc = new ReVerbOpenNlpConfFunction();
                message("Done.");
            }

            if (filterPronouns) {
                extractor.getArgument1Extractor().addMapper(
View Full Code Here

        System.err.print("Initializing extractor...");
        ReVerbExtractor extractor = new ReVerbExtractor();
        System.err.println("Done.");

        System.err.print("Initializing confidence function...");
        ConfidenceFunction scoreFunc = new ReVerbOpenNlpConfFunction();
        System.err.println("Done.");

        System.err.print("Initializing NLP tools...");
        ChunkedSentenceReader sentReader = DefaultObjects.getDefaultSentenceReader(reader);
        System.err.println("Done.");

        Joiner joiner = Joiner.on("\t");

        for (ChunkedSentence sent : sentReader.getSentences()) {

            sentenceCount++;

            String sentString = sent.getTokensAsString();
            System.out.println(String.format("sentence\t%s\t%s", sentenceCount, sentString));

            for (ChunkedBinaryExtraction extr : extractor.extract(sent)) {

                double score = scoreFunc.getConf(extr);

                String arg1 = extr.getArgument1().toString();
                String rel = extr.getRelation().toString();
                String arg2 = extr.getArgument2().toString();
View Full Code Here

TOP

Related Classes of edu.washington.cs.knowitall.extractor.conf.ReVerbOpenNlpConfFunction

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.