Skip to content

Commit

Permalink
add part-of to all nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinKl committed Jan 19, 2024
1 parent 9946c3a commit 0b8f05e
Show file tree
Hide file tree
Showing 2 changed files with 4,360 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/importer/xml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ impl ImportXML {
node_name: node_id.to_string(),
node_type: "node".to_string(),
})?;
update.add_event(UpdateEvent::AddEdge {
source_node: node_id.to_string(),
target_node: doc_node_id.to_string(),
layer: ANNIS_NS.to_string(),
component_type: AnnotationComponentType::PartOf.to_string(),
component_name: "".to_string(),
})?;
for attr in attributes {
let key = attr.name.to_string();
let value = attr.value.to_string();
Expand Down Expand Up @@ -148,6 +155,13 @@ impl ImportXML {
component_type: AnnotationComponentType::Coverage.to_string(),
component_name: "".to_string(),
})?;
update.add_event(UpdateEvent::AddEdge {
source_node: empty_node.to_string(),
target_node: doc_node_id.to_string(),
layer: ANNIS_NS.to_string(),
component_type: AnnotationComponentType::PartOf.to_string(),
component_name: "".to_string(),
})?;
for ascendent_node in &node_stack[1..] {
update.add_event(UpdateEvent::AddEdge {
source_node: ascendent_node.to_string(),
Expand Down
Loading

0 comments on commit 0b8f05e

Please sign in to comment.