<commit_before># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from os.path import join
from fnmatch import fnmatch
import os


class Kaldi(Package):    # Does not use Autotools
    """Kaldi is a toolkit for speech recognition written
    in C++ and licensed under the Apache License v2.0.
    Kaldi is intended for use by speech recognition researchers."""

    homepage = "https://github.com/kaldi-asr/kaldi"
    git      = "https://github.com/kaldi-asr/kaldi.git"

    version('master')
    version('2019-09-29', commit='<KEY>')
    version('2019-07-29', commit='7637de77e0a77bf280bef9bf484e4f37c4eb9475')
    version('2018-07-11', commit='<KEY>')
    version('2015-10-07', commit='c024e8aa0a727bf76c91a318f76a1f8b0b59249e')

    variant('shared', default=True,
            description='build shared libraries')
    variant('double', default=False,
            description='build with double precision floats')
    variant('cuda', default=False,
            description='build with CUDA')

    depends_on('blas')
    depends_on('cuda', when='+cuda')
    depends_on('sph2pipe', type='run')
    depends_on('sctk', type='run')
    depends_on('speex', type='run')
    depends_on('openfst@1.4.1-patch', when='@2015-10-07')
    depends_on('openfst@1.6.0:', when='@2018-07-11')
    depends_on('openfst@1.6.0:', when='@2019-07-29')
    depends_on('openfst@1.6.7:', when='@2019-09-29')
    depends_on('cub', when='@2019-07-29:')
    depends_on('openfst')

    patch('openfst-1.4.1.patch', when='@2015-10-07')

    # Change process of version analysis when using Fujitsu compiler.
    patch('fujitsu_fix_version_analysis.patch', when='@2018-07-11:%fj')

    def install(self, spec, prefix):<commit_msg>kaldi:refine dependency openfst (#18047)<commit_after># Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)

from spack import *
from os.path import join
from fnmatch import fnmatch
import os


class Kaldi(Package):    # Does not use Autotools
    """Kaldi is a toolkit for speech recognition written
    in C++ and licensed under the Apache License v2.0.
    Kaldi is intended for use by speech recognition researchers."""

    homepage = "https://github.com/kaldi-asr/kaldi"
    git      = "https://github.com/kaldi-asr/kaldi.git"

    version('master')
    version('2019-09-29', commit='<KEY>')
    version('2019-07-29', commit='7<PASSWORD>37c4eb9475')
    version('2018-07-11', commit='<KEY>')
    version('2015-10-07', commit='c024e8aa0a727bf76c91a318f76a1f8b0b59249e')

    variant('shared', default=True,
            description='build shared libraries')
    variant('double', default=False,
            description='build with double precision floats')
    variant('cuda', default=False,
            description='build with CUDA')

    depends_on('blas')
    depends_on('cuda', when='+cuda')
    depends_on('sph2pipe', type='run')
    depends_on('sctk', type='run')
    depends_on('speex', type='run')
    depends_on('openfst@1.4.1-patch', when='@2015-10-07')
    depends_on('openfst@1.6.0:', when='@2018-07-11')
    depends_on('openfst@1.6.0:', when='@2019-07-29')
    depends_on('openfst@1.6.7:1.7.3', when='@2019-09-29:')
    depends_on('cub', when='@2019-07-29:')

    patch('openfst-1.4.1.patch', when='@2015-10-07')

    # Change process of version analysis when using Fujitsu compiler.
    patch('fujitsu_fix_version_analysis.patch', when='@2018-07-11:%fj')

    def install(self, spec, prefix):
{'fraction_non_alphanumeric': 0.1541151156535772, 'fraction_numerical': 0.08660570199031738, 'mean_word_length': 4.005383580080753, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5994376', 'n_tokens_mistral': 1477, 'n_tokens_neox': 1289, 'n_words': 273}