UNPKG

@shubhamrasal/groundline

Version:
25 lines 743 B
export class BaseKGAdapter { constructor(name, description) { this.name = name; this.description = description; } transformEntity(external) { return { name: external.name, entityType: external.type, observations: [ `Imported from ${external.source}`, external.description || "", ...Object.entries(external.properties || {}).map(([key, value]) => `${key}: ${value}`), ].filter(Boolean), }; } transformRelation(external) { return { from: external.from, to: external.to, relationType: external.type, }; } } //# sourceMappingURL=adapter.js.map