Create Knowledge Base from existing RDF triples in .ttl or .nt file #10781
-
Dear spaCy Team, we've been working with KnowledgeBase class to construct a KnowledgeBase object for NED. My basic question is, if it is possible to create a KnowledgeBase object from an existing .ttl or .nt file? We have all required RDF triples available in the standard file formats for RDF triples (.ttl resp .nt files). So, in principle we could just pass these file to the KnowledgeBase class - if construction from these file formats is supported? Would be glad to get any help and suggestions :) Best, Matthias |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There's no built-in functionality to convert triples or RDF into spaCy's KnowledgeBase. Since the KnowledgeBase is just keys, vectors, and aliases, if you can iterate over the entries in your data it should be easy to add them though. |
Beta Was this translation helpful? Give feedback.
There's no built-in functionality to convert triples or RDF into spaCy's KnowledgeBase. Since the KnowledgeBase is just keys, vectors, and aliases, if you can iterate over the entries in your data it should be easy to add them though.