d0ede91168d7bde7f79de224061ade3a3794a456,tests/theanolm/latticedecoder_test.py,TestLatticeDecoder,test_decode,#TestLatticeDecoder#,119

Before Change


        self.assertSetEqual(paths, all_paths)

        for token in tokens:
            print(token.__str__(vocabulary))

if __name__ == "__main__":
    unittest.main()

After Change


        // Compare tokens to n-best list given by SRILM lattice-tool.
        log_scale = math.log(10)

        token = tokens[0]
        history = " ".join(vocabulary.id_to_word[token.history])
        self.assertSequenceEqual(history, "<s> IT DIDN"T ELABORATE </s>")
        self.assertAlmostEqual(token.ac_logprob / log_scale, -8686.28, places=2)
        self.assertAlmostEqual(token.lat_lm_logprob / log_scale, -94.3896, places=2)
        self.assertAlmostEqual(token.nn_lm_logprob / log_scale, 0.0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: senarvi/theanolm
Commit Name: d0ede91168d7bde7f79de224061ade3a3794a456
Time: 2016-07-28
Author: seppo.git@marjaniemi.com
File Name: tests/theanolm/latticedecoder_test.py
Class Name: TestLatticeDecoder
Method Name: test_decode


Project Name: statsmodels/statsmodels
Commit Name: 772279cf9e887cf66d9812b0fcb8b51ce3556d6d
Time: 2020-08-31
Author: josef.pktd@gmail.com
File Name: statsmodels/tools/testing.py
Class Name: Holder
Method Name: __repr__


Project Name: pgmpy/pgmpy
Commit Name: c1ec56706575c1e430d8f3173a1dd1ad521d02c0
Time: 2014-12-23
Author: abinash.panda.ece10@itbhu.ac.in
File Name: pgmpy/independencies/Independencies.py
Class Name: Independencies
Method Name: __str__