Open paulpierre opened 3 years ago
Hello, I managed to get the following to work:
from nlptriples import triples,setup
rdf = triples.RDF_triple()
sent = f'A dog is an animal. Dogs are good pets. A cat is an animal. Cats are bad pets.'.split('.')
for i in sent[:4]:
triple = rdf.extract(i, parsed=False)
print(triple)
I get the error "RuntimeError: dictionary changed size during iteration"
running a simple sentence with the following code:
from nlptriples import triples,setup rdf = triples.RDF_triple() sent = f'A dog is an animal. Dogs are good pets. A cat is an animal. Cats are bad pets.' triple = rdf.extract(sent) print(triple)