use of edu.uci.ics.texera.api.field.IField in project textdb by TextDB.
the class NlpEntityTestConstants method getTwoSentenceTestTuple.
public static List<Tuple> getTwoSentenceTestTuple() {
IField[] fields1 = { new TextField("Microsoft, Google and Facebook are organizations."), new TextField("Donald Trump and Barack Obama are persons") };
IField[] fields2 = { new TextField("I made an appointment at 8 am."), new TextField("Aug 16, 2016 is a really important date.") };
IField[] fields3 = { new TextField("I really love Kelly Clarkson's Because of You."), new TextField("Shirley Temple is a very famous actress.") };
Tuple tuple1 = new Tuple(SCHEMA_TWO_SENTENCE, fields1);
Tuple tuple2 = new Tuple(SCHEMA_TWO_SENTENCE, fields2);
Tuple tuple3 = new Tuple(SCHEMA_TWO_SENTENCE, fields3);
return Arrays.asList(tuple1, tuple2, tuple3);
}
use of edu.uci.ics.texera.api.field.IField in project textdb by TextDB.
the class NlpEntityTestConstants method getTest4ResultTuples.
public static List<Tuple> getTest4ResultTuples() {
List<Span> spanList = new ArrayList<Span>();
Span span1 = new Span("sentence_one", 0, 9, NlpEntityType.ORGANIZATION.toString(), "Microsoft");
Span span2 = new Span("sentence_one", 11, 17, NlpEntityType.ORGANIZATION.toString(), "Google");
Span span3 = new Span("sentence_one", 22, 30, NlpEntityType.ORGANIZATION.toString(), "Facebook");
Span span4 = new Span("sentence_two", 0, 12, NlpEntityType.PERSON.toString(), "Donald Trump");
Span span5 = new Span("sentence_two", 17, 29, NlpEntityType.PERSON.toString(), "Barack Obama");
spanList.add(span1);
spanList.add(span2);
spanList.add(span3);
spanList.add(span4);
spanList.add(span5);
IField[] fields1 = { new TextField("Microsoft, Google and Facebook are organizations."), new TextField("Donald Trump and Barack Obama are persons") };
Tuple tuple1 = new Tuple(SCHEMA_TWO_SENTENCE, fields1);
Tuple returnTuple = new Tuple.Builder(tuple1).add(REULST_ATTRIBUTE, new ListField<Span>(spanList)).build();
return Arrays.asList(returnTuple);
}
use of edu.uci.ics.texera.api.field.IField in project textdb by TextDB.
the class NlpEntityTestConstants method getTest6ResultTuples.
public static List<Tuple> getTest6ResultTuples() {
List<Span> spanList = new ArrayList<Span>();
Span span1 = new Span("sentence_one", 0, 9, NlpEntityType.ORGANIZATION.toString(), "Microsoft");
Span span2 = new Span("sentence_one", 11, 17, NlpEntityType.ORGANIZATION.toString(), "Google");
Span span3 = new Span("sentence_one", 22, 30, NlpEntityType.ORGANIZATION.toString(), "Facebook");
spanList.add(span1);
spanList.add(span2);
spanList.add(span3);
IField[] fields1 = { new TextField("Microsoft, Google and Facebook are organizations."), new TextField("Donald Trump and Barack Obama are persons") };
Tuple tuple1 = new Tuple(SCHEMA_TWO_SENTENCE, fields1);
Tuple returnTuple = new Tuple.Builder(tuple1).add(REULST_ATTRIBUTE, new ListField<Span>(spanList)).build();
return Arrays.asList(returnTuple);
}
use of edu.uci.ics.texera.api.field.IField in project textdb by TextDB.
the class NlpEntityTestConstants method getTest8ResultTuples.
public static List<Tuple> getTest8ResultTuples() {
List<Span> spanList = new ArrayList<Span>();
Span span1 = new Span("sentence_one", 23, 34, NlpEntityType.MONEY.toString(), "300 dollars");
spanList.add(span1);
IField[] fields1 = { new TextField("This backpack costs me 300 dollars.") };
Tuple tuple1 = new Tuple(SCHEMA_ONE_SENTENCE, fields1);
Tuple returnTuple = new Tuple.Builder(tuple1).add(REULST_ATTRIBUTE, new ListField<Span>(spanList)).build();
return Arrays.asList(returnTuple);
}
use of edu.uci.ics.texera.api.field.IField in project textdb by TextDB.
the class NlpEntityTestConstants method getTest7ResultTuples.
public static List<Tuple> getTest7ResultTuples() {
List<Span> spanList = new ArrayList<Span>();
Span span1 = new Span("sentence_one", 12, 16, NlpEntityType.ADJECTIVE.toString(), "warm");
spanList.add(span1);
IField[] fields1 = { new TextField("Feeling the warm sun rays beaming steadily down, the girl decided there was no need to wear a coat.") };
Tuple tuple1 = new Tuple(SCHEMA_ONE_SENTENCE, fields1);
Tuple returnTuple = new Tuple.Builder(tuple1).add(REULST_ATTRIBUTE, new ListField<Span>(spanList)).build();
return Arrays.asList(returnTuple);
}
Aggregations