Package edu.washington.cs.knowitall.commonlib

Examples of edu.washington.cs.knowitall.commonlib.Range


        return false;
    }

    public boolean matchesAppositiveStrict(ChunkedExtraction extr) {
        if (matches(
                ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(extr.getStart(),
                        extr.getLength())), "app_strict", true)) {
            return true;
        }
        return false;
    }
View Full Code Here


        return false;
    }

    public boolean matchesListStrict(ChunkedExtraction extr) {
        if (matches(
                ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(extr.getStart(),
                        extr.getLength())), "list_1", true)
                && !extr.getSentence()
                        .getSubSequence(extr.getStart(), extr.getLength())
                        .getPosTagsAsString().contains("IN")) {
            return true;
View Full Code Here

                        || extr.getSentence().getChunkTag(current)
                                .contains("PP")
                        || extr.getSentence().getPosTag(current).contains(",") || extr
                        .getSentence().getPosTag(current).contains("CC"))) {
            int length = argend - current;
            if ((matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(current, length)),
                    "list_1", true)
                    || matches(
                            ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(current, length)),
                            "list_3", true) || matches(ChunkedSentenceToken.tokenize(extr.getSentence(),
                    new Range(current, length)), "list_2", true))
                    && (current == 0
                            || extr.getSentence().getChunkTag(current)
                                    .equals(",")
                            || !extr.getSentence().getChunkTag(current - 1)
                                    .contains("B-VP") || !extr.getSentence()
View Full Code Here

        return false;
    }

    public boolean matchesObj(ChunkedExtraction extr, int current) {
        int length = current + 1;
        if ((matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(0, length)), "obj", true))) {
            return true;
        }
        return false;
    }
View Full Code Here

        return false;
    }

    public boolean vpStartsWithTo(ChunkedExtraction extr, int current) {
        int length = extr.getStart() - current;
        return (matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(current, length)),
                "to_verb", true));
    }
View Full Code Here

                "to_verb", true));
    }

    public boolean matchesVerbConjSimple(ChunkedExtraction extr, int current) {
        if ((matches(
                ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(current,
                        extr.getStart() - current)), "verb_conj_simple1", true))) {
            return true;
        }
        return false;
    }
View Full Code Here

                || !extr.getSentence().getChunkTag(i).equals("B-NP")) {
            return false;
        }

        int length = extr.getStart() - i;
        if (matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(i, length)), "app_1", true)
                || matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(i, length)),
                        "app_2", true)) {
            return true;
        }
        return false;
    }
View Full Code Here

    }

    public boolean simpleSubj(ChunkedExtraction extr, int i) {
        if (!extr.getSentence().getPosTag(i).startsWith("W")
                && (matches(
                        ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(i,
                                extr.getStart() - i)), "subj_simple", true))) {
            return true;
        }
        return false;
    }
View Full Code Here

        }
        return false;
    }

    public boolean quotesSubj(ChunkedExtraction extr, int i) {
        if (matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(i, extr.getStart() - i)),
                "subj_quotes1", true)
                || matches(
                        ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(i,
                                extr.getStart() - i)), "subj_quotes2", true)) {
            return true;
        }
        return false;
    }
View Full Code Here

        }
        return false;
    }

    public boolean relSubj(ChunkedExtraction extr, int i) {
        if (matches(ChunkedSentenceToken.tokenize(extr.getSentence(), new Range(i, extr.getStart() - i)),
                "subj_rel", true)) {
            return true;
        }
        return false;
    }
View Full Code Here

TOP

Related Classes of edu.washington.cs.knowitall.commonlib.Range

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.