Beispiel #1
0
        public override string ToString()
        {
            StringBuilder os = new StringBuilder();

#if NeedId
            os.Append(this.Id).Append(" ");
#endif
            os.Append("[Surface:");
            if (this.Stat == MeCabNodeStat.Bos)
            {
                os.Append("BOS");
            }
            else if (this.Stat == MeCabNodeStat.Eos)
            {
                os.Append("EOS");
            }
            else
            {
                os.Append(this.Surface);
            }
            os.Append("]");

            os.Append("[Feature:").Append(this.Feature).Append("]");
            os.Append("[BPos:").Append(this.BPos).Append("]");
            os.Append("[EPos:").Append(this.EPos).Append("]");
            os.Append("[RCAttr:").Append(this.RCAttr).Append("]");
            os.Append("[LCAttr:").Append(this.LCAttr).Append("]");
            os.Append("[PosId:").Append(this.PosId).Append("]");
            os.Append("[CharType:").Append(this.CharType).Append("]");
            os.Append("[Stat:").Append((int)this.Stat).Append("]");
            os.Append("[IsBest:").Append(this.IsBest).Append("]");
            os.Append("[Alpha:").Append(this.Alpha).Append("]");
            os.Append("[Beta:").Append(this.Beta).Append("]");
            os.Append("[Prob:").Append(this.Prob).Append("]");
            os.Append("[Cost:").Append(this.Cost).Append("]");

            for (MeCabPath path = this.LPath; path != null; path = path.LNext)
            {
                os.Append("[Path:");
#if NeedId
                os.Append(path.LNode.Id).Append(" ");
#endif
                os.Append("(Cost:").Append(path.Cost).Append(")");
                os.Append("(Prob:").Append(path.Prob).Append(")");
                os.Append("]");
            }

            return(os.ToString());
        }
Beispiel #2
0
        public override string ToString()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append("[Surface:");
            if (this.Stat == MeCabNodeStat.Bos)
            {
                stringBuilder.Append("BOS");
            }
            else if (this.Stat == MeCabNodeStat.Eos)
            {
                stringBuilder.Append("EOS");
            }
            else
            {
                stringBuilder.Append(this.Surface);
            }
            stringBuilder.Append("]");
            stringBuilder.Append("[Feature:").Append(this.Feature).Append("]");
            stringBuilder.Append("[BPos:").Append(this.BPos).Append("]");
            stringBuilder.Append("[EPos:").Append(this.EPos).Append("]");
            stringBuilder.Append("[RCAttr:").Append(this.RCAttr).Append("]");
            stringBuilder.Append("[LCAttr:").Append(this.LCAttr).Append("]");
            stringBuilder.Append("[PosId:").Append(this.PosId).Append("]");
            stringBuilder.Append("[CharType:").Append(this.CharType).Append("]");
            stringBuilder.Append("[Stat:").Append((int)this.Stat).Append("]");
            stringBuilder.Append("[IsBest:").Append(this.IsBest).Append("]");
            stringBuilder.Append("[Alpha:").Append(this.Alpha).Append("]");
            stringBuilder.Append("[Beta:").Append(this.Beta).Append("]");
            stringBuilder.Append("[Prob:").Append(this.Prob).Append("]");
            stringBuilder.Append("[Cost:").Append(this.Cost).Append("]");
            for (MeCabPath meCabPath = this.LPath; meCabPath != null; meCabPath = meCabPath.LNext)
            {
                stringBuilder.Append("[Path:");
                stringBuilder.Append("(Cost:").Append(meCabPath.Cost).Append(")");
                stringBuilder.Append("(Prob:").Append(meCabPath.Prob).Append(")");
                stringBuilder.Append("]");
            }
            return(stringBuilder.ToString());
        }