gpt4 book ai didi

pl.edu.icm.model.bwmeta.y.YPerson.getNames()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-17 09:53:31 26 4
gpt4 key购买 nike

本文整理了Java中pl.edu.icm.model.bwmeta.y.YPerson.getNames()方法的一些代码示例,展示了YPerson.getNames()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YPerson.getNames()方法的具体详情如下:
包路径:pl.edu.icm.model.bwmeta.y.YPerson
类名称:YPerson
方法名:getNames

YPerson.getNames介绍

暂无

代码示例

代码示例来源:origin: pl.edu.icm.yadda/yadda-content

protected List<Statements> processPerson(YPerson item) {
    List<Statements> retL = new LinkedList<Statements>();
    
    if(!item.getNames().isEmpty()){
      Statements s = new Statements();
      s.setSubject(RelConstants.NS_PERSON+item.getId());
      LinkedList<PredicateAndObject> pao = new LinkedList<PredicateAndObject>();
      for(YName name : item.getNames()){
        if(name.getType().equals("canonical"))
          pao.add(new PredicateAndObject(RelConstants.RL_NAME,name.getText()));
        else if(name.getType().equals("forenames")){
          pao.add(new PredicateAndObject(RelConstants.RL_FORENAMES,name.getText().replace("[ \\\"]", "")));
        }
        else if(name.getType().equals("surname")){
          pao.add(new PredicateAndObject(RelConstants.RL_SURNAME,name.getText().replace("[ \\\"]", "") ));
        }                    
      }
      s.setContinuations(pao);
      retL.add(s);
    }else;
    
    return retL;
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

protected List<Statements> processPerson(YPerson item) {
    List<Statements> retL = new LinkedList<Statements>();
    
    if(!item.getNames().isEmpty()){
      Statements s = new Statements();
      s.setSubject(RelConstants.NS_PERSON+item.getId());
      LinkedList<PredicateAndObject> pao = new LinkedList<PredicateAndObject>();
      for(YName name : item.getNames()){
        if(name.getType().equals("canonical"))
          pao.add(new PredicateAndObject(RelConstants.RL_NAME,name.getText()));
        else if(name.getType().equals("forenames")){
          pao.add(new PredicateAndObject(RelConstants.RL_FORENAMES,name.getText().replace("[ \\\"]", "")));
        }
        else if(name.getType().equals("surname")){
          pao.add(new PredicateAndObject(RelConstants.RL_SURNAME,name.getText().replace("[ \\\"]", "") ));
        }                    
      }
      s.setContinuations(pao);
      retL.add(s);
    }else;
    
    return retL;
  }
}

代码示例来源:origin: pl.edu.icm.yadda/yadda-analysis-impl

protected List<Statements> processPerson(YPerson item) {
    List<Statements> retL = new LinkedList<Statements>();
    
    if(!item.getNames().isEmpty()){
      Statements s = new Statements();
      s.setSubject(RelConstants.NS_PERSON+item.getId());
      LinkedList<PredicateAndObject> pao = new LinkedList<PredicateAndObject>();
      for(YName name : item.getNames()){
        if(name.getType().equals("canonical"))
          pao.add(new PredicateAndObject(RelConstants.RL_NAME,NameProceeder.unifyCanonical(name.getText())));
        else if(name.getType().equals("forenames")){
          pao.add(new PredicateAndObject(RelConstants.RL_FORENAMES,NameProceeder.unifyForenames(name.getText())));
        }
        else if(name.getType().equals("surname")){
          pao.add(new PredicateAndObject(RelConstants.RL_SURNAME,NameProceeder.unifySurname(name.getText())));
        }                    
      }
      s.setContinuations(pao);
      retL.add(s);
    }else;
    
    return retL;
  }
}

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com