@Test public void testDeterminize() throws NumberFormatException, IOException, ClassNotFoundException, URISyntaxException { String path = "algorithms/determinize/fstdeterminize.fst.ser"; URL url = getClass().getResource(path); File parent = new File(url.toURI()).getParentFile(); path = new File(parent, "A").getPath(); Fst fstA = Convert.importFst(path, new TropicalSemiring()); path = new File(parent, "fstdeterminize.fst.ser").getPath(); Fst determinized = Fst.loadModel(path); Fst fstDeterminized = Determinize.get(fstA); assertThat(determinized, equalTo(fstDeterminized)); } }
fstdet = Determinize.get(fst);
fstdet = Determinize.get(fst);