Search in sources :

Example 31 with Sentence

use of edu.stanford.nlp.simple.Sentence in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test9.

@Test
public void test9() {
    final Sentence sent = new Sentence("Soulja Boy was arrested for possession of a loaded gun in Los Angeles on Jan 22.\n");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("Soulja Boy", tt.getName());
    assertEquals("possession of gun", tt.getReason());
    assertEquals("01/22/2015", tt.getDate());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Aggregations

Sentence (edu.stanford.nlp.simple.Sentence)31 Test (org.junit.Test)18 AnalyzeParagragh (main.Analyze.AnalyzeParagragh)16 TableTuple (main.database.TableTuple)12 CoreLabel (edu.stanford.nlp.ling.CoreLabel)7 CoreLabelTokenFactory (edu.stanford.nlp.process.CoreLabelTokenFactory)4 StringReader (java.io.StringReader)4 Span (edu.stanford.nlp.ie.machinereading.structure.Span)3 CoreMap (edu.stanford.nlp.util.CoreMap)3 SentenceField (edu.stanford.nlp.util.TSVSentenceIterator.SentenceField)3 ScoredPassage (io.anserini.qa.passage.ScoredPassage)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 IndexUtils (io.anserini.index.IndexUtils)2 IdfPassageScorer (io.anserini.qa.passage.IdfPassageScorer)2 InteractiveTableTuple (main.database.InteractiveTableTuple)2 ReasonPair (main.database.ReasonPair)2 edu.stanford.nlp.classify (edu.stanford.nlp.classify)1 NERTag (edu.stanford.nlp.ie.KBPRelationExtractor.NERTag)1 IOUtils (edu.stanford.nlp.io.IOUtils)1