tf2_ndg_benckmarks.metrics.utils package

Submodules

tf2_ndg_benckmarks.metrics.utils.ngram module

Copyright:

Copyright 2019 by Katsuya SHIMABUKURO.

License:

MIT, see LICENSE for details.

tf2_ndg_benckmarks.metrics.utils.ngram.count_ngram(n: int, target: str) → collections.Counter

Count n-gram.

Parameters
  • n (int) – n-gram’s n.

  • target – (str): target sentence.

Returns

python counter object.

Return type

Counter

Module contents

metrics.utils

Metrics utility module.

Copyright:

Copyright 2019 by Katsuya SHIMABUKURO.

License:

MIT, see LICENSE for details.