Package gannuNLP.dictionaries

Examples of gannuNLP.dictionaries.DataBroker.load()


      f.mkdirs();
      f=new File("./data/"+dict.getName()+"/"+dict.getName()+".sta");
      if(f.exists())//then try to upload a corpus
      {
        DataBroker db=new DataBroker(args[0],args[1]);
        db.load("Glosses;");       
        System.out.println("Dictionary uploaded!");
        System.out.println("Loading samples from SemCor files!");
        f=new File(args[2]);
        if(f.exists())
        {
View Full Code Here


  DataBroker dict=new DataBroker(data.getAttribute("connector"),data.getAttribute("version"));
  dict.setPath(data.getAttribute("path"));
  dict.getSource().setPath(data.getAttribute("path"));
 
  String sources=data.getAttribute("sources");
  dict.load(sources);
  NodeList bowMods=root.getElementsByTagName("bowmodifier");
  for(int i=0;i<bowMods.getLength();i++)
  {
    Element bowMod=(Element) bowMods.item(i);   
    BoWModifier mod=(BoWModifier) Class.forName(bowMod.getAttribute("class")).newInstance();
View Full Code Here

    }
    else
    {
      File target= new File(args[0]);     
      DataBroker data=new DataBroker(args[1],args[2]);
      data.load("Glosses");
     
      ArrayList<File> files=Util.getAllFiles(target);
      for(File f:files)
      {
        System.out.println("Processing file "+f.getName());
View Full Code Here

      }
     
      ArrayList<File> files=Util.getAllFiles(new File(args[2]));
      DataBroker dic=new DataBroker(args[0],args[1]);
      dic.setPath(".");
      dic.load("Glosses");
      int x=1;
      for(File file:files)
      {
        File fout=new File(file.getCanonicalFile()+".sgf");
        if(!file.getName().endsWith(".sgf")&&(!fout.exists()||rewrite))
View Full Code Here

          WikiCleaner w=new WikiCleaner();
          w.setDict(data);
          data.addModifier(w);
        }
      }
      data.load("all");
      Lemma l=data.getLemma(args[2]);
      if(l!=null)
      {
        System.out.println("Have "+l.getSenses().size()+" senses");
        System.out.println("Frequency: "+String.valueOf(l.getFrequency()));
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.