Changeset 854bece for src/dgp/dgp1.cc
- Timestamp:
- 01/12/15 19:07:44 (10 years ago)
- Branches:
- master
- Children:
- c03f8a5
- Parents:
- acbabee
- git-author:
- Tomasz Obrebski <obrebski@…> (01/12/15 19:07:44)
- git-committer:
- Tomasz Obrebski <obrebski@…> (01/12/15 19:07:44)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/dgp/dgp1.cc
racbabee r854bece 173 173 int newd = find_existing_node(sgraph[d].mnode, new_dep_prop, new_dep_edge); 174 174 if( newd < 0 ) 175 newd = create_new_node(d,new_dep_prop,new_dep_edge); 175 { 176 newd = create_new_node(d,new_dep_prop,new_dep_edge); 177 sgraph[newd].prop.has_head = true; 178 } 176 179 177 180 Edge new_head_edge(sgraph[newd].edge,newd); … … 201 204 202 205 Edge new_head_edge(sgraph[h].edge); 203 int newh = find_existing_node(sgraph[h].mnode, new_head_prop, new_head_edge); 206 int newh = -1; 207 if(!new_head_prop.forbidden[l.role]) newh = find_existing_node(sgraph[h].mnode, new_head_prop, new_head_edge); 204 208 if( newh < 0 ) 205 209 { 206 210 newh = create_new_node(h,new_head_prop,new_head_edge); 207 sgraph[newh]. visible_as_neighbour = false;211 sgraph[newh].prop.visible_as_neighbour = false; 208 212 } 209 213 210 214 Edge new_dep_edge; 211 int newd = find_existing_node(sgraph[d].mnode, new_dep_prop, new_dep_edge); 212 if( newd < 0) 213 newd = create_new_node(d,new_dep_prop,new_dep_edge); 215 int newd = d; 216 if( ! (new_dep_edge == sgraph[d].edge) || ! (old_dep_prop == new_dep_prop) ) 217 { 218 newd = create_new_node(d,new_dep_prop,new_dep_edge); 219 sgraph[newd].prop.has_head = true; 220 } 214 221 215 222 … … 299 306 int i; 300 307 while((i=lvi.next()) >= 0) 301 if(sgraph.saturated(i))308 if(sgraph.saturated(i) && ! sgraph.has_head(i)) 302 309 { 303 310 if(debug) {fprintf(stderr,"\t%d <-- %d",i,j); }
Note: See TracChangeset
for help on using the changeset viewer.