Package gannuNLP.data

Examples of gannuNLP.data.Input


      ArrayList<File> files=Util.getAllSGFFiles(s);
     
      for(File f:files)
      {
        System.out.println(String.valueOf(i)+"/"+String.valueOf(files.size()));
        this.documents.add(new Input(f,null,dict,noTag,false));
        i++;
     
      this.documents.trimToSize();       
      System.out.println("Saving "+p.getName()+"...");
      Util.writeObject(p, this.getDocuments());       
View Full Code Here


      sheet.addCell(new Label(goffset, offset, "Tests "+t));
      offset++; 
      t++;
      for(int i=0;i<test.getDocs().size();i++)
      {
        Input doc=test.getDocs().get(i);
        ArrayList<Decision> decisions=test.getAnswers().get(i);
        sheet.addCell(new Label(goffset, offset, "Document:"));
        sheet.addCell(new Label(goffset+1, offset, doc.toString()));
        offset++;
       
        for(Decision decision:decisions)
        {
          if(decision.isAttempted())
View Full Code Here

    for(File file:files)
    {
      System.out.println("Loading "+file.getName()+" "+String.valueOf(x)+"/"+String.valueOf(files.size()));
      x++;
      File tmp=new File("./data/inputs/"+dict.getCompleteName().replace(">", "@@@@@@")+"/"+file.getName()+"_"+noTag);
      Input in;
      if(tmp.exists())
      {
        in=(Input)Util.loadObject(tmp);
        inputs.add(in);
        ins.add(in);
        for(AmbiguousWord word:in.getAmbiguousWords())
        {
          word.setDict(dict);
        }
      }
      else
      {
        File d=new File("./data/inputs/"+dict.getCompleteName().replace(">", "@@@@@@")+"/");
        if(!d.exists())
          d.mkdirs();
        in=new Input(file,filter,dict,noTag,true);
        inputs.add(in);
        ins.add(in);
        Util.writeObject(tmp, in);
      }
    }
View Full Code Here

      {
        System.out.println("Processing file "+f.getName());
        String text=Input.generateSGFFromRaw(f,data);
        if(Boolean.parseBoolean(args[3]))
        {
          Input test=new Input(text,data);
          System.out.println("Disambiguating file...");
          WSDAlgorithm wsd=new FirstSense();         
          ArrayList<SkipFilter> skipFilters=new ArrayList<SkipFilter>();
          //TODO
          //SkipNotOSD filter=new SkipNotOSD();
View Full Code Here

TOP

Related Classes of gannuNLP.data.Input

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.