Skip to content

계층적 다중 선택

계층적 분류, 주제 태깅, 다단계 카테고리 주석 작업을 위해 Potato에서 확장 가능한 트리 기반 분류 체계 선택기를 구축합니다.

계층적 다중 선택 주석 스키마는 중첩된 분류 체계에서 카테고리를 선택할 수 있는 확장 가능한 트리 인터페이스를 제공합니다. 이 스키마는 주제 분류, 제품 분류, 또는 다단계 태깅 작업처럼 레이블이 계층 구조로 구성된 작업에 적합합니다.

개요

계층적 다중 선택 스키마는 다음과 같은 접을 수 있는 트리 뷰를 제시합니다.

  • 부모 노드는 확장하여 하위 카테고리를 표시합니다
  • 리프 노드는 개별적으로 선택할 수 있습니다
  • 선택적 자동 선택은 선택 항목을 트리의 위쪽 또는 아래쪽으로 전파합니다
  • 검색을 통해 주석자는 큰 분류 체계에서 카테고리를 빠르게 찾을 수 있습니다

빠른 시작

yaml
annotation_schemes:
  - annotation_type: hierarchical_multiselect
    name: topic_tags
    description: Select all applicable topic categories.
    taxonomy:
      Science:
        Physics:
          - Quantum Mechanics
          - Thermodynamics
        Biology:
          - Genetics
          - Ecology
      Technology:
        - Software
        - Hardware

설정 옵션

필드유형기본값설명
annotation_typestring필수"hierarchical_multiselect"여야 합니다
namestring필수이 스키마의 고유 식별자
descriptionstring필수주석자에게 표시되는 지침
taxonomyobject필수카테고리 계층을 정의하는 중첩 객체
auto_select_childrenbooleanfalse부모가 선택되면 모든 하위 항목을 자동으로 선택
auto_select_parentbooleanfalse모든 하위 항목이 선택되면 부모를 자동으로 선택
show_searchbooleanfalse분류 체계 트리를 필터링하는 검색 상자를 표시
max_selectionsinteger/nullnull선택할 수 있는 최대 카테고리 수(null은 무제한)
expand_depthinteger1기본적으로 확장할 트리 레벨 수
label_requirement.requiredbooleanfalse제출 전에 하나 이상의 선택이 필요한지 여부

예시

주제 분류

yaml
annotation_schemes:
  - annotation_type: hierarchical_multiselect
    name: topic_classification
    description: Select all topics that apply to this document.
    show_search: true
    max_selections: 5
    taxonomy:
      Politics:
        Domestic:
          - Elections
          - Legislation
          - Policy
        International:
          - Diplomacy
          - Trade
          - Conflict
      Sports:
        - Football
        - Basketball
        - Tennis
      Entertainment:
        Film:
          - Reviews
          - Industry News
        Music:
          - Reviews
          - Concerts

자동 선택을 사용한 제품 분류

yaml
annotation_schemes:
  - annotation_type: hierarchical_multiselect
    name: product_category
    description: Categorize this product listing.
    auto_select_children: true
    auto_select_parent: true
    expand_depth: 2
    taxonomy:
      Electronics:
        Computers:
          - Laptops
          - Desktops
          - Tablets
        Audio:
          - Headphones
          - Speakers
      Clothing:
        Men:
          - Shirts
          - Pants
        Women:
          - Dresses
          - Tops

의료 코딩

yaml
annotation_schemes:
  - annotation_type: hierarchical_multiselect
    name: diagnosis_codes
    description: Select all applicable diagnosis categories.
    show_search: true
    label_requirement:
      required: true
    taxonomy:
      Cardiovascular:
        Hypertension:
          - Primary
          - Secondary
        Arrhythmia:
          - Atrial Fibrillation
          - Ventricular Tachycardia
      Respiratory:
        Obstructive:
          - Asthma
          - COPD
        Infectious:
          - Pneumonia
          - Bronchitis

출력 형식

json
{
  "topic_tags": {
    "labels": ["Science > Physics > Quantum Mechanics", "Technology > Software"]
  }
}

선택된 카테고리는 루트에서 리프까지의 전체 경로 문자열로 저장됩니다.

모범 사례

  1. 분류 체계를 관리 가능한 수준으로 유지 - 4단계를 넘는 중첩은 피합니다. 깊은 트리는 탐색하기 어렵습니다
  2. 큰 분류 체계에는 검색 활성화 - 카테고리가 30개를 넘는 경우 show_search: true가 사용성을 크게 향상합니다
  3. 자동 선택은 신중하게 사용 - 부모 카테고리가 모든 하위 항목을 함의할 때 하위 항목을 자동 선택하는 것이 유용하지만, 그렇지 않으면 혼란을 줄 수 있습니다
  4. 적절한 확장 깊이 설정 - 주석자가 부담을 느끼지 않으면서 구조를 볼 수 있도록 충분한 레벨을 확장합니다
  5. 필요할 때 선택 제한 - max_selections를 사용하여 주석자가 과도하게 태깅하는 것을 방지합니다

더 읽어보기

구현 세부 사항은 원본 문서를 참조하세요.