Example #1
0
        private void ToString(StringBuilder sb, int iLevel)
        {
            sb.Append(new string('\t', iLevel));
            sb.Append("Suffix=\"" + (bWholeWord?"^":"") + sCondition + "\"; ");
            sb.Append("Rule=\"" + lrBestRule.ToString() + "\"; ");
            sb.Append("Weight=" + dWeight + "\"; ");
            if (aBestRules != null && aBestRules.Length > 0)
            {
                sb.Append("Cover=" + aBestRules[0].Weight + "; ");
            }
            sb.Append("Rulles=");
            if (aBestRules != null)
            {
                foreach (RuleWeighted rw in aBestRules)
                {
                    sb.Append(" " + rw.ToString());
                }
                sb.Append("; ");
            }

            sb.AppendLine();

            if (dictSubNodes != null)
            {
                foreach (LemmaTreeNode ltnChild in dictSubNodes.Values)
                {
                    ltnChild.ToString(sb, iLevel + 1);
                }
            }
        }
Example #2
0
        // Output Functions (ToString) -------------------

        public override string ToString()
        {
            string sThis =
                (sWord == null ? "" : "W:\"" + sWord + "\" ") +
                (sLemma == null ? "" : "L:\"" + sLemma + "\" ") +
                (sMsd == null ? "" : "M:\"" + sMsd + "\" ") +
                (Double.IsNaN(dWeight) ? "" : "F:\"" + dWeight + "\" ") +
                (lrRule == null ? "" : "R:" + lrRule.ToString() + " ");

            return(String.IsNullOrEmpty(sThis) ? "" : sThis.Substring(0, sThis.Length - 1));
        }
Example #3
0
        // Output & Serialization Functions -----------

        public override string ToString()
        {
            return(lrRule.ToString() + dWeight.ToString("(0.00%)"));
        }