Package com.clearnlp.coreference

Examples of com.clearnlp.coreference.Mention


        if (coref.startsWith("("))
        {
          if (coref.endsWith(")"))
          {
            key = coref.substring(1, coref.length()-1);
            mentions.add(new Mention(key, i+1, i+1));
          }
          else
          {
            key = coref.substring(1);
            stack = map.get(key);
           
            if (stack == null)
            {
              stack = new IntStack();
              map.put(key, stack);
            }
           
            stack.push(i+1);
          }
        }
        else //if (coref.endsWith(")"))
        {
          key = coref.substring(0, coref.length()-1);
          mentions.add(new Mention(key, map.get(key).pop(), i+1));
        }
      }
    }
   
    return mentions;
View Full Code Here

TOP

Related Classes of com.clearnlp.coreference.Mention

Copyright © 2018 www.massapicom. 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.