Ejemplo n.º 1
0
 public PrecedenceRelation(PrecedenceProperty p1, PrecedenceProperty p2)
 {
     this.p1 = p1;
     this.p2 = p2;
 }
Ejemplo n.º 2
0
 public static string ConvertWords(PrecedenceProperty p, DocModelDictionary dictionary)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("{");
     for (int i = 0; i < p.p.Length; i++)
     {
         int wordKey = p.p[i];
         sb.Append(" [");
         sb.Append(dictionary.GetKey(wordKey));
         sb.Append("],");
     }
     sb.Remove(sb.Length - 1, 1);
     sb.Append(" }");
     return sb.ToString();
 }
Ejemplo n.º 3
0
 public static string ConvertWords(PrecedenceProperty p, Dictionary<int, string[]> vocabulary)
 {
     StringBuilder sb = new StringBuilder();
     sb.Append("{");
     for (int i = 0; i < p.p.Length; i++)
     {
         int wordKey = p.p[i];
         sb.Append(" [");
         for (int j = 0; j < vocabulary[wordKey].Length; j++)
         {
             sb.Append(vocabulary[wordKey][j]);
             sb.Append(":");
         }
         sb.Remove(sb.Length - 1, 1);
         sb.Append("],");
     }
     sb.Remove(sb.Length - 1, 1);
     sb.Append(" }");
     return sb.ToString();
 }