Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to extract properties of nodes and add them in Neo4j? #23

Open
ImsuperSH opened this issue Nov 4, 2024 · 3 comments
Open

How to extract properties of nodes and add them in Neo4j? #23

ImsuperSH opened this issue Nov 4, 2024 · 3 comments
Labels
question Further information is requested

Comments

@ImsuperSH
Copy link

Does the project support it?Thanks

@lairgiyassir lairgiyassir added the question Further information is requested label Nov 4, 2024
@lairgiyassir
Copy link
Collaborator

Hello,

The node properties that are extracted and added in neo4j are :

  • Node label.
  • Node name.
  • Node embeddings.

Do you want to add other properties?

@ImsuperSH
Copy link
Author

Hello,

The node properties that are extracted and added in neo4j are :

  • Node label.
  • Node name.
  • Node embeddings.

Do you want to add other properties?

yes, I plan to extract some other properties from documents and add in neo4j. How to achieve it? Thanks.

@lairgiyassir
Copy link
Collaborator

lairgiyassir commented Nov 4, 2024

Yes, it is possible. I have already added a data class called EntityProperty https://github.com/AuvaLab/itext2kg/blob/main/itext2kg/models/knowledge_graph.py

However, you must fork this project and add the properties to the previous data model. Once done, all you need to do is to store the information extracted in these properties.

For example

class EntityProperties(BaseModel):
    embeddings: SkipValidation[np.array]=None
    prop1:SkipValidation[type of prop1]=None
    ...

    class Config:
        arbitrary_types_allowed = True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants