Package edu.washington.cs.knowitall.nlp.extraction

Examples of edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction


    }

    private Predicate<ChunkedBinaryExtraction> relPronounBeforeRel() {
        return new Predicate<ChunkedBinaryExtraction>() {
            public boolean apply(ChunkedBinaryExtraction e) {
                ChunkedExtraction pred = e.getRelation();
                int predStart = pred.getStart();
                if (predStart > 0) {
                    String precToken = e.getSentence().getTokens()
                            .get(predStart - 1).toLowerCase();
                    if (precToken.equals("which") || precToken.equals("who")
                            || precToken.equals("that")) {
View Full Code Here


    }

    public Predicate<ChunkedBinaryExtraction> relIsOneVerb() {
        return new Predicate<ChunkedBinaryExtraction>() {
            public boolean apply(ChunkedBinaryExtraction e) {
                ChunkedExtraction rel = e.getRelation();
                List<String> posTags = rel.getPosTags();
                return posTags.size() == 1 && posTags.get(0).startsWith("V");
            }
        };
    }
View Full Code Here

    }

    private Predicate<ChunkedBinaryExtraction> tokenBeforeRel(final String token) {
        return new Predicate<ChunkedBinaryExtraction>() {
            public boolean apply(ChunkedBinaryExtraction e) {
                ChunkedExtraction rel = e.getRelation();
                int relStart = rel.getStart();
                if (relStart > 0) {
                    String precTok = e.getSentence().getTokens()
                            .get(relStart - 1);
                    if (precTok.equalsIgnoreCase(token)) {
                        return true;
View Full Code Here

TOP

Related Classes of edu.washington.cs.knowitall.nlp.extraction.ChunkedExtraction

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.