shirayu commited on
Commit
ccb9e69
β€’
1 Parent(s): 3d6fc82

Updated examples

Browse files
Files changed (1) hide show
  1. README.md +75 -0
README.md CHANGED
@@ -18,6 +18,81 @@ A model for [Pilota](https://github.com/megagonlabs/pilota) trained with <https:
18
  - Fine tuned model of [LINE DistilBERT Japanese](https://huggingface.co/line-corporation/line-distilbert-base-japanese)
19
  - The original model is distributed in [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  ## License
22
 
23
  Apache License 2.0
 
18
  - Fine tuned model of [LINE DistilBERT Japanese](https://huggingface.co/line-corporation/line-distilbert-base-japanese)
19
  - The original model is distributed in [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0)
20
 
21
+ ## Usage
22
+
23
+ 1. Install [Pilota](https://github.com/megagonlabs/pilota)
24
+ 2. Prepare inputs
25
+ - Command
26
+
27
+ ```bash
28
+ echo -e 'ιƒ¨ε±‹γ«ε†·θ”΅εΊ«γŒγ‚γ‚‹γ¨θ‰―γ„γ€‚γƒ¬γƒ³γ‚Ώγ‚«γƒΌγ‚΅γƒΌγƒ“γ‚ΉγŒγ‚γ‚‹γƒ›γƒ†γƒ«γ‚’γ€customerγ€‘γŒεΈŒζœ›γ™γ‚‹γ€‚' | python -m pilota.convert.plain2request | tee input.jsonl
29
+ ```
30
+
31
+ - Output
32
+
33
+ ```jsonl
34
+ ```
35
+
36
+ 3. Feed it to Pilota
37
+ - Command
38
+
39
+ ```console
40
+ pilota -m megagonlabs/pilota_scud2query --batch_size 1 --outlen 60 --nbest 1 --beam 5 < input.jsonl
41
+ ```
42
+
43
+ - Output (Formatted by ``jq .``)
44
+
45
+ ```jsonl
46
+ [
47
+ {
48
+ "scuds_nbest": [
49
+ [
50
+ "ιƒ¨ε±‹γ«ε†·θ”΅εΊ«γŒγ‚γ‚‹γ€‚"
51
+ ]
52
+ ],
53
+ "original_ranks": [
54
+ 0
55
+ ],
56
+ "scores": [
57
+ 0.9769772589206696
58
+ ],
59
+ "scores_detail": [
60
+ {
61
+ "OK": 0.9232575297355652,
62
+ "incorrect_none": 0.0034886503126472235,
63
+ "lack": 0.023772092536091805,
64
+ "limited": 0.013821585103869438,
65
+ "untruth": 0.04332486167550087
66
+ }
67
+ ],
68
+ "sentence": "ιƒ¨ε±‹γ«ε†·θ”΅εΊ«γŒγ‚γ‚‹γ¨θ‰―γ„γ€‚"
69
+ },
70
+ {
71
+ "scuds_nbest": [
72
+ [
73
+ "γƒ¬γƒ³γ‚Ώγ‚«γƒΌγ‚΅γƒΌγƒ“γ‚ΉγŒγ‚γ‚‹γƒ›γƒ†γƒ«γ γ€‚"
74
+ ]
75
+ ],
76
+ "original_ranks": [
77
+ 0
78
+ ],
79
+ "scores": [
80
+ 0.9876023113727569
81
+ ],
82
+ "scores_detail": [
83
+ {
84
+ "OK": 0.9586743712425232,
85
+ "incorrect_none": 0.004059707745909691,
86
+ "lack": 0.0024317132774740458,
87
+ "limited": 0.007630097679793835,
88
+ "untruth": 0.04025880992412567
89
+ }
90
+ ],
91
+ "sentence": "γƒ¬γƒ³γ‚Ώγ‚«γƒΌγ‚΅γƒΌγƒ“γ‚ΉγŒγ‚γ‚‹γƒ›γƒ†γƒ«γ‚’γ€customerγ€‘γŒεΈŒζœ›γ™γ‚‹γ€‚"
92
+ }
93
+ ]
94
+ ```
95
+
96
  ## License
97
 
98
  Apache License 2.0