ichou1のブログ

主に音声認識、時々、データ分析のことを書く

BERTメモ(BertSum)その2

前回の続き。

起点となるスクリプトtrain.pyで、modeオプションは3つ。

  • train
  • validate
  • test

モデルによる予測の動きを確認するため、トレーニングデータを減らした上で、「train」モードで数stepほど学習させてみる。

その後、「validate」モードを実行。

オプションは以下のとおり。

python src/train.py \
-mode validate \
-bert_data_path bert_data/cnndm \      # input prefix (target: cnndm.test.0.bert.pt)
-model_path models/bert_classifier/ \  # model directory (target: model_step_3.pt)
-batch_size 1 \
-log_file logs/bert_classifier_predict \
-result_path results/cnndm \           # output prefix
-test_all \
-block_trigram true \
-bert_config_path bert_config_uncased_base.json \
-temp_dir temp/ \
-report_rouge false

完了すると、「results」ディレクトリ配下に以下のファイルが生成される。

  • cnndm_step3.candidate
  • cnndm_step3.gold
インプットとなるデータ

Southampton loanee Toby Alderweireld will be part of Atletico Madrid plans next season | Daily Mail Online

サッカー選手toby alderweireldに関する記事。
記事が書かれた日付は「2 April 2015」

記事の背景。

アトレティコ・マドリード(スペイン)からサウサンプトンFC (イングランド)へレンタル移籍しており、今シーズン、移籍先で活躍。
来シーズンも期待されるが、元のチームは彼が戻っていくることを期待している。
cnndm_step3.gold (参照要約)

下はGoogle翻訳

toby alderweireld has impressed during season-long loan at southampton<q>

toby alderweireldは、サウサンプトンでのシーズン中のローンで感銘を受けました

ronald koeman 's side are challenging for champions league places<q>

ロナルド・クーマンの側はチャンピオンズリーグの場所に挑戦しています

(補足)ロナルド・クーマンサウサンプトンFCの監督(2014-2016)。

but atletico madrid says they are counting on alderweireld for next season<q>

しかし、アトレティコマドリードは、彼らが来シーズンのためにalderweireldを当てにしていると言います


sporting director jose luis perez caminero praises belgian defender

スポーツディレクターjose luis perez camineroはベルギーのディフェンダーを称賛


cnndm_step3.candidate (モデルが選んだ要約候補)
toby alderweireld will return to atletico madrid once his loan spell ends at southampton<q>

toby alderweireldは、ローンスペルがサウサンプトンで終了すると、アトレティコマドリードに戻ります。

oliver [ torres ] and alderweireld , for example , are finishing a very good season with porto and southampton and we are counting on them for the next campaign . '<q>

たとえば、オリバー・トーレスとalderweireldは、ポルトサウサンプトンで非常に良いシーズンを終えており、次のキャンペーンに期待しています。

alderweireld contract expires in june 2017 , and has been a key part of a defence with southampton that has seen ronald koeman 's side challenge for the champions league places .

alderweireldの契約は2017年6月に期限切れとなり、サウサンプトンとの防衛の重要な部分であり、チャンピオンズリーグの場所に対するロナルドクーマンのサイドチャレンジを経験しました。


以下は要約を作る元となる全文。
(画像に付けられたキャプションも対象)
抽出された文を赤字にした。

Toby Alderweireld will return to Atletico Madrid when his season-long loan finishes at Southampton, according to the Spanish club's sporting director Jose Luis Perez Caminero.

The Belgian defender, 26, has impressed this season on the South Coast, and has hinted in the past that he would like to remain permanently in the Premier League, with Tottenham also believed to be admirers.

But Atletico say they are counting on Aldeirwereld to return to La Liga, as well as Oliver Torres who has been plying his trade in Portugal with Porto.

Toby Alderweireld will return to Atletico Madrid once his loan spell ends at Southampton

'Our coaches follow a detailed monitoring of all the players that are loaned to other teams,' Caminero told Atletico's official website.

'We are very pleased with their performance and growth in general. Oliver [Torres] and Alderweireld, for example, are finishing a very good season with Porto and Southampton and we are counting on them for the next campaign.'

Alderweireld contract expires in June 2017, and has been a key part of a defence with Southampton that has seen Ronald Koeman's side challenge for the Champions League places.

Alderweireld holds his head during Belgium's Euro 2016 qualifier with Israel in Jerusalem last week