Thứ Sáu, 9 tháng 9, 2011

Meeting - Tree matching - Part 1

  One more thing is about the tree-matching, at first, I thought about the tree-matching as Prof. Kato mentioned in the previous meeting. But in the implementation, in order to simplify the calculating process, I convert all tree in to list, with each member of the list is one tree-path.
  There is an advice in the meeting by Prof. Hu, I need to present the algorithm (means that the original idea) instead of present the implementation ideas.
  In the tree-matching, we will have 2 different trees, then for example the left-hand-side is the original tree, and the right-hand-side is the updating-tree (which contains values). Now we need to specify the values which are needed.
   With 2 trees, we will repeat the edge matching, if it matches, then we move to other branches, until we visit all branches of the left-hand-side tree. The remains of the right-hand-side tree is the updating values.
   However, in case there are many updating values. The matching step will be much more complicated. In this case, we will parse the complicated left-hand-side tree into many single trees. For example: {db.family.mother} and {db.family.father}. We continue to apply the parsing step for the right-hand-side tree. Then we will have: {db.family.father}, {db.family.mother} and {db.family.son."Tommy"}.
   Finally, the comparison steps are applied for those single trees. Then we can get the exact result.

Không có nhận xét nào: