コード例 #1
0
  private String mk(Sentence sent, int pos, int i) {
    String cp;
    if (0 <= (pos + i) && (pos + i) < sent.size()) {
      cp = "mk:" + Integer.toString(i);
      String word = sent.getWordAt(pos + i);
      if (!StringUtils.isSign(word)) cp = "";
    } else cp = "";

    return cp;
  }
コード例 #2
0
  private String hn(Sentence sent, int pos, int i) {
    String cp;
    if (0 <= (pos + i) && (pos + i) < sent.size()) {
      cp = "hn:" + Integer.toString(i);

      String word = sent.getWordAt(pos + i);
      if (!StringUtils.containNumber(word)) cp = "";
    } else cp = "";

    return cp;
  }