espnet.mt package

Initialize sub package.

espnet.mt.mt_utils

Utility funcitons for the text translation task.

espnet.mt.mt_utils.add_results_to_json(js, nbest_hyps, char_list)[source]

Add N-best results to json.

Parameters
  • js (dict) – groundtruth utterance dict

  • nbest_hyps (list) – list of hypothesis

  • char_list (list) – list of characters

Returns

N-best results added utterance dict

espnet.mt.mt_utils.parse_hypothesis(hyp, char_list)[source]

Parse hypothesis.

Parameters
  • hyp (list) – recognition hypothesis

  • char_list (list) – list of characters

Returns

recognition text string

Returns

recognition token string

Returns

recognition tokenid string

espnet.mt.__init__

Initialize sub package.

espnet.mt.pytorch_backend.mt

Training/decoding definition for the text translation task.

class espnet.mt.pytorch_backend.mt.CustomConverter[source]

Bases: object

Custom batch converter for Pytorch.

Construct a CustomConverter object.

espnet.mt.pytorch_backend.mt.train(args)[source]

Train with the given args.

Parameters

args (namespace) – The program arguments.

espnet.mt.pytorch_backend.mt.trans(args)[source]

Decode with the given args.

Parameters

args (namespace) – The program arguments.

espnet.mt.pytorch_backend.__init__

Initialize sub package.