graph_transformers#

Graph Transformers transform Documents into Graph Documents.

Classes

graph_transformers.diffbot.DiffbotGraphTransformer([...])

Transform documents into graph documents using Diffbot NLP API.

graph_transformers.diffbot.NodesList()

List of nodes with associated properties.

graph_transformers.diffbot.SimplifiedSchema()

Simplified schema mapping.

graph_transformers.diffbot.TypeOption(value)

graph_transformers.gliner.GlinerGraphTransformer(...)

A transformer class for converting documents into graph structures using the GLiNER and GLiREL models.

graph_transformers.llm.LLMGraphTransformer(llm)

Transform documents into graph-based documents using a LLM.

graph_transformers.llm.UnstructuredRelation

Create a new model by parsing and validating input data from keyword arguments.

graph_transformers.relik.RelikGraphTransformer([...])

A transformer class for converting documents into graph structures using the Relik library and models.

Functions

graph_transformers.diffbot.format_property_key(s)

Formats a string to be used as a property key.

graph_transformers.llm.create_simple_model([...])

Create a simple graph model with optional constraints on node and relationship types.

graph_transformers.llm.create_unstructured_prompt([...])

graph_transformers.llm.format_property_key(s)

graph_transformers.llm.get_default_prompt([...])

graph_transformers.llm.map_to_base_node(node)

Map the SimpleNode to the base Node.

graph_transformers.llm.map_to_base_relationship(rel)

Map the SimpleRelationship to the base Relationship.

graph_transformers.llm.optional_enum_field([...])

Utility function to conditionally create a field with an enum constraint.

graph_transformers.llm.validate_and_get_relationship_type(...)