import requests
from src.db.concepts.DBO_Concept import DBO_Concept
from src.objects.concepts.Concept import Concept

# obj = requests.get('http://api.conceptnet.io/c/en/fitting?rel=/r/RelatedTo&limit=1000').json()
# print(obj.keys())
# print(len(obj['edges']))
# print(obj['edges'][2])

res = DBO_Concept.getConceptForWord("cat")
for a in res:
    print(a)

conc = Concept(-1, "horse", Concept.RELATION_ISA, "animal")
resu = DBO_Concept.addConcept(conc)
print(resu)
cc751a0505dac132e560dfb6ed709a5b02da2331
<mask token>

<mask token>
for a in res:
    print(a)
<mask token>
print(resu)

<mask token>
res = DBO_Concept.getConceptForWord('cat')
for a in res:
    print(a)
conc = Concept(-1, 'horse', Concept.RELATION_ISA, 'animal')
resu = DBO_Concept.addConcept(conc)
print(resu)

import requests
from src.db.concepts.DBO_Concept import DBO_Concept
from src.objects.concepts.Concept import Concept
res = DBO_Concept.getConceptForWord('cat')
for a in res:
    print(a)
conc = Concept(-1, 'horse', Concept.RELATION_ISA, 'animal')
resu = DBO_Concept.addConcept(conc)
print(resu)

import requests
from src.db.concepts.DBO_Concept import DBO_Concept
from src.objects.concepts.Concept import Concept

# obj = requests.get('http://api.conceptnet.io/c/en/fitting?rel=/r/RelatedTo&limit=1000').json()
# print(obj.keys())
# print(len(obj['edges']))
# print(obj['edges'][2])

res = DBO_Concept.getConceptForWord("cat")
for a in res:
    print(a)

conc = Concept(-1, "horse", Concept.RELATION_ISA, "animal")
resu = DBO_Concept.addConcept(conc)
print(resu)