-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.py
executable file
·33 lines (21 loc) · 897 Bytes
/
test.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
#!/usr/bin/env python
from pyapml.APMLParser import APMLParser
def main():
parser = APMLParser('test.apml')
apml = parser.parse()
print '=========================================='
print "APML Title: %s" % apml.head.Title
print "%s Implicit Concepts" % apml.profiles[0].name
for c in apml.profiles[0].implicit.concepts:
print "Concept: %s ==> Value: %s"%(c.key, c.value)
print "%s Explicit Concepts" % apml.profiles[0].name
for c in apml.profiles[0].explicit.concepts:
print "Concept: %s ==> Value: %s"%(c.key, c.value)
print '=========================================='
print ' ALL CONCEPTS'
print '=========================================='
allconcepts = apml.get_all_concepts()
for c in allconcepts:
print "Concept: %s ==> Value: %s"%(c.key, c.value)
if __name__ == "__main__":
main()