public void addPredicateArguments(Constituent predicate, List<Constituent> args, String[] relations, double[] scores) { if (args.size() != relations.length) { throw new IllegalArgumentException("Number of arguments != number of relations"); } if (args.size() != scores.length) { throw new IllegalArgumentException("Number of arguments != number of scores"); } this.addConstituent(predicate); this.predicates.add(predicate); for (int i = 0; i < args.size(); i++) { if(!this.containsConstituent(args.get(i))) this.addConstituent(args.get(i)); this.addRelation(new Relation(relations[i], predicate, args.get(i), scores[i])); } }
public void addPredicateArguments(Constituent predicate, List<Constituent> args, String[] relations, double[] scores) { if (args.size() != relations.length) { throw new IllegalArgumentException("Number of arguments != number of relations"); } if (args.size() != scores.length) { throw new IllegalArgumentException("Number of arguments != number of scores"); } this.addConstituent(predicate); this.predicates.add(predicate); for (int i = 0; i < args.size(); i++) { if(!this.containsConstituent(args.get(i))) this.addConstituent(args.get(i)); this.addRelation(new Relation(relations[i], predicate, args.get(i), scores[i])); } }
public void addPredicateArguments(Constituent predicate, List<Constituent> args, String[] relations, double[] scores, List<HashMap<String, String>> attributes) { if (args.size() != relations.length) { throw new IllegalArgumentException("Number of arguments != number of relations"); } if (args.size() != scores.length) { throw new IllegalArgumentException("Number of arguments != number of scores"); } this.addConstituent(predicate); this.predicates.add(predicate); for (int i = 0; i < args.size(); i++) { if(!this.containsConstituent(args.get(i))) this.addConstituent(args.get(i)); Relation relation = new Relation(relations[i], predicate, args.get(i), scores[i]); relation.attributes = attributes.get(i); this.addRelation(relation); } }
public void addPredicateArguments(Constituent predicate, List<Constituent> args, String[] relations, double[] scores, List<HashMap<String, String>> attributes) { if (args.size() != relations.length) { throw new IllegalArgumentException("Number of arguments != number of relations"); } if (args.size() != scores.length) { throw new IllegalArgumentException("Number of arguments != number of scores"); } this.addConstituent(predicate); this.predicates.add(predicate); for (int i = 0; i < args.size(); i++) { if(!this.containsConstituent(args.get(i))) this.addConstituent(args.get(i)); Relation relation = new Relation(relations[i], predicate, args.get(i), scores[i]); relation.attributes = attributes.get(i); this.addRelation(relation); } }
role.addAttribute(ORIGIN, roleRealisOrigin.get(2)); eventView.addConstituent(ac); eventView.addRelation(role);
role.addAttribute(ORIGIN, roleRealisOrigin.get(2)); eventView.addConstituent(ac); eventView.addRelation(role);
c = consList.get(0); pav.addRelation(new Relation(argLabel, predicate, c, 1.0));
leftArg.getEndSpan()); srlView.addConstituent(leftArgConst); srlView.addRelation(new Relation("LeftOf" + label, predicate, leftArgConst, 1.0d)); rightArg.getEndSpan()); srlView.addConstituent(rightArgConst); srlView.addRelation(new Relation("RightOf" + label, predicate, rightArgConst, 1.0d));
leftArg.getEndSpan()); srlView.addConstituent(leftArgConst); srlView.addRelation(new Relation("LeftOf" + label, predicate, leftArgConst, 1.0d)); rightArg.getEndSpan()); srlView.addConstituent(rightArgConst); srlView.addRelation(new Relation("RightOf" + label, predicate, rightArgConst, 1.0d));