Skip to content

Confused by code #840

@kwalcock

Description

@kwalcock

@enoriega,

Can you explain the code at

// TODO: Hack by Enrique to resolve the document object for the relations
for(sen <- doc.sentences){
sen.relations match {
case Some(relations) =>
val newRelations = relations.map(r => RelationTriple(r.confidence, r.subjectInterval, r.relationInterval, r.objectInterval))
sen.relations = Some(newRelations)
case None => ()
}
}
?

It seems like it is just making a copy of all the relations in a sentence and writing them back to the sentence. Is there some side effect that I am missing? Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions