<div dir="ltr">Hi,<div><br></div><div>   I am new to JAPE. I am trying to draw a relationship between person and function using the rule below and it does not work. Any help would be appreciated.</div><div><br></div><div><div style="font-size:12.8px">Imports: { </div><div style="font-size:12.8px">  import gate.relations.RelationSet; </div><div style="font-size:12.8px">}</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Phase:firstpass                                 </div><div style="font-size:12.8px">Input:  Lookup Personne                                 </div><div style="font-size:12.8px">Options: control = appelt                         </div><div style="font-size:12.8px">Rule: Function                                                       </div><div style="font-size:12.8px">(</div><div style="font-size:12.8px">({Personne}):person</div><div style="font-size:12.8px">)</div><div style="font-size:12.8px">(</div><div style="font-size:12.8px">{Lookup.majorType==Function, !Personne}</div><div style="font-size:12.8px">): func                                      </div><div style="font-size:12.8px">-->                                              </div><div style="font-size:12.8px">{</div><div style="font-size:12.8px">AnnotationSet funct = bindings.get("func");  </div><div style="font-size:12.8px">Annotation functAnn = funct.iterator().next();  </div><div style="font-size:12.8px">// Build annotation</div><div style="font-size:12.8px">FeatureMap features = Factory.newFeatureMap();  </div><div style="font-size:12.8px">features.put("rule", "Function");  </div><div style="font-size:12.8px">System.out.println("1. draw relation");</div><div style="font-size:12.8px">int functId = outputAS.add(funct.firstNode()<wbr>, funct.lastNode(), "Function", features);  </div><div style="font-size:12.8px">System.out.println("2. draw relation " + functId);</div><div style="font-size:12.8px">// Build relation </div><div style="font-size:12.8px">AnnotationSet annSet = doc.getAnnotations(); </div><div style="font-size:12.8px">RelationSet relSet = annSet.getRelations(); </div><div style="font-size:12.8px">System.out.println("3. relset : " + relSet);</div><div style="font-size:12.8px">AnnotationSet persons = bindings.get("person");</div><div style="font-size:12.8px">System.out.println("4. Person:" +persons);</div><div style="font-size:12.8px">Annotation personAnn = persons.iterator().next();  </div><div style="font-size:12.8px">System.out.println("5. personAnn : " + personAnn);</div><div style="font-size:12.8px">relSet.addRelation("function_p<wbr>erson", </div><div style="font-size:12.8px">       new int[] {functId, personAnn.getId()});</div><div style="font-size:12.8px">System.out.println("6. Done");</div><div style="font-size:12.8px">System.out.println("----------<wbr>-----------------------------"<wbr>);  </div><div style="font-size:12.8px">}                                   </div><div><br></div>-- <br><div class="m_-7534103665731775744gmail_signature"><div dir="ltr"><div><font color="#000000"><font size="2"><font face="verdana,sans-serif">Thanks and Regards,<br></font></font></font></div><div><font color="#000000"><font size="2"><font face="verdana,sans-serif">Judith Jeyafreeda<br></font></font></font></div><div><div><font color="#FF99FF" size="6" face="'comic sans ms', sans-serif"><b><br></b></font></div></div></div></div>
</div></div>