Detecção de Idioma

O modelo de detecção de idioma identifica em qual idioma natural o texto de entrada está.

Por exemplo, a detecção de idioma pode ajudar a tornar as interações de suporte ao cliente mais personalizáveis e rápidas. Os chatbots do atendimento ao cliente podem interagir com os clientes com base no idioma do texto de entrada e responder adequadamente. Se um cliente precisar de ajuda com um produto, o servidor de chatbot poderá selecionar o manual do produto no idioma correspondente ou transferir para o call center do idioma específico.

Idiomas com Suporte

Código do idioma Idioma
af Africâner
sq Albanês
am Amárico
ar Árabe
hy Armênio
as Assamês
az Azerbaijano
ba Baxequir
eu Basco
be Bielo-Russo
bn Bengali
ber Berbere
bs Bósnio
bg Búlgaro
my Birmanês
ca Catalão
ceb Cebuano
km Khmer Central
ce Checheno
zh-CN Chinês (Simplificado)
zh-TW Chinês (Tradicional)
cv Chuvash
co Córsego
hr Croata
cs Tcheco
da Dinamarquês
dv Divehi
nl Holandês
mhr Mari Oriental
en Inglês
eo Esperanto
et Estoniano
fi Finlandês
fr Francês
gl Galício
ka Georgiano
de Alemão
el Grego
gu Guzerate
ht Haitiano
ha Hauçá
he Hebraico
hi Híndi
hu Húngaro
is Islandês
io Ido
ig Ibo
ilo Ilocano
id Indonésio
ga Irlanda
it Italiano
ja Japonês
jv Javanês
kab Cabila
kn Canarês
kk Cazaque
ky Kirghiz / Quirguistão
ko Coreano
ku Curda
lo Laosiano
la Latim
lv Letão
lt Lituano
jbo Lojban
lb Luxemburguês
mk Macedônio
mg Malgaxe
ms Malaio
ml Malaiala
mt Malta
mr Marata
mn Mongol
ne Nepalês
no Norueguês (Bokmal)
nn Norueguês (Nynorsk)
or Oriá
fa Punjabi/Panjabi
pl Persa
pt Polonês
pa Português
ps Pashto (Pushto)
qu Quíchua
ro Romeno
ru Russo
sr Sérvio
sd Sindi
si Sinhala
sk Eslovaco
sl Esloveno
so Somália
es Espanhol
su Sundandês
sw Suaili
sv Sueco
tl Tagalog
tg Tadjique
ta Tâmil
tt Tártaro
te Télugo
th Tailandês
bo Tibetano
tr Turco
tk Turquia
ug Uigure
uk Ucraniano
ur Urdu
uz Usbeque
vi Vietnamita
war Waray
cy Galês
fy Frísio Ocidental
sah Iacuto
yi Ídiche
yo Ioruba

Exemplos

Texto de Entrada Idioma e Pontuações
OCI recently added new services to the existing 
compliance program including SOC, HIPAA, and ISO, to enable 
our customers to solve their use cases. We also released new 
white papers and guidance documents related to Object Storage, 
the Australian Prudential Regulation Authority (APRA), and 
the Central Bank of Brazil. These resources help regulated 
customers better understand how OCI supports their regional 
and industry-specific compliance requirements. Not only are 
we expanding our number of compliance offerings and regulatory 
alignments, we continue to add regions and services at 
a faster rate.
English 0.9999
«Нос» - сатирический рассказ Николая
Гоголя, написанный во время его жизни в
Санкт-Петербурге. В это время в
творчестве Гоголя основное внимание
уделялось сюрреализму и гротеску с
романтическим оттенком; Предлагаемый
здесь рассказ «Нос» является примером.
Рассказ Николая Гоголя «Нос» был
написан между 1832 и 1833 годами и
завершен в 1834 году, подвергался
различным пересмотрам и модификациям
Н. Гоголем, в основном из-занепрерывного вмешательства цензуры.
Russian 0.9999

O JSON para o primeiro exemplo é:

Amostra de Solicitação
POST https://<region-url>/20210101/actions/batchDetectDominantLanguage
Formato da Solicitação de API:
{
  "documents": [
    {
      "key": "doc1",
      "text": "OCI recently added new services to existing compliance program 
including SOC, HIPAA, and ISO to enable our customers to solve their use 
cases. We also released new white papers and guidance documents related to 
Object Storage, the Australian Prudential Regulation Authority (APRA), and the 
Central Bank of Brazil. These resources help regulated customers better 
understand how OCI supports their regional and industry-specific compliance 
requirements. Not only are we expanding our number of compliance offerings and 
regulatory alignments, we continue to add regions and services at a faster clip."
    }
  ]
}
JSON de resposta:
{
    "documents": [
        {
            "key": "1",
            "languages": [
                {
                    "code": "en",
                    "name": "English",
                    "score": 0.9999840921009815
                }
            ]
        }
    ],
    "errors": []
}

Limitações

  • Somente um idioma é retornado. Nos casos em que a entrada é multilíngue, o idioma dominante é retornado.