Example #1
0
  protected Vector /* of TTPNode */ queryPNodes1(String query) throws IOException {
    write(query);
    Vector lines = readlines();
    Vector r = new Vector();
    for (Enumeration e = lines.elements(); e.hasMoreElements(); ) {
      Vector line = stringToVector((String) e.nextElement(), ":");

      TTLexEntry le = new TTLexEntry();
      le.citationForm = (String) line.elementAt(0);
      le.features = (String) line.elementAt(1);
      le.inflection = (String) line.elementAt(2);
      le.inflFeatures = (String) line.elementAt(3);

      TTLexEntryToObj leo = new TTLexEntryToObj();
      leo.lexentry = le;
      leo.objname = (String) line.elementAt(4);
      leo.features = (String) line.elementAt(5);

      TTPNode pn = new TTPNode();
      pn.feature = TT.featureGet(le.features, TT.FT_POS, TT.F_NULL);
      pn.leo = leo;
      pn.startpos = TT.longParse((String) line.elementAt(8), true);
      pn.endpos = TT.longParse((String) line.elementAt(9), true);

      r.addElement(pn);
    }
    return r;
  }
Example #2
0
  protected Vector /* of TTLexEntryToObj */ queryLeos1(String query) throws IOException {
    write(query);
    Vector lines = readlines();
    Vector r = new Vector();
    for (Enumeration e = lines.elements(); e.hasMoreElements(); ) {
      Vector line = stringToVector((String) e.nextElement(), ":");

      TTLexEntry le = new TTLexEntry();
      le.citationForm = (String) line.elementAt(0);
      le.features = (String) line.elementAt(1);
      le.inflection = (String) line.elementAt(2);
      le.inflFeatures = (String) line.elementAt(3);

      TTLexEntryToObj leo = new TTLexEntryToObj();
      leo.lexentry = le;
      leo.objname = (String) line.elementAt(4);
      leo.features = (String) line.elementAt(5);

      r.addElement(leo);
    }
    return r;
  }