Search in sources :

Example 26 with TableTuple

use of main.database.TableTuple in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test5.

@Test
public void test5() {
    final Sentence sent = new Sentence("Axl Rose was arrested after driving drunk in New Zeland on March 1.");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("Axl Rose", tt.getName());
    assertEquals("driving drunk in New Zeland", tt.getReason());
    assertEquals("03/01/2015", tt.getDate());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Example 27 with TableTuple

use of main.database.TableTuple in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test6.

@Test
public void test6() {
    final Sentence sent = new Sentence("Joe Francis was arrested for attacking at a Nightclub on May 16.");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("Joe Francis", tt.getName());
    assertEquals("attacking at Nightclub", tt.getReason());
    assertEquals("05/16/2015", tt.getDate());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Aggregations

TableTuple (main.database.TableTuple)27 Test (org.junit.Test)22 Sentence (edu.stanford.nlp.simple.Sentence)12 AnalyzeParagragh (main.Analyze.AnalyzeParagragh)12 DataList (main.database.DataList)7 AnalyzeSources (main.Analyze.AnalyzeSources)4 InteractiveTableTuple (main.database.InteractiveTableTuple)3 IOException (java.io.IOException)2 Before (org.junit.Before)2 SentencesAnnotation (edu.stanford.nlp.ling.CoreAnnotations.SentencesAnnotation)1 IndexedWord (edu.stanford.nlp.ling.IndexedWord)1 Annotation (edu.stanford.nlp.pipeline.Annotation)1 StanfordCoreNLP (edu.stanford.nlp.pipeline.StanfordCoreNLP)1 SemanticGraph (edu.stanford.nlp.semgraph.SemanticGraph)1 CollapsedDependenciesAnnotation (edu.stanford.nlp.semgraph.SemanticGraphCoreAnnotations.CollapsedDependenciesAnnotation)1 SemanticGraphEdge (edu.stanford.nlp.semgraph.SemanticGraphEdge)1 CoreMap (edu.stanford.nlp.util.CoreMap)1 Color (java.awt.Color)1 Dimension (java.awt.Dimension)1 Point (java.awt.Point)1