Skip to content

Commit 7879400

Browse files
Implement NIF-based citation extraction with precise character offsets
1 parent f55682b commit 7879400

4 files changed

Lines changed: 209 additions & 165 deletions

File tree

core/src/main/java/org/dbpedia/extraction/nif/Link.java

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,29 @@ public class Link implements Comparable<Link> {
1111
private boolean topicLink = false;
1212
private boolean topicPartLink = false;
1313
private boolean surfaceFormLink = false;
14-
14+
private boolean citation = false;
15+
private String citationId = "";
16+
1517
public Link() {
16-
18+
19+
}
20+
21+
public boolean isCitation() {
22+
return citation;
23+
}
24+
25+
public void setCitation(boolean citation) {
26+
this.citation = citation;
1727
}
18-
28+
29+
public String getCitationId() {
30+
return citationId;
31+
}
32+
33+
public void setCitationId(String citationId) {
34+
this.citationId = citationId;
35+
}
36+
1937
public boolean isSurfaceFormLink() {
2038
return surfaceFormLink;
2139
}
@@ -91,12 +109,12 @@ public void setExternal(boolean external) {
91109
@Override
92110
public int compareTo(Link link) {
93111
// TODO Auto-generated method stub
94-
if(this.wordStart==link.getWordStart())
112+
if (this.wordStart == link.getWordStart())
95113
return 0;
96-
else if(this.wordStart<link.getWordStart())
114+
else if (this.wordStart < link.getWordStart())
97115
return -1;
98116
else
99117
return 1;
100118
}
101-
119+
102120
}

0 commit comments

Comments
 (0)