Skip to content

Instantly share code, notes, and snippets.

@spinscale
Created February 18, 2020 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spinscale/e80dbcb9d38eb764210e3fc1199e5731 to your computer and use it in GitHub Desktop.
Save spinscale/e80dbcb9d38eb764210e3fc1199e5731 to your computer and use it in GitHub Desktop.
Inference processor with language identification
POST _ingest/pipeline/_simulate?filter_path=**.predicted_value
{
"pipeline": {
"processors": [
{
"inference": {
"model_id": "lang_ident_model_1",
"inference_config": { "classification": {}},
"field_mappings": {}
}
}
]
},
"docs": [
{ "_source": { "text": "This is an english text" } },
{ "_source": { "text": "Das ist ein deutscher Text" } },
{ "_source": { "text": "你好世界" } },
{ "_source": { "text": "Ceci est un texte en français" } }
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment