forked from mateusccoelho/SQG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
47 lines (33 loc) · 723 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
from parser.qald import Qald
from parser.lc_quad import LC_Qaud
from parser.lc_quad_linked import LC_Qaud_Linked
from parser.webqsp import WebQSP
ds = WebQSP()
ds.load()
ds.parse()
ds.print_pairs()
### Get entity label in freebase
# PREFIX ns: <http://rdf.freebase.com/ns/>
# prefix : <http://rdf.basekb.com/ns/>
# SELECT DISTINCT ?label
# WHERE {
# filter(lang(?label) = 'en').
# ns:m.03rjj rdfs:label ?label
# }
# ds = Qald(Qald.qald_8)
# ds.load()
# ds.parse()
# ds.print_pairs()
# ds = LC_Qaud()
# ds.load()
# ds.parse()
# ds.print_pairs()
ds = LC_Qaud_Linked()
ds.load()
ds.parse()
ds.print_pairs()
# for x in ds.qapairs[:10]:
# print x.sparql
# for y in x.sparql.uris:
# print y.type,
# print ""