Package org.cleartk.timeml.type

Examples of org.cleartk.timeml.type.Anchor


  @Override
  public void process(JCas jCas) throws AnalysisEngineProcessException {
    DocumentCreationTime dct = JCasUtil.selectSingle(jCas, DocumentCreationTime.class);
    Map<EventMention, String> docTimeRels = Maps.newHashMap();
    for (TemporalLink tlink : JCasUtil.select(jCas, TemporalLink.class)) {
      Anchor source = tlink.getSource();
      Anchor target = tlink.getTarget();
      if (source instanceof org.cleartk.timeml.type.Event && target.equals(dct)) {
        for (EventMention event : JCasUtil.selectCovered(jCas, EventMention.class, source)) {
          docTimeRels.put(event, tlink.getRelationType());
        }
      }
    }
View Full Code Here


  @Override
  public void process(JCas jCas) throws AnalysisEngineProcessException {
    for(TemporalLink link : JCasUtil.select(jCas, TemporalLink.class)){
      BinaryTextRelation rel = new BinaryTextRelation(jCas);
      RelationArgument arg1 = new RelationArgument(jCas);
      Anchor source = link.getSource();
      arg1.setArgument(new Annotation(jCas, source.getBegin(), source.getEnd()));
      arg1.addToIndexes();
     
      RelationArgument arg2 = new RelationArgument(jCas);
      Anchor target = link.getTarget();
      arg2.setArgument(new Annotation(jCas, target.getBegin(), target.getEnd()));
      arg2.addToIndexes();
     
      String cat = getMappedCategory(link.getRelationType());
      if(cat.endsWith("-1")){
        rel.setArg1(arg2);
View Full Code Here

TOP

Related Classes of org.cleartk.timeml.type.Anchor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.