ImsWsdDisambiguator implements WSDAlgorithmDocumentTextBasic { public ImsWsdDisambiguator(SenseInventory inventory) throws JWNLException, IOException, InstantiationException, IllegalAccessException, ClassNotFoundException { this.inventory = inventory; init(); } ImsWsdDisambiguator(SenseInventory inventory); void test(String text); void setEvaluator(IEvaluator p_Evaluator); void setWriter(IResultWriter p_Writer); void setCorpusClassName(String p_Name); void setInstanceExtractorName(String p_Name); void setFeatureExtractorName(String p_Name); void write(); void clear(); @Override String getDisambiguation(String documentText); @Override String getDisambiguationMethod(); @Override SenseInventory getSenseInventory(); @Override void setSenseInventory(SenseInventory senseInventory);  }
@Test @Ignore public void imsWsdDisambiguatorTest() throws SenseInventoryException, JWNLException, IOException, InstantiationException, IllegalAccessException, ClassNotFoundException { SenseInventory inventory; try { inventory = new LsrSenseInventory("wordnet", "en"); } catch (ResourceLoaderException e) { throw new SenseInventoryException(e); } WSDAlgorithmDocumentTextBasic wsdAlgo = new ImsWsdDisambiguator(inventory); String input = "I got money in the bank. Lucie sits on the bank in the park."; String output = "I 2x40x00xx 1x21x00xx in the 1x14x00xx .\nLucie 2x35x00xx on the 1x14x00xx in the 1x15x00xx .\n"; assertEquals(output,wsdAlgo.getDisambiguation(input)); }