public class SceneGraphSentenceMatcher
extends java.lang.Object
| Constructor and Description |
|---|
SceneGraphSentenceMatcher(Embedding embeddings) |
| Modifier and Type | Method and Description |
|---|---|
static Pair<IndexedWord,IndexedWord> |
findClosestPair(java.util.List<IndexedWord> subjects,
java.util.List<IndexedWord> objects)
Picks one IndexedWord from subjects and one IndexedWord from objects
such that the distance between them is minimal.
|
java.util.List<Triple<IndexedWord,IndexedWord,java.lang.String>> |
getRelationTriples(SceneGraphImageRegion region)
Aligns nodes in the scene graph to words in the corresponding sentence.
|
static void |
main(java.lang.String[] args) |
public SceneGraphSentenceMatcher(Embedding embeddings)
public static Pair<IndexedWord,IndexedWord> findClosestPair(java.util.List<IndexedWord> subjects, java.util.List<IndexedWord> objects)
subjects - List of subject candidates.objects - List of object candidates.public java.util.List<Triple<IndexedWord,IndexedWord,java.lang.String>> getRelationTriples(SceneGraphImageRegion region)
Triple of the IndexedWord corresponding to the
subject, the IndexedWord corresponding to the object or attribute and the
relation between them.region - SceneGraphRegion with sentence and corresponding scene graph.public static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException