074. 새 어휘 엔터티 추가 (Adding New Vocabulary Entities)
- 원문: English
- 위치: Additional capabilities › Data Automation › Data Automation Library › Managing Library Entities › Managing Custom Vocabulary Entities › Adding New Vocabulary Entities
한 줄 요약
InvokeDataAutomationLibraryIngestionJob(--operation-type UPSERT)으로 어휘를 추가합니다. 입력은 S3의 JSONL 매니페스트 또는 인라인 페이로드(최대 100개 구문, 빠른 업데이트용) 입니다.
핵심 내용
- ⚠️
UPSERT는 엔터티 단위 덮어쓰기(clobber-style) 입니다. 기존 내용과 병합되지 않습니다.
방법 1: S3 매니페스트
- JSONL 매니페스트 작성 (한 줄 = 엔터티 하나)
- S3에 업로드
- 수집 작업 시작
{"entityId":"medical-en","description":"Medication terms in English language","phrases":[{"text":"paracetamol"},{"text":"ibuprofen"},{"text":"acetaminophen","displayAsText":"acetaminophen"}],"language":"EN"}
| 필드 | 필수 | 설명 |
|---|---|---|
entityId | ✅ | 고유 식별자, 최대 128자 |
description | - | 설명 |
language | ✅ | ISO 언어 코드 (예: EN, ES) → 065 |
phrases[].text | ✅ | 단어 또는 구문 |
phrases[].displayAsText | - | 전사 결과에서 실제 단어를 이 값으로 대체. ⚠️ 대소문자 구분 |
aws bedrock-data-automation invoke-data-automation-library-ingestion-job \
--library-arn "arn:aws:bedrock:us-east-1:123456789012:data-automation-library/healthcare-vocabulary" \
--entity-type "VOCABULARY" --operation-type "UPSERT" \
--input-configuration '{"s3Object":{"s3Uri":"s3://my-bucket/manifests/vocabulary-manifest.json"}}' \
--output-configuration '{"s3Uri":"s3://my-bucket/outputs/"}'
- 응답:
jobArn - 콘솔: Library details › Add custom vocabulary list › Upload/select manifest (로컬 또는 S3)
방법 2: 인라인 페이로드 (최대 100개 구문)
--input-configuration '{"inlinePayload":{"upsertEntitiesInfo":[{"vocabulary":{"entityId":"medical-en","language":"EN","phrases":[...]}}]}}'- 콘솔: Add custom vocabulary list › Add manually
📝 원문 확인 필요: 이 페이지의 CLI 예시는
aws bedrock-data-automation-data-automation ...으로 되어 있어 다른 페이지의aws bedrock-data-automation ...과 다릅니다(오타로 보임). 또 매니페스트를 JSONL이라 하면서 예시 파일명은.json입니다.
SA 관점
displayAsText로 전사 표기를 표준화(예: 약어 → 정식 표기)할 수 있어, 다운스트림 검색·분석의 용어 일관성 확보에 유용합니다.- 대량 어휘는 매니페스트, 긴급 추가는 인라인(100개 이하)으로 나눠 쓰되, UPSERT가 전체 교체라는 점 때문에 인라인으로 일부만 보내면 기존 구문이 사라질 수 있음에 유의하세요.