Package com.clearnlp.propbank.verbnet

Examples of com.clearnlp.propbank.verbnet.PVRoles


    List<PBInstance> pbList = PBLib.getPBInstanceList(ontoPBFile, ontoDir, false);
    Map<String,String> semMap = getSemlinkMap(ontoDir, semDir, semVNFile);
    PVMap pvMap = new PVMap(new FileInputStream(pvMapFile));
    int mono = 0, poly = 0, subcls = 0, supcls = 0, none = 0, skip = 0;
    PVRoleset pvRoleset;
    PVRoles   pvRoles;
    String    vncls;
   
    for (PBInstance inst : pbList)
    {
      pvRoleset = pvMap.getRoleset(inst.roleset);
          
      if (pvRoleset != null)
      {
        pvRoles = null;
       
        if (pvRoleset.size() == 1)
        {
          pvRoles = pvRoleset.getSubVNRoles("");
          inst.annotator = "mono";
          mono++;
        }
        else
        {
          vncls = semMap.get(getKey(inst.treePath, inst.treeId, inst.predId));

          if (vncls != null)
          {
            if ((pvRoles = pvRoleset.get(vncls)) != null)
            {
              inst.annotator = "poly";
              poly++;
            }
            else if ((pvRoles = pvRoleset.getSubVNRoles(vncls)) != null)
            {
              inst.annotator = "subcls";
              subcls++;
            }
            else if ((pvRoles = pvRoleset.getSuperVNRoles(vncls)) != null)
            {
              inst.annotator = "supcls";
              supcls++;
            }
          }
        }
       
        if (pvRoles == null)
        {
          inst.annotator = "skip";
          skip++;         
        }
        else
        {
          pvRoles.addVBRoles(inst);
        }
      }
      else
        none++;
    }
View Full Code Here

TOP

Related Classes of com.clearnlp.propbank.verbnet.PVRoles

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.