# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem          1.0
PortGroup           github 1.0
PortGroup           python 1.0

github.setup        mjpost sacrebleu 2.3.1 v
# Change github.tarball_from to 'releases' or 'archive' next update
github.tarball_from tarball
revision            0
name                py-${github.project}

license             Apache-2
maintainers         nomaintainer
platforms           {darwin any}
supported_archs     noarch

description         Hassle-free computation of shareable, comparable, and \
                    reproducible BLEU, chrF, and TER scores

long_description    SacreBLEU provides hassle-free computation of \
                    shareable, comparable, and reproducible BLEU \
                    scores. Inspired by Rico Sennrich's \
                    multi-bleu-detok.perl, it produces the official \
                    WMT scores but works with plain text. It also \
                    knows all the standard test sets and handles \
                    downloading, processing, and tokenization for you.

checksums           rmd160  4182d07794a3d9fa8f6815bef2a334e41677ac12 \
                    sha256  c8ed9c9b36d62ba12d029e2414fb29e3fb7d6c39d06adfcd2dacc5299556fb5b \
                    size    1866369

python.versions     39 310 311

if {${name} ne ${subport}} {
    depends_run-append \
                    port:py${python.version}-portalocker

    variant ja description {Extras for Japanese language support} {
        depends_run-append \
                    port:py${python.version}-mecab-python3
    }

    test.run        yes
}
