Documentation
¶
Index ¶
- func CollectFiles(root string) []string
- func GetNodeIds(extraction *Extraction) []string
- func GetNodeLabels(extraction *Extraction) []string
- func MakeId(parts ...string) string
- func SortNodes(nodes []Node)
- type Edge
- type Extraction
- func Extract(files []string, root string) *Extraction
- func ExtractC(path string) *Extraction
- func ExtractCSharp(path string) *Extraction
- func ExtractCpp(path string) *Extraction
- func ExtractDart(path string) *Extraction
- func ExtractElixir(path string) *Extraction
- func ExtractElm(path string) *Extraction
- func ExtractGo(path string) *Extraction
- func ExtractHaskell(path string) *Extraction
- func ExtractJava(path string) *Extraction
- func ExtractJavaScript(path string) *Extraction
- func ExtractJulia(path string) *Extraction
- func ExtractKotlin(path string) *Extraction
- func ExtractLua(path string) *Extraction
- func ExtractObjectiveC(path string) *Extraction
- func ExtractPHP(path string) *Extraction
- func ExtractPowerShell(path string) *Extraction
- func ExtractPython(path string) *Extraction
- func ExtractR(path string) *Extraction
- func ExtractRuby(path string) *Extraction
- func ExtractRust(path string) *Extraction
- func ExtractScala(path string) *Extraction
- func ExtractSwift(path string) *Extraction
- func ExtractZig(path string) *Extraction
- type Node
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectFiles ¶
CollectFiles collects all source files from a directory.
func GetNodeIds ¶
func GetNodeIds(extraction *Extraction) []string
GetNodeIds returns the IDs of all nodes in an extraction.
func GetNodeLabels ¶
func GetNodeLabels(extraction *Extraction) []string
GetNodeLabels returns the labels of all nodes in an extraction.
Types ¶
type Edge ¶
type Edge struct {
Source string `json:"source"`
Target string `json:"target"`
Relation string `json:"relation"`
Confidence string `json:"confidence"`
Weight float64 `json:"weight"`
}
Edge represents a relationship between nodes.
type Extraction ¶
type Extraction struct {
Nodes []Node `json:"nodes"`
Edges []Edge `json:"edges"`
InputTokens int `json:"input_tokens"`
OutputTokens int `json:"output_tokens"`
}
Extraction represents the result of extracting structured data from a file.
func Extract ¶
func Extract(files []string, root string) *Extraction
Extract runs extraction on multiple files.
func ExtractC ¶
func ExtractC(path string) *Extraction
ExtractC extracts functions and imports from a C file.
func ExtractCSharp ¶
func ExtractCSharp(path string) *Extraction
ExtractCSharp extracts classes, methods, and imports from a C# file using tree-sitter AST parsing.
func ExtractCpp ¶
func ExtractCpp(path string) *Extraction
ExtractCpp extracts classes, methods, functions, and includes from a C++ file using tree-sitter.
func ExtractDart ¶
func ExtractDart(path string) *Extraction
ExtractDart extracts classes, methods, and imports from a Dart file using tree-sitter AST parsing.
func ExtractElixir ¶
func ExtractElixir(path string) *Extraction
ExtractElixir extracts modules, functions, and imports from an Elixir file using tree-sitter AST parsing.
func ExtractElm ¶
func ExtractElm(path string) *Extraction
ExtractElm extracts functions, types, and imports from an Elm file using tree-sitter AST parsing.
func ExtractGo ¶
func ExtractGo(path string) *Extraction
ExtractGo extracts functions, methods, types, and imports from a Go file.
func ExtractHaskell ¶
func ExtractHaskell(path string) *Extraction
ExtractHaskell extracts functions, types, and imports from a Haskell file.
func ExtractJava ¶
func ExtractJava(path string) *Extraction
ExtractJava extracts classes, methods, and imports from a Java file.
func ExtractJavaScript ¶
func ExtractJavaScript(path string) *Extraction
ExtractJavaScript extracts functions, classes, and imports from a JavaScript/TypeScript file.
func ExtractJulia ¶
func ExtractJulia(path string) *Extraction
ExtractJulia extracts modules, functions, and imports from a Julia file using tree-sitter AST parsing.
func ExtractKotlin ¶
func ExtractKotlin(path string) *Extraction
ExtractKotlin extracts classes, methods, and imports from a Kotlin file using tree-sitter AST parsing.
func ExtractLua ¶
func ExtractLua(path string) *Extraction
ExtractLua extracts functions, methods, and imports from a Lua file.
func ExtractObjectiveC ¶
func ExtractObjectiveC(path string) *Extraction
ExtractObjectiveC extracts classes, methods, and imports from an Objective-C file using tree-sitter AST parsing.
func ExtractPHP ¶
func ExtractPHP(path string) *Extraction
ExtractPHP extracts classes, methods, and imports from a PHP file.
func ExtractPowerShell ¶
func ExtractPowerShell(path string) *Extraction
ExtractPowerShell extracts functions, classes, and imports from a PowerShell file using tree-sitter AST parsing.
func ExtractPython ¶
func ExtractPython(path string) *Extraction
ExtractPython extracts classes, functions, imports, and calls from a Python file using tree-sitter.
func ExtractR ¶
func ExtractR(path string) *Extraction
ExtractR extracts functions, methods, and imports from an R file using tree-sitter AST parsing.
func ExtractRuby ¶
func ExtractRuby(path string) *Extraction
ExtractRuby extracts classes, methods, and imports from a Ruby file.
func ExtractRust ¶
func ExtractRust(path string) *Extraction
ExtractRust extracts structs, functions, and imports from a Rust file.
func ExtractScala ¶
func ExtractScala(path string) *Extraction
ExtractScala extracts classes, methods, and imports from a Scala file using tree-sitter AST parsing.
func ExtractSwift ¶
func ExtractSwift(path string) *Extraction
ExtractSwift extracts classes, methods, and imports from a Swift file using tree-sitter AST parsing.
func ExtractZig ¶
func ExtractZig(path string) *Extraction
ExtractZig extracts structs, functions, and imports from a Zig file.
Source Files
¶
- extract.go
- extract_c.go
- extract_cpp.go
- extract_csharp.go
- extract_dart.go
- extract_elixir.go
- extract_elm.go
- extract_go.go
- extract_haskell.go
- extract_java.go
- extract_javascript.go
- extract_julia.go
- extract_kotlin.go
- extract_lua.go
- extract_objc.go
- extract_php.go
- extract_powershell.go
- extract_python.go
- extract_r.go
- extract_ruby.go
- extract_rust.go
- extract_scala.go
- extract_swift.go
- extract_zig.go