--- language: ja tags: - t5 - text2text-generation - pilota license: cc-by-nc-sa-4.0 --- # Pilota model for hotel reviews A model for [Pilota](https://github.com/megagonlabs/pilota) trained with [Hotel Review SCUD](https://github.com/megagonlabs/hotel_review_scud) - ``scud`` - Fine tuned model of [t5-base-japanese-web (with Byte-fallback, 8K)](https://huggingface.co/megagonlabs/t5-base-japanese-web-8k) - The original model is distributed in [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) - ``scorer`` - Fine tuned model of [LINE DistilBERT Japanese](https://huggingface.co/line-corporation/line-distilbert-base-japanese) - The original model is distributed in [the Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0) ## Usage 1. Install [Pilota](https://github.com/megagonlabs/pilota) 2. Prepare inputs - Command ```bash echo -e '平和記念公園へも徒歩圏内で駐車場もあり、便利なホテルです。' | python -m pilota.convert.plain2request | tee input.jsonl ``` - Output ```json {"context":null,"utterance":"平和記念園へも徒歩圏内で駐車場もあり、便利なホテルです。","sentences":null,"meta":{}} ``` 3. Feed it to Pilota - Command ```console pilota -m megagonlabs/pilota_hotel_review --batch_size 1 --outlen 60 --nbest 1 --beam 5 < input.jsonl ``` - Output (Formatted by ``jq .``) ```json [ { "scuds_nbest": [ [ "平和記念園へ▔徒歩圏内だ。", "駐車場が▔ある。", "便利なホテルだ。" ] ], "original_ranks": [ 0 ], "scores": [ 0.9465934991836548 ], "scores_detail": [ { "OK": 0.8219783306121826, "incorrect_none": 0.016287358477711678, "lack": 0.09869803488254547, "limited": 0.05470234900712967, "non_fluent": 0.04080141708254814, "untruth": 0.008109904825687408 } ], "sentence": "平和記念園へも徒歩圏内で駐車場もあり、便利なホテルです。" } ] ``` ## License Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)