진격의 거인 Knowledge graph 만들기

Doyeon Kim·2025년 9월 22일

1. Knowledge Graph란?

지식 그래프는 세상의 지식을 노드(Node)와 엣지(Edge)로 표현한 데이터 구조예요.

  • 노드(Node): 사람, 장소, 사물, 개념 같은 객체(엔티티)
  • 엣지(Edge): 두 노드 간의 관계(Relationship)

즉, “무엇(Who/What)”과 “어떤 관계(How)”로 연결되어 있는지를 그래프 형태로 나타냅니다.

예시:

  • 진격의 거인 —[저자]→ 이사야마 하지메
  • 에렌 예거 —[소속]→ 조사병단
  • 진격의 거인 —[방영]→ 애니메이션

2. 왜 중요할까?

  1. 데이터를 구조화: 텍스트를 단순히 저장하는 게 아니라, 연결된 형태로 이해할 수 있어요.
  2. 검색과 추천에 활용: 구글, 네이버, 위키백과 등이 “지식 패널”이나 “자동완성 추천”에 쓰는 기술이 바로 이것입니다.
  3. AI와 연계: 챗봇이나 추천 시스템에서 “맥락 있는 답변”을 주도록 도와줍니다.

3. 어디에 쓰이나?

  • 검색엔진: “타이타닉 감독 누구야?” → 타이타닉 —[감독]→ 제임스 카메론
  • 전자상거래: “아이폰과 호환되는 액세서리” 찾기
  • 헬스케어: 질병, 증상, 약물 관계 그래프
  • 콘텐츠 정리: 위키, 블로그, 연구 노트 등에서 복잡한 맥락을 한눈에 보기

4. Knowledge graph 만들어보기

ChatGPT를 사용하여 진격의 거인 나무위키 페이지를 Knowledge grpah(Triples & JSON-LD) 형태로 구성했습니다.

'진격의 거인' 나무위키 페이지:
https://namu.wiki/w/%EC%A7%84%EA%B2%A9%EC%9D%98%20%EA%B1%B0%EC%9D%B8

1) Triples CSV

subject,predicate,object
Attack on Titan,instance_of,Manga series
Attack on Titan,original_title_ja,進撃の巨人
Attack on Titan,author,Hajime Isayama
Attack on Titan,publisher,Kodansha
Attack on Titan,serialized_in,Bessatsu Shōnen Magazine
Attack on Titan,serialization_start_date,2009-09-09
Attack on Titan,serialization_end_date,2021-04-09
Attack on Titan,number_of_tankōbon_volumes,34
Attack on Titan,anime_adaptation_studio,Wit Studio
Attack on Titan,anime_adaptation_studio,MAPPA
Anime: Attack on Titan (Season 1),air_dates,2013-04-07/2013-09-29
Anime: Attack on Titan (Season 2),air_dates,2017-04-01/2017-06-17
Anime: Attack on Titan (Season 3 Part 1),air_dates,2018-07-23/2018-10-15
Anime: Attack on Titan (Season 3 Part 2),air_dates,2019-04-28/2019-07-01
Anime: The Final Season Part 1,air_dates,2020-12-07/2021-03-29
Anime: The Final Season Part 2,air_dates,2022-01-10/2022-04-04
Anime: The Final Season Special 1,air_date,2023-03-04
Anime: The Final Season Special 2,air_date,2023-11-04
Attack on Titan,main_character,Eren Yeager
Attack on Titan,main_character,Mikasa Ackerman
Attack on Titan,main_character,Armin Arlert
Attack on Titan,organization,Survey Corps
Attack on Titan,location,Paradis Island
Attack on Titan,location,Shiganshina District
Attack on Titan,wall,Wall Maria
Attack on Titan,wall,Wall Rose
Attack on Titan,wall,Wall Sina
Attack on Titan,copies_in_circulation,"140,000,000+ (as of 2023-11)"

2) JSON-LD

{
  "@context": {
    "name": "http://schema.org/name",
    "name_ja": "http://schema.org/alternateName",
    "author": "http://schema.org/author",
    "publisher": "http://schema.org/publisher",
    "isPartOf": "http://schema.org/isPartOf",
    "startDate": "http://schema.org/startDate",
    "endDate": "http://schema.org/endDate",
    "numberOfVolumes": "http://schema.org/numberOfVolumes",
    "character": "http://schema.org/character",
    "locationCreated": "http://schema.org/locationCreated",
    "genre": "http://schema.org/genre",
    "productionCompany": "http://schema.org/productionCompany",
    "TVSeries": "http://schema.org/TVSeries",
    "CreativeWork": "http://schema.org/CreativeWork",
    "ComicSeries": "http://schema.org/ComicSeries",
    "Organization": "http://schema.org/Organization",
    "Person": "http://schema.org/Person",
    "Place": "http://schema.org/Place",
    "sameAs": "http://schema.org/sameAs"
  },
  "@graph": [
    {
      "@id": "AttackOnTitan",
      "@type": [
        "CreativeWork",
        "ComicSeries"
      ],
      "name": "Attack on Titan",
      "name_ja": "進撃の巨人",
      "author": {
        "@id": "HajimeIsayama",
        "name": "Hajime Isayama",
        "@type": "Person"
      },
      "publisher": {
        "@id": "Kodansha",
        "name": "Kodansha",
        "@type": "Organization"
      },
      "isPartOf": {
        "@id": "BessatsuShonenMagazine",
        "name": "Bessatsu Shōnen Magazine",
        "@type": "Periodical"
      },
      "startDate": "2009-09-09",
      "endDate": "2021-04-09",
      "numberOfVolumes": 34,
      "sameAs": [
        "https://en.wikipedia.org/wiki/Attack_on_Titan",
        "https://ko.wikipedia.org/wiki/%EC%A7%84%EA%B2%A9%EC%9D%98_%EA%B1%B0%EC%9D%B8"
      ],
      "character": [
        {
          "@id": "ErenYeager",
          "name": "Eren Yeager",
          "@type": "Person"
        },
        {
          "@id": "MikasaAckerman",
          "name": "Mikasa Ackerman",
          "@type": "Person"
        },
        {
          "@id": "ArminArlert",
          "name": "Armin Arlert",
          "@type": "Person"
        }
      ],
      "locationCreated": {
        "@id": "ParadisIsland",
        "name": "Paradis Island",
        "@type": "Place"
      },
      "genre": [
        "Dark fantasy",
        "Post-apocalyptic",
        "Action"
      ]
    },
    {
      "@id": "WitStudio",
      "@type": "Organization",
      "name": "Wit Studio"
    },
    {
      "@id": "MAPPA",
      "@type": "Organization",
      "name": "MAPPA"
    },
    {
      "@id": "AnimeFinalSeason",
      "@type": "TVSeries",
      "name": "Attack on Titan The Final Season",
      "productionCompany": [
        {
          "@id": "MAPPA"
        }
      ],
      "startDate": "2020-12-07",
      "endDate": "2023-11-04"
    }
  ]
}

0개의 댓글