Пример #1
0
        /**
         * /// Internal routine when dumping Lattices as Graphviz files
         * ///
         * /// @param f
         * /// @throws IOException
         */
        public void DumpDot(StreamWriter f)
        {
            string posterior = Posterior.ToString(CultureInfo.InvariantCulture);

            if (Posterior == LogMath.LogZero)
            {
                posterior = "log zero";
            }
            string label = Word.ToString() + '[' + BeginTime + ',' + EndTime + " p:" + posterior + ']';

            f.Write("\tnode" + Id + " [ label=\"" + label + "\" ]\n");
        }
Пример #2
0
        /**
         * /// Internal routine when dumping Lattices as AiSee files
         *
         * /// @param f
         * /// @throws IOException
         */
        public void DumpAISee(StreamWriter f)
        {
            string posterior = Posterior.ToString(CultureInfo.InvariantCulture);

            if (Posterior == LogMath.LogZero)
            {
                posterior = "log zero";
            }
            f.Write("node: { title: \"" + Id + "\" label: \""
                    + Word + '[' + BeginTime + ',' + EndTime +
                    " p:" + posterior + "]\" }\n");
        }