use of edu.stanford.nlp.scenegraph.image.SceneGraphImageRelationship in project CoreNLP by stanfordnlp.
the class SceneGraphImageFilter method countAll.
private static void countAll(List<SceneGraphImage> images) {
for (SceneGraphImage img : images) {
for (SceneGraphImageAttribute attr : img.attributes) {
entityCounter.incrementCount(attr.subjectLemmaGloss());
attributeCounter.incrementCount(attr.attributeLemmaGloss());
}
for (SceneGraphImageRelationship attr : img.relationships) {
entityCounter.incrementCount(attr.subjectLemmaGloss());
relationCounter.incrementCount(attr.predicateLemmaGloss());
entityCounter.incrementCount(attr.objectLemmaGloss());
}
}
}
Aggregations