Package edu.washington.cs.knowitall.nlp

Examples of edu.washington.cs.knowitall.nlp.OpenNlpChunkedSentenceParser


        expectedRanges.add(new Range(7, 2)); // this morning
        expectedRanges.add(new Range(10, 5)); // all those suffering and mourning
        expectedRanges.add(new Range(16, 2)); // the wake
        expectedRanges.add(new Range(19, 3)); // this unthinkable tragedy

        OpenNlpChunkedSentenceParser reader = new OpenNlpChunkedSentenceParser();
        reader.attachOfs(false);
        ChunkedSentence sent = reader.parseSentence(sentStr);

        ArrayList<Range> gotRanges = new ArrayList<Range>();
        Iterables.addAll(gotRanges, sent.getNpChunkRanges());

        assertEquals(expectedLength, sent.getLength());
View Full Code Here

TOP

Related Classes of edu.washington.cs.knowitall.nlp.OpenNlpChunkedSentenceParser

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.