public JWNLDictionary(string searchDirectory) { //PointerType.initialize(); //Adjective.initialize(); //VerbFrame.initialize(); ////UPGRADE_TODO: Class 'java.util.HashMap' was converted to 'System.Collections.Hashtable' which has a different behavior. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1073_javautilHashMap'" //System.Collections.IDictionary suffixMap = new System.Collections.Hashtable(); //suffixMap[POS.NOUN] = new string[][]{new string[]{"s", ""}, new string[]{"ses", "s"}, new string[]{"xes", "x"}, new string[]{"zes", "z"}, new string[]{"ches", "ch"}, new string[]{"shes", "sh"}, new string[]{"men", "man"}, new string[]{"ies", "y"}}; //suffixMap[POS.VERB] = new string[][]{new string[]{"s", ""}, new string[]{"ies", "y"}, new string[]{"es", "e"}, new string[]{"es", ""}, new string[]{"ed", "e"}, new string[]{"ed", ""}, new string[]{"ing", "e"}, new string[]{"ing", ""}}; //suffixMap[POS.ADJECTIVE] = new string[][]{new string[]{"er", ""}, new string[]{"est", ""}, new string[]{"er", "e"}, new string[]{"est", "e"}}; //DetachSuffixesOperation tokDso = new DetachSuffixesOperation(suffixMap); //tokDso.addDelegate(DetachSuffixesOperation.OPERATIONS, new Operation[]{new LookupIndexWordOperation(), new LookupExceptionsOperation()}); //TokenizerOperation tokOp = new TokenizerOperation(new string[]{" ", "-"}); //tokOp.addDelegate(TokenizerOperation.TOKEN_OPERATIONS, new Operation[]{new LookupIndexWordOperation(), new LookupExceptionsOperation(), tokDso}); //DetachSuffixesOperation morphDso = new DetachSuffixesOperation(suffixMap); //morphDso.addDelegate(DetachSuffixesOperation.OPERATIONS, new Operation[]{new LookupIndexWordOperation(), new LookupExceptionsOperation()}); //Operation[] operations = new Operation[]{new LookupExceptionsOperation(), morphDso, tokOp}; //morphy = new DefaultMorphologicalProcessor(operations); //FileManager manager = new FileManagerImpl(searchDirectory, typeof(PrincetonRandomAccessDictionaryFile)); //FileDictionaryElementFactory factory = new PrincetonWN17FileDictionaryElementFactory(); //FileBackedDictionary.install(manager, morphy, factory, true); //dict = net.didion.jwnl.dictionary.Dictionary.getInstance(); //morphy = dict.getMorphologicalProcessor(); mEngine = new DataFileEngine(searchDirectory); morphologicalProcess += mEngine.LookupExceptionsOperation; morphologicalProcess += mEngine.LookupIndexWordOperation; }