언어 감지

Watson 자연어 처리 언어 발견은 입력 텍스트의 언어를 식별합니다.

블록 이름 lang-detect_izumo_multi_stock

지원 언어

언어 발견 블록은 다음 언어를 발견할 수 있습니다.

af, ar, bs, ca, cs, da, de, el, en, es, fi, fr, he, hi, hr, it, ja, ko, nb, nl, nn, pl, pt, ro, ru, sk, sr, sv, tr, zh_cn, zh_tw

기능

입력 텍스트의 언어를 발견하려면 이 블록을 사용하십시오.

다른 블록에 대한 종속성

없음

코드 샘플

# Load the language detection model
lang_detection_model = watson_nlp.load('lang-detect_izumo_multi_stock')

# Run it on input text
detected_lang = lang_detection_model.run('IBM announced new advances in quantum computing')

# Retrieve language ISO code
print(detected_lang.to_iso_format())

코드 예제의 출력 결과:

EN