ExtractionSchema

org.llm4s.knowledgegraph.extraction.ExtractionSchema
See theExtractionSchema companion class

Attributes

Companion
class
Graph
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited and Abstract types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Value members

Concrete methods

def simple(entityTypes: Seq[String], relationshipTypes: Seq[String], properties: Map[String, Seq[String]], allowOutOfSchema: Boolean): ExtractionSchema

Convenience factory matching the simplified API proposed in issue #652.

Convenience factory matching the simplified API proposed in issue #652.

val schema = ExtractionSchema.simple(
 entityTypes = Seq("Person", "Organization", "Technology"),
 relationshipTypes = Seq("WORKS_FOR", "FOUNDED", "USES"),
 properties = Map("Person" -> Seq("role", "department"))
)

Value parameters

allowOutOfSchema

If true, out-of-schema entities/relationships are kept

entityTypes

Entity type names

properties

Map of entity type name to its expected property names

relationshipTypes

Relationship type names

Attributes

Returns

An ExtractionSchema with definitions built from the simple inputs