Skip to content

Quickstart

The sayou-brain package provides high-level facades that abstract away the complexity of underlying modules. Choose the pipeline that fits your data source.

Case A: Document Processing (PDF, Office)

Use StandardPipeline for layout-preserving document analysis.

flowchart LR
    %% 노드 스타일
    classDef input fill:#fff3e0,stroke:#e65100;
    classDef process fill:#f3e5f5,stroke:#7b1fa2;
    classDef output fill:#e8f5e9,stroke:#2e7d32;

    Input[PDF / Office]:::input

    subgraph SP [Standard Pipeline]
        direction LR
        C(Connector) --> D(Document Layout Parse)
        D --> R(Refinery)
        R --> CH(Chunking)
        CH --> W(Wrapper)
        W --> A(Assembler)
    end

    KG[("Knowledge Graph")]:::output

    Input --> C
    A --> L(Loader)
    L --> KG

    %% 강조
    style D stroke-width:3px,stroke:#d32f2f
Python
from sayou.brain import StandardPipeline

result = StandardPipeline().process(
    source="./reports/financial_q1.pdf",
    destination="knowledge_graph.json",
)

print(f"Ingestion Complete. Processed: {result['processed']}")

Case B: Multimedia & Code Analysis

Use NormalPipeline for logic-based extraction from Video, Code repositories, or Web sources.

flowchart LR
    %% 노드 스타일
    classDef input fill:#fff3e0,stroke:#e65100;
    classDef process fill:#e1f5fe,stroke:#0277bd;
    classDef output fill:#e8f5e9,stroke:#2e7d32;

    Input[YouTube / Code]:::input

    subgraph NP [Normal Pipeline]
        direction LR
        C(Connector) --> R(Refinery)
        R --> CH(Chunking)
        CH --> W(Wrapper)
        W --> A(Assembler)
    end

    KG[("Knowledge Graph")]:::output

    Input --> C
    A --> L(Loader)
    L --> KG

    %% 강조
    style CH stroke-width:3px,stroke:#0288d1
Python
from sayou.brain import NormalPipeline

result = NormalPipeline().process(
    source="youtube://YOUTUBE_VIDEO_ID",
    destination="./output/graph_data.json"
)

print(f"Graph Construction Complete. Nodes: {len(result['nodes'])}")

Output Format (JSON)

The output is a structured JSON strictly following the Sayou Ontology, ready for Graph Databases or Vector Stores.

Click to expand JSON example
JSON
{
  "nodes": [
    {
      "node_id": "sayou:doc:1_h_0",
      "node_class": "sayou:Topic",
      "attributes": { "schema:text": "Financial Summary Q1" },
      "relationships": {}
    },
    { "……" }
  ],
  "edges": [
    { "……" }
  ]
}

Next Steps

Library Guides →