private String id(String aPrefix, TOP aFS) { int id; // if we already have an ID for the given FS return it if (ids.containsKey(aFS.getAddress())) { id = ids.get(aFS.getAddress()); } // otherwise generate a new ID else { id = counters.getInt(aPrefix); ids.put(aFS.getAddress(), id); counters.put(aPrefix, id + 1); } return aPrefix + '-' + id; }
static { w2i.put("er", 0); w2i.put("geht", 1); w2i.put("ja", 2); w2i.put("nicht", 3); w2i.put("nach", 4); w2i.put("hause", 5); w2i.put("he", 6); w2i.put("it", 7); w2i.put("is", 8); w2i.put("goes", 9); w2i.put("yes", 10); w2i.put("not", 11); w2i.put("does", 12); w2i.put("after", 13); w2i.put("to", 14); w2i.put("house", 15); w2i.put("home", 16); }