Examples of PVMap


Examples of com.clearnlp.propbank.verbnet.PVMap

  //  countMoreAnnotations(pvMap, semKeys, propFile);
  }
 
  public CheckSemlink(String pbvnFile, String semlinkFile, String propFile, String outFile) throws Exception
  {
    PVMap pvMap = new PVMap(new BufferedInputStream(new FileInputStream(pbvnFile)));
    Pair<Set<String>,Map<String,String>> o = getSemlinkKeys(pvMap, semlinkFile, outFile);
    getAnnotations(o.o1, o.o2, propFile, outFile);
  }
View Full Code Here

Examples of com.clearnlp.propbank.verbnet.PVMap

    return t[0]+" "+t[1]+" "+t[2];
  }
 
  public void check(String pbvnFile, String semlinkFile, String errorFile) throws Exception
  {
    PVMap pvMap = new PVMap(new BufferedInputStream(new FileInputStream(pbvnFile)));
    BufferedReader fin = UTInput.createBufferedFileReader(semlinkFile);
    String line, verbnet, roleset;
    Set<String> vnset;
    String[] t;
   
  //  Map<String,ObjectIntOpenHashMap<String>> miss = new HashMap<String,ObjectIntOpenHashMap<String>>();
  //  ObjectIntOpenHashMap<String> m;
   
    Map<String,Set<String>> miss = new HashMap<String,Set<String>>();
    Set<String> m;
   
    while ((line = fin.readLine()) != null)
    {
      t = DELIM.split(line);
      verbnet = t[5];
      roleset = t[7];
      vnset = pvMap.getVNSet(roleset);
     
      if (vnset.isEmpty() || !vnset.contains(verbnet))
      {
        m = miss.get(roleset);
       
View Full Code Here

Examples of com.clearnlp.propbank.verbnet.PVMap

{
  final String VERB_EXT = "-v.xml";
 
  public PB2VNMap(String framesetDir, String outputFile) throws Exception
  {
    PVMap pvMap = new PVMap(framesetDir);
   
    PrintStream fout = UTOutput.createPrintBufferedFileStream(outputFile);
    pvMap.print(fout);
    fout.close();
   
    System.out.println("# of verb types in VerbNet: "+pvMap.size());
  }
View Full Code Here

Examples of com.clearnlp.propbank.verbnet.PVMap

{
  public SemlinkToOntoNotes(String ontoDir, String ontoPBFile, String semDir, String semVNFile, String pvMapFile, String outputFile) throws Exception
  {
    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;
       
View Full Code Here

Examples of com.clearnlp.propbank.verbnet.PVMap

public class VerbNetCount
{
  public VerbNetCount(String pbvnFile) throws Exception
  {
    PVMap pvMap = new PVMap(new BufferedInputStream(new FileInputStream(pbvnFile)));
    Set<String> prev, curr = new HashSet<String>();
   
    do
    {
      prev = curr;
View Full Code Here

Examples of com.clearnlp.propbank.verbnet.PVMap

    while (prev.size() < curr.size());
  }
 
  public VerbNetCount(String pbvnFile, String inputDir) throws Exception
  {
    PVMap pvMap = new PVMap(new BufferedInputStream(new FileInputStream(pbvnFile)));
    Map<String,Set<String>> mDif = new HashMap<String,Set<String>>();
    Map<String,Set<String>> mSub = new HashMap<String,Set<String>>();
    Pattern delim = Pattern.compile("\t");
    String line, roleset, vncls;
    BufferedReader fin;
    Set<String> sVN;
    DEPFeat feat;
    String[] l;
   
    for (String filename : UTFile.getInputFileList(inputDir, ".pmd"))
    {
      fin = UTInput.createBufferedFileReader(filename);
     
      while ((line = fin.readLine()) != null)
      {
        line = line.trim();
       
        if (line.isEmpty())
        {
         
        }
        else
        {
          l = delim.split(line);
          feat = new DEPFeat(l[6]);
          roleset = feat.get(DEPLib.FEAT_PB);
          vncls = feat.get(DEPLib.FEAT_VN);
         
          if (roleset != null && vncls != null)
          {
            sVN = pvMap.getVNSet(roleset);
           
            if (!sVN.contains(vncls))
            {
              if (checkSub(sVN, vncls))  add(mSub, roleset, vncls);
              else            add(mDif, roleset, vncls);
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.