/// <exception cref="System.Exception"/>
        internal static string GetMarshalledAppInfo(ApplicationSubmissionContextInfo appInfo
                                                    )
        {
            StringWriter writer  = new StringWriter();
            JAXBContext  context = JAXBContext.NewInstance(typeof(ApplicationSubmissionContextInfo
                                                                  ));
            Marshaller m = context.CreateMarshaller();

            m.Marshal(appInfo, writer);
            return(writer.ToString());
        }
Example #2
0
        public static void main(params string[] args)
        {
            JAXBContext jaxbcontext = JAXBContext.newInstance(new Class[]
            {
                ClassLiteral <SequiturImport.FSA> .Value
            });
            Unmarshaller unmarshaller  = jaxbcontext.createUnmarshaller();
            Unmarshaller unmarshaller2 = unmarshaller;

            SequiturImport.FSA fsa = (SequiturImport.FSA)unmarshaller2.unmarshal(new File(args[0]));
            Fst fst = fsa.toFst();

            fst.saveModel(args[1]);
            [email protected](new StringBuilder().append("The Sequitur G2P XML-formatted FST ").append(args[0]).append(" has been converted to Sphinx' OpenFst binary format in the file ").append(args[1]).toString());
        }