MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / test_num_hypotheses

Function test_num_hypotheses

python/tests/test_translator.py:553–558  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

551
552
553def test_num_hypotheses():
554 translator = _get_transliterator()
555 output = translator.translate_batch(
556 [["آ", "ت", "ز", "م", "و", "ن"]], beam_size=4, num_hypotheses=2
557 )
558 assert len(output[0].hypotheses) == 2
559
560
561def test_max_decoding_length():

Callers

nothing calls this directly

Calls 2

_get_transliteratorFunction · 0.85
translate_batchMethod · 0.45

Tested by

no test coverage detected