Comments (2)
Hi @serenalotreck - that last PR doesn't actually add any support for n-ary relations, but you're right, it's still making a lot of assumptions about binary relations. Some objects with multiple attributes may not be relations, though, and the schemas intentionally don't require that level of modeling detail to be defined.
If I have a Drug
class with the attributes brand_name
and approval_status
where both are strings, I could assume that all Drug objects should be translated to relations where brand_name
and approval_status
will be subject and object, respectively - but that may not be the intended model at all. Same for additional fields: if I have another field like updated_on
then should that be a node property? An edge property? Probably not a predicate type but I don't really know that by the name alone.
We could just assume that everything is a triple, like in RDF, but that may defeat the purpose of LinkML, plus it's kind of messy.
So I'll propose a hybrid solution for now:
- If attributes are explicitly named
subject
,predicate
, andobject
, they will be treated accordingly predicate
may or may not be present - if not, use class name- Otherwise, assume dicts of 1:1 key:value pairs are triples
This is a workaround. I will accept your changes in the linked PR then open another issue+PR to add the above solution, enabling other predicate parsing cases.
There's a more elegant solution here in which the annotations
field can accept explicit directions for what should be subject, predicate, object, etc. - I'll open up another ticket for that.
from ontogpt.
Awesome, thanks so much!
from ontogpt.
Related Issues (20)
- Best way to apply on large quantities of documents? HOT 18
- Followup on #353 - handle more cases when transforming to KGX
- Followup on #353 - support including annotations in schemas to model KGX output HOT 1
- Don't show errors about Azure if not using Azure
- Add template suggestion command
- Add grounding refiner option for SPIRES
- Add extraction template for MIRO checklist
- Add caching for mapper
- Update default model for OpenAI HOT 1
- Broken links in documentation
- Make missing API key errors more friendly
- Transient errors with Translator endpoint HOT 1
- OpenAI base URL HOT 1
- Running web-ontogpt yeilds an "Internal Server Error" HOT 11
- gpt-4o HOT 3
- Update options for embedding models
- UnboundLocalError: local variable 'normalized_id' referenced before assignment HOT 1
- Make it easier to use custom schemas HOT 2
- ERROR: Could not build wheels for adeft, which is required to install pyproject.toml-based projects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ontogpt.