Package com.jpetrak.gate.stringannotation.extendedgazetteer2

Examples of com.jpetrak.gate.stringannotation.extendedgazetteer2.State


     gazStore = new GazStoreTrie3();
     gazStore = gazStore.load(gazbinFile);
  
   } else {
    if(backendNr == 1) {
      gazStore = new GazStoreTrie1();
    } else if (backendNr == 2) {
      gazStore = new GazStoreTrie2();     
    } else if (backendNr == 3) {
      gazStore = new GazStoreTrie3();     
    } else {
View Full Code Here


      gazStore = new GazStoreTrie3();
      gazStore = gazStore.load(gazbinFile);  
   } else {
     // otherwise process the files listed in the yaml file
    if(backendNr == 1) {
      gazStore = new GazStoreTrie1();
    } else if (backendNr == 2) {
      gazStore = new GazStoreTrie2();     
    } else if (backendNr == 3) {
      gazStore = new GazStoreTrie3();     
    } else {
View Full Code Here

  
   } else {
    if(backendNr == 1) {
      gazStore = new GazStoreTrie1();
    } else if (backendNr == 2) {
      gazStore = new GazStoreTrie2();     
    } else if (backendNr == 3) {
      gazStore = new GazStoreTrie3();     
    } else {
      throw new GateRuntimeException("Invalid backend number: "+backendNr);
    }
View Full Code Here

   } else {
     // otherwise process the files listed in the yaml file
    if(backendNr == 1) {
      gazStore = new GazStoreTrie1();
    } else if (backendNr == 2) {
      gazStore = new GazStoreTrie2();     
    } else if (backendNr == 3) {
      gazStore = new GazStoreTrie3();     
    } else {
      throw new GateRuntimeException("Invalid backend number: "+backendNr);
    }
View Full Code Here

  }
 
 
  @Test
  public void testLookupTrie2() {
    GazStoreTrie2 gs = new GazStoreTrie2();
    gs.runImplementationTests();
  }
View Full Code Here

    gs.runImplementationTests();
  }
 
  @Test
  public void testTrie2() {
    GazStore gs = new GazStoreTrie2();
    FeatureMap fm = Factory.newFeatureMap();
    fm.put("listFeature1","value1");
    fm.put("listFeature2","value2");
    int info1 = gs.addListInfo("Type1", "URL1", fm);
    String[] keyvals1 = new String[]{"key1","val1","key2","","k3","valuenumberthree"};
    /*
    State st1 = gs.addLookupOld("asdf", info1, keyvals1);
    Iterator<Lookup> it1 = gs.getLookups(st1);
    assertEquals(true,it1.hasNext());
View Full Code Here

    eg = null;
    System.gc();
    System.out.println("Saving completed, trying to load into a new gaz store");
    before = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed();
    startTime = System.currentTimeMillis();
    GazStoreTrie3 gs = new GazStoreTrie3();
    gs = (GazStoreTrie3)gs.load(save);
    endTime = System.currentTimeMillis();
    after = ManagementFactory.getMemoryMXBean().getHeapMemoryUsage().getUsed();
    System.out.println("Loading from GAZBIN completed");
    System.out.println("Elapsed time for loading from gazbin: "+((endTime-startTime)/1000.0));
    System.out.println("Memory used up for cache loading: "+(after-before));
View Full Code Here

      throw new GateRuntimeException("Config file must have def or defyaml extension");
    }
    File gazbinFile = new File(gazbinFileName);
  
   if(backendNr == 3 && useCache && gazbinFile.exists()) {
     gazStore = new GazStoreTrie3();
     gazStore = gazStore.load(gazbinFile);
  
   } else {
    if(backendNr == 1) {
      gazStore = new GazStoreTrie1();
    } else if (backendNr == 2) {
      gazStore = new GazStoreTrie2();     
    } else if (backendNr == 3) {
      gazStore = new GazStoreTrie3();     
    } else {
      throw new GateRuntimeException("Invalid backend number: "+backendNr);
    }
    BufferedReader defReader =
      new BomStrippingInputStreamReader((configFileURL).openStream(), encoding);
View Full Code Here

      throw new GateRuntimeException("Strange YAML format for the defyaml file "+configFileURL);
    }
   
    // if we want to load the cache and it exists, load it
    if(backendNr == 3 && useCache && gazbinFile.exists()) {
      gazStore = new GazStoreTrie3();
      gazStore = gazStore.load(gazbinFile);  
   } else {
     // otherwise process the files listed in the yaml file
    if(backendNr == 1) {
      gazStore = new GazStoreTrie1();
    } else if (backendNr == 2) {
      gazStore = new GazStoreTrie2();     
    } else if (backendNr == 3) {
      gazStore = new GazStoreTrie3();     
    } else {
      throw new GateRuntimeException("Invalid backend number: "+backendNr);
    }
    // go through all the list and tsv files to load and load them
    for(Map configListFile : configListFiles) {
View Full Code Here

    GazStoreTrie2 gs = new GazStoreTrie2();
    gs.runImplementationTests();
  }
  @Test
  public void testLookupTrie3() {
    GazStoreTrie3 gs = new GazStoreTrie3();
    gs.runImplementationTests();
  }
View Full Code Here

TOP

Related Classes of com.jpetrak.gate.stringannotation.extendedgazetteer2.State

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.