Package edu.washington.cs.knowitall.extractor

Examples of edu.washington.cs.knowitall.extractor.ReVerbExtractor


   
   
    @Before
    public void setUp() throws Exception {
      if(regReverb == null) {
          regReverb = new ReVerbExtractor();
        }
        if (relaxedReverb == null) {
          relaxedReverb = new ReVerbExtractor(0, false, false, true);
        }
        expected = new HashSet<String>();
    }
View Full Code Here


    /**
     * No filtering adds relations that contain TO, and unary relations.
     * @throws Exception
     */
    public void testNoFiltersExtract5() throws Exception {
      reverb = new ReVerbExtractor(0, false, true, true);//relaxedReverb; 
        got = extractRels(
                "The key schedule for decryption is similar - the subkeys are in reverse order compared to encryption .",
                "DT JJ NN IN NN VBZ JJ : DT NNS VBP IN NN NN VBN TO NN .",
                "B-NP I-NP I-NP O B-NP O O O B-NP I-NP O O B-NP I-NP O O B-NP O"
        );
View Full Code Here

            String chunkTag = sent.getChunkTag(i);
            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

        OutputStream outStream = new FileOutputStream(args[1]);
        LabeledBinaryExtractionWriter out = new LabeledBinaryExtractionWriter(
                outStream);

        ReVerbExtractor extractor = new ReVerbExtractor();

        for (ChunkedSentence sent : sentReader.getSentences()) {
            for (ChunkedBinaryExtraction extr : extractor.extract(sent)) {
                LabeledBinaryExtraction extrLabeled = new LabeledBinaryExtraction(
                        extr, 0);
                out.writeExtraction(extrLabeled);
            }
        }
View Full Code Here

                messageInc("Initializing confidence function...");
                confFunc = new ConfidenceMetric();
                message("Done.");
            } else {
                messageInc("Initializing ReVerb extractor...");
                extractor = new ReVerbExtractor(minFreq, useSynLexConstraints,
                        mergeOverlapRels, allowUnary);
                message("Done.");
                messageInc("Initializing confidence function...");
                confFunc = new ReVerbOpenNlpConfFunction();
                message("Done.");
View Full Code Here

TOP

Related Classes of edu.washington.cs.knowitall.extractor.ReVerbExtractor

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.