Search in sources :

Example 1 with AnalyzeParagragh

use of main.Analyze.AnalyzeParagragh in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test12.

@Test
public void test12() {
    final Sentence sent = new Sentence("The Weeknd was arrested for punching a dancer in a night club on April 11 2015");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("The Weeknd", tt.getName());
    assertEquals("04/11/2015", tt.getDate());
    assertEquals("dancer punching", tt.getReason());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Example 2 with AnalyzeParagragh

use of main.Analyze.AnalyzeParagragh in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test3.

@Test
public void test3() {
    final Sentence sent = new Sentence("Vin Diesel was arrested for furious driving on August 14, 2002 in California");
    final TableTuple tt = new AnalyzeParagragh(sent, "2002").Analyze();
    assertEquals("Vin Diesel", tt.getName());
    assertEquals("driving furious in California", tt.getReason());
    assertEquals("08/14/2002", tt.getDate());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Example 3 with AnalyzeParagragh

use of main.Analyze.AnalyzeParagragh in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test2.

@Test
public void test2() {
    final Sentence sent = new Sentence("Justin Bieber was arrested for drunk driving in Georgia on February 22, 2015 .");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("Justin Bieber", tt.getName());
    assertEquals("drunk driving in Georgia", tt.getReason());
    assertEquals("02/22/2015", tt.getDate());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Example 4 with AnalyzeParagragh

use of main.Analyze.AnalyzeParagragh in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test7.

@Test
public void test7() {
    final Sentence sent = new Sentence("Tito Ortiz was arrested for driving under the influence after he drove his Porsche Panamera into the concrete median on Jan 6 on the 405 freeway in L.A. at 4am.\n");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("Tito Ortiz", tt.getName());
    assertEquals("driving under influence", tt.getReason());
    assertEquals("01/06/2015", tt.getDate());
}
Also used : TableTuple(main.database.TableTuple) AnalyzeParagragh(main.Analyze.AnalyzeParagragh) Sentence(edu.stanford.nlp.simple.Sentence) Test(org.junit.Test)

Example 5 with AnalyzeParagragh

use of main.Analyze.AnalyzeParagragh in project Info-Evaluation by TechnionYP5777.

the class AnalyzeParagraphTest method test14.

@Test
public void test14() {
    final Sentence sent = new Sentence("Mark Salling was arrested for felony possession of child pornography on Dec 29. His representative had no comment on the matter.");
    final TableTuple tt = new AnalyzeParagragh(sent, "2015").Analyze();
    assertEquals("12/29/2015", tt.getDate());
    System.out.println((tt.getRegularDate() + ""));
}
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)16 AnalyzeParagragh (main.Analyze.AnalyzeParagragh)16 Test (org.junit.Test)16 TableTuple (main.database.TableTuple)12 ReasonPair (main.database.ReasonPair)3 InteractiveTableTuple (main.database.InteractiveTableTuple)2 LocalDate (java.time.LocalDate)1