Comments (3)
I think somehow type serves as a kind of index. The graph search engine can leverage this to search for a subset of nodes/edges instead of searching for all nodes. Our algorithm does not benefit from this just yet. But it's nice to have, maybe for the sake of being cypher (?).
If it is to be done, I recommend it is to be stored under the __type__
property. Why two-end double dashes? it more adheres to the python convention and leaves room for other usages. It appears to be intimidating for users to construct a graph by themselves following this convention. But it will go away as soon as graph mutation is supported.
from grand-cypher.
Oh I like __type__
__label__
, that seems like the right move for sure! Good call. We can also perhaps have a few utilities to easily assign labels before adding proper support for mutations, like (just a sketch, I don't feel strongly about this API in particular)
from grandcypher import assign_labels
g_with_labels = assign_labels(g, assignments)
where assignments
can be a dict or callable:
assignments = {"a": "Customer", "b": "Store", "c": "Product"}
# or:
assignments = lambda x: x.split(":")[1:] # for node IDs of format "Jordan:Customer"
One thing to keep in mind is that objects can have more than one entity label assigned... So __label__
may have to be a complex dtype like set
instead of a simple str
.
[EDIT] Went back and changed "types" to "labels" to match cypher terminology.
from grand-cypher.
Fixed by @khoale88 in #25 :):)
from grand-cypher.
Related Issues (16)
- WHERE-clause boolean algebra HOT 1
- Use grandiso limit arg to implement the cypher LIMIT keyword
- Is it possible to run node related queries instead of relation related queries? HOT 3
- Graph mutations? HOT 5
- OPTIONAL MATCH HOT 1
- Edge Hopping HOT 2
- Feature request: path groups HOT 3
- Add aggregation functions HOT 2
- NetworkXDialect does not work correctly with networkx.DiGraph
- Support comments (C-style)
- CONTAINS, ENDS WITH, and STARTS WITH HOT 1
- Multi-hop graph relationships HOT 8
- License MIT or Apache 2.0? HOT 1
- Support for Equijoins HOT 5
- Aggregate Functions Cypher HOT 3
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 grand-cypher.