-
Notifications
You must be signed in to change notification settings - Fork 2
/
nlp-console-examples
95 lines (81 loc) · 2.18 KB
/
nlp-console-examples
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
NLP Examples in Console
### Fill Mask examples
POST _ml/trained_models/bert-base-uncased/deployment/_infer
{
"docs": { "text_field": "Paris is the [MASK] of France."}
}
POST _ml/trained_models/bert-base-uncased/deployment/_infer
{
"docs": { "text_field": "Amsterdam is a city in the [MASK]."}
}
### Text Classification Examples
POST _ml/trained_models/distilbert-base-uncased-finetuned-sst-2-english/deployment/_infer
{
"docs": { "text_field": "I didn't like the soundtrack from the movie Dune"}
}
POST _ml/trained_models/distilbert-base-uncased-finetuned-sst-2-english/deployment/_infer
{
"docs": { "text_field": "That movie was awesome!"}
}
POST _ml/trained_models/distilbert-base-uncased-finetuned-sst-2-english/deployment/_infer
{
"docs": { "text_field": "Temperartures are average this year"}
}
### NER Examples
POST _ml/trained_models/dslim__bert-base-ner/deployment/_infer
{
"docs": { "text_field": "This is a pretty low quality and generic case study for Apple Inc with Intel"}
}
POST _ml/trained_models/dslim__bert-base-ner/deployment/_infer
{
"docs": { "text_field": "My name is Bob Marley and I work for Elastic which was founded in Amsterdam."}
}
POST _ml/trained_models/dslim__bert-base-ner/deployment/_infer
{
"docs": { "text_field": "European authorities fined Google a record $5.1 billion on Wednesday"}
}
### Zero Shot Classification Examples
POST _ml/trained_models/typeform__distilbert-base-uncased-mnli/deployment/_infer
{
"docs": [
{
"text_field": "Water is coming through the ceiling!"
}
],
"inference_config": {
"zero_shot_classification": {
"labels": [
"emergency",
"plumbing",
"home",
"finance",
"casual",
"swimwear",
"electricals",
"car",
"insurance",
"mindfulness"
],
"multi_label": true
}
}
}
POST _ml/trained_models/typeform__distilbert-base-uncased-mnli/deployment/_infer
{
"docs": [
{
"text_field": "This is a very happy person"
}
],
"inference_config": {
"zero_shot_classification": {
"labels": [
"glad",
"sad",
"bad",
"rad"
],
"multi_label": false
}
}
}