t5 text2text-generation pilota

Pilota model for hotel reviews

A model for Pilota trained with Hotel Review SCUD

Usage

  1. Install Pilota

  2. Prepare inputs

    • Command

      echo -e '平和記念公園へも徒歩圏内で駐車場もあり、便利なホテルです。' | python -m pilota.convert.plain2request | tee input.jsonl
      
    • Output

      {"context":null,"utterance":"平和記念園へも徒歩圏内で駐車場もあり、便利なホテルです。","sentences":null,"meta":{}}
      
  3. Feed it to Pilota

    • Command

      pilota -m megagonlabs/pilota_hotel_review --batch_size 1 --outlen 60 --nbest 1 --beam 5 < input.jsonl
      
    • Output (Formatted by jq .)

      [
        {
          "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)