Skip to content

graph.UndirectedGragh causes error when it faces self link #4

Description

@titsuki

I found that aggregate.py comments out a function which removes self-linked items and it will trigger java.lang.ArrayIndexOutOfBoundsException when graph.UndirectedGraph loads the resulting file. See the followings.

testfile.txt:

a       a       1
$ java -Xmx24g -cp $CP ca.ualberta.entitylinking.graph.UndirectedGraph el.config testfile.txt
...
java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 32
	at it.unimi.dsi.webgraph.BVGraph.updateBins(BVGraph.java:1738)
	at it.unimi.dsi.webgraph.BVGraph.storeInternal(BVGraph.java:1844)
	at it.unimi.dsi.webgraph.BVGraph.store(BVGraph.java:1687)
	at it.unimi.dsi.webgraph.BVGraph.store(BVGraph.java:1715)
	at it.unimi.dsi.webgraph.BVGraph.store(BVGraph.java:1727)
	at ca.ualberta.entitylinking.graph.WeightedGraph.writeGraph(WeightedGraph.java:66)
	at ca.ualberta.entitylinking.graph.UndirectedGraph.storeGraph(UndirectedGraph.java:87)
	at ca.ualberta.entitylinking.graph.UndirectedGraph.main(UndirectedGraph.java:204)

Cheers,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions