Examples of HashList


Examples of anvil.java.util.Hashlist

  public Brain(Zone zone, String poolname, int cachesize)
  {
    _zone = zone;
    _poolname = poolname;
    _cachesize = cachesize;
    _cache = new Hashlist();
  }
View Full Code Here

Examples of anvil.java.util.Hashlist

    clazz.setClassname(classname, null);
    clazz.setSuperClassname("java/lang/Object");
    clazz.addInterface("anvil/script/FunctionDispatcher");
    clazz.setAccessFlags(ACC_PUBLIC|ACC_FINAL);

    Hashlist constants = new Hashlist();

    //generic
    {
      Method method = clazz.createMethod("execute",
       "(Lanvil/script/Context;Lanvil/core/Any;[Lanvil/core/Any;)Lanvil/core/Any;",
View Full Code Here

Examples of anvil.java.util.Hashlist

 
  public synchronized Any setVariable(String name, Any value)
  {
    check();
    if (_attributes == null) {
      _attributes = new Hashlist();
    }
    dirty(E_DIRTY_ATTRIBUTES);
    _attributes.put(name, value);
    return value;
  }
View Full Code Here

Examples of anvil.java.util.Hashlist

 
  protected Any setInitialVariable(String name, Any value)
  {
    if (_attributes == null) {
      _attributes = new Hashlist();
    }
    _attributes.put(name, value);
    return value;
  }
View Full Code Here

Examples of anvil.java.util.Hashlist


  public boolean setPreference(String name, String value)
  {
    if (_prefs == null) {
      _prefs = new Hashlist();
    }
    if (value == null) {
      return (_prefs.remove(name) != null);
    } else {
      _prefs.put(name, value);
View Full Code Here

Examples of opennlp.tools.util.HashList

  }
  */

  @SuppressWarnings("unchecked")
  public void setExtents(Context[] extentContexts) {
    HashList entities = new HashList();
    /** Extents which are not in a coreference chain. */
    List<Context> singletons = new ArrayList<Context>();
    List<Context> allExtents = new ArrayList<Context>();
    //populate data structures
    for (int ei = 0, el = extentContexts.length; ei < el; ei++) {
      Context ec = extentContexts[ei];
      //System.err.println("SimilarityModel: setExtents: ec("+ec.getId()+") "+ec.getNameType()+" "+ec);
      if (ec.getId() == -1) {
        singletons.add(ec);
      }
      else {
        entities.put(ec.getId(), ec);
      }
      allExtents.add(ec);
    }

    int axi = 0;
    Map<Integer, Set<String>> headSets = constructHeadSets(entities);
    Map<Integer, Set<String>> nameSets = constructNameSets(entities);

    for (Iterator<Integer> ei = entities.keySet().iterator(); ei.hasNext();) {
      Integer key = ei.next();
      Set<String> entityNameSet = nameSets.get(key);
      if (entityNameSet.isEmpty()) {
        continue;
      }
      List<Context> entityContexts = (List<Context>) entities.get(key);
      Set<Context> exclusionSet = constructExclusionSet(key, entities, headSets, nameSets, singletons);
      if (entityContexts.size() == 1) {
      }
      for (int xi1 = 0, xl = entityContexts.size(); xi1 < xl; xi1++) {
        Context ec1 = entityContexts.get(xi1);
View Full Code Here

Examples of opennlp.tools.util.HashList

    return GenderEnum.UNKNOWN;
  }

  @SuppressWarnings("unchecked")
  public void setExtents(Context[] extentContexts) {
    HashList entities = new HashList();
    List<Context> singletons = new ArrayList<Context>();
    for (int ei = 0, el = extentContexts.length; ei < el; ei++) {
      Context ec = extentContexts[ei];
      //System.err.println("GenderModel.setExtents: ec("+ec.getId()+") "+ec.toText());
      if (ec.getId() != -1) {
        entities.put(ec.getId(), ec);
      }
      else {
        singletons.add(ec);
      }
    }
    List<Context> males = new ArrayList<Context>();
    List<Context> females = new ArrayList<Context>();
    List<Context> eunuches = new ArrayList<Context>();
    //coref entities
    for (Iterator<Integer> ei = entities.keySet().iterator(); ei.hasNext();) {
      Integer key = ei.next();
      List<Context> entityContexts = (List<Context>) entities.get(key);
      GenderEnum gender = getGender(entityContexts);
      if (gender != null) {
        if (gender == GenderEnum.MALE) {
          males.addAll(entityContexts);
        }
View Full Code Here

Examples of opennlp.tools.util.HashList

    return NumberEnum.UNKNOWN;
  }

  @SuppressWarnings("unchecked")
  public void setExtents(Context[] extentContexts) {
    HashList entities = new HashList();
    List<Context> singletons = new ArrayList<Context>();
    for (int ei = 0, el = extentContexts.length; ei < el; ei++) {
      Context ec = extentContexts[ei];
      //System.err.println("NumberModel.setExtents: ec("+ec.getId()+") "+ec.toText());
      if (ec.getId() != -1) {
        entities.put(ec.getId(), ec);
      }
      else {
        singletons.add(ec);
      }
    }
    List<Context> singles = new ArrayList<Context>();
    List<Context> plurals = new ArrayList<Context>();
    // coref entities
    for (Iterator<Integer> ei = entities.keySet().iterator(); ei.hasNext();) {
      Integer key = ei.next();
      List<Context> entityContexts = (List<Context>) entities.get(key);
      NumberEnum number = getNumber(entityContexts);
      if (number == NumberEnum.SINGULAR) {
        singles.addAll(entityContexts);
      }
      else if (number == NumberEnum.PLURAL) {
View Full Code Here

Examples of opennlp.tools.util.HashList

    }
    return GenderEnum.UNKNOWN;
  }

  public void setExtents(Context[] extentContexts) {
    HashList entities = new HashList();
    List singletons = new ArrayList();
    for (int ei = 0, el = extentContexts.length; ei < el; ei++) {
      Context ec = extentContexts[ei];
      //System.err.println("GenderModel.setExtents: ec("+ec.getId()+") "+ec.toText());
      if (ec.getId() != -1) {
        entities.put(new Integer(ec.getId()), ec);
      }
      else {
        singletons.add(ec);
      }
    }
    List males = new ArrayList();
    List females = new ArrayList();
    List eunuches = new ArrayList();
    //coref entities
    for (Iterator ei = entities.keySet().iterator(); ei.hasNext();) {
      Integer key = (Integer) ei.next();
      List entityContexts = (List) entities.get(key);
      GenderEnum gender = getGender(entityContexts);
      if (gender != null) {
        if (gender == GenderEnum.MALE) {
          males.addAll(entityContexts);
        }
View Full Code Here

Examples of opennlp.tools.util.HashList

  }
  */
 
 
  public void setExtents(Context[] extentContexts) {
    HashList entities = new HashList();
    /** Extents which are not in a coreference chain. */
    List singletons = new ArrayList();
    List allExtents = new ArrayList();
    //populate data structures
    for (int ei = 0, el = extentContexts.length; ei < el; ei++) {
      Context ec = extentContexts[ei];
      //System.err.println("SimilarityModel: setExtents: ec("+ec.getId()+") "+ec.getNameType()+" "+ec);
      if (ec.getId() == -1) {
        singletons.add(ec);
      }
      else {
        entities.put(new Integer(ec.getId()), ec);
      }
      allExtents.add(ec);
    }
   
    int axi = 0;
    Map headSets = constructHeadSets(entities);
    Map nameSets = constructNameSets(entities);
   
    for (Iterator ei = entities.keySet().iterator(); ei.hasNext();) {
      Integer key = (Integer) ei.next();
      Set entityNameSet = (Set) nameSets.get(key);
      if (entityNameSet.isEmpty()) {
        continue;
      }
      List entityContexts = (List) entities.get(key);     
      Set exclusionSet = constructExclusionSet(key, entities, headSets, nameSets, singletons);
      if (entityContexts.size() == 1) {
      }
      for (int xi1 = 0, xl = entityContexts.size(); xi1 < xl; xi1++) {
        Context ec1 = (Context) entityContexts.get(xi1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.